---
title: WWDC2003 Session 719
framework: wwdc
role: article
path: wwdc/wwdc2003-719
---

# WWDC2003 Session 719

## Transcript

Kind: captions Language: en good afternoon and welcome to session 719 administering quicktime streaming server my name is Stephen tona I'm a product manager on the QuickTime product marketing team and I just want to remind you that if you have any questions if you can hold them till the end I'd be great and then just line up at a microphone so that we can have the whole session translated properly and without further ado I'd like to introduce Chris Lacroix who is an engineering manager on the server team at apple and just in case you forgot that's diva told I have it ok so hi i'm chris mccoy I've been working on the streaming server I guess kind of sensitive inception and we've quick 10 straining server was actually a part of necklace and the very first release of mac OS x server started out as quicktime standing server version 1 it's been in every version since then and what Panther word we're announcing quicktime streaming server 5 and it's got a couple of new cut some new features that are actually pretty nice we've got things like home directory support we've really tighten down the security of the server so it's be even more secure than it was before we have written a new ad administration application we've written a new content management application we made it more tightly integrated with mac OS x server as a whole so it integrates with some of the other services on that close tense river and so we are going to show you a little bit of that today so first going to have somebody come up in demo somebody John Anderson demo the new admin and we'll take a look at the content management tools and then i'm going to give everybody an opportunity to maybe fall asleep because i'm gonna go into some advanced administration and my goal is to see how many people either walk out or fall asleep if I can do half the room on doing really well so we're going to get really esoteric in here okay so the new admin this is a native mac OS 10 application or if the plug-in actually to plug into the mac OS 10 server admin so it's completely integrated with all of the other service on the admin or other services on the server inside the admin it's not web-based so in the past I think we are getting with clicked on streaming server 3 we had a web-based admin this is not web base which is a Mac os10 Coco application we do still provide the web-based admin them and there are a couple of reasons for that one is that maybe you're not going to be on a Macintosh when you need to administer so we've got your honor but Windows machine or a linux machine you can still get into the web-based admin and make changes to the server the other reason is that quicktime streaming server is the version of the server that we ship with mac OS 10 server we also should we also produce something called Darwin streaming server which is really just an exact copy of quicktime streaming charge the exact same core source code the only difference is it doesn't have all of the nice McIntosh jewelry that we are providing and that's an open source project that we provide binaries for solaris windows linux the source code is available it's been poured into a bunch of different platforms and that's another big reason for web-based you IM still there so we have John come up and show you a little bit of the new streaming server admin I'm John Anderson I work in the engineering team on you I basically for a graduate of s so let me go ahead and launch the server admin and this is the server admin tool for the entire for the entire Mac os10 server machine and you can actually use it to administer multiple servers at once so you can use it to administer an entire rack of quicktime streaming server machines but what i'm going to do is I'm going to go ahead and go over here to quicktime streaming and actually isn't stopped but we'll just forget we saw that to this what okay here we go so if you go to the connections tab for example you can see the connected users this is pretty similar to the web UI for those who have seen it fairly similar functionality so where you can see the connected you and the active relays and you can sort them however you want to and just like the webui you can see all the logs from here the error log the access log have easy access to those so you don't have to ftp end of the server to get those you can just get them pretty easily there's this grass feature this is pretty cool this actually shows you how many users have been connected and what the throughput is isn't streaming on the tool running Chris oh yeah or no maybe okay so it would show you were there any users connected a grass over time and maybe Chris after you run the streaming admin tool for a while you can bring this up again maybe are you can combine feet later settings of course this is the this is the important stuff this is the meat of the matter you can set for example what the root folder is where you put all your media files what your maximum connections a lot of these are over from the web as well one thing that is new and it's pretty significant that was not in previous versions is IP bindings tab and so this is this actually allows you if you're streaming on port 80 of course you you can't stream on the same IP address as an Apache server because that's also streaming on port 80 so this is something that's that's new in this in this cute ESS admin that allows you to specifically tell it to bind certain IP addresses and then you can go ahead and turn on streaming at port 80 and molds do multiple hosts on the same machine there's a better relay you I I'm really not going to get to that because that's pretty complex and logging so this really gives you a lot of the stuff from the web and it basically gives you everything from the web admin and more and gives you some graphs to represent some things and a lot easier to you great thanks actually you can medical staff opportunity back I've got the 30 seconds veteran slides so we also showed guys worth the quicktime keynote tuesday we showed a new application called qts publisher and CSS publisher is an application that lets you remotely manage all of the content on your streaming service you may have an xserve sitting someplace in a back room this application will allow you to do things like upload all these movies to the server from wherever you're at and automatically prepare them for the internet for hint you know hinted for streaming for progressive download it will help you a lot with each would deal with all of the HTML issues that you'll need to deal with when you're trying to get multimedia up on the Internet man lets you manage playlists and edit annotations in this application is actually driving some unix tools that we wrote let's sit on the back end for you can now actually and you can use those tools yourself i'll show you a little bit more about those later in the session so i don't have John demo cutie SS publisher now okay qss publisher is basically it's there to save you a lot of steps would get a lot of questions on the mailing list where it's like okay I know where my movies folder is I put my movie up there and that's kind of it like you don't really know where do we go from here so that's where Q CSS publisher kind of fits in this is a client-server app so this is installed with the admin tools and you can connect either in this case we're connecting to localhost and of course you can also connect to a remote server and that's that's important to emphasize that you can run this from anywhere and then you're connecting to your server and as you can see here from the media view you can see all of your media and you can see it like collated basically as a list that you can sort through for example or you can see it as an outline so you can see your actual file tree here and we also separate it out of course into media library and mp3 library and that basically is mp3 library is l your Empress trees and your media library is basically all your everything but mp3 so that's the best way of kind of distinguishing between the two the streaming standards are different of course for mp3 files its life cast streaming and 44 media is rtst so that's the main distinction there and so what I'm going to do is I'm going to go ahead and go to the media library mp3 library and I'm going to highlight a song and I'm gonna go to the settings you so you here you can see all the id3 tags for that mp3 movie and you can edit them change them remotely and if you go to the URL tab you can see the checkbox that says media is available for download so when you're working in these libraries you're actually working in a sort of staging area so you can you can go ahead and put movies up here and you can upload them and they will not be available to the public immediately so you can go in and go ahead and change all of your settings and everything like that before you make them available to the public for streaming so for example here I can go and go ahead make it available for download and apply my changes and this will actually give me the URL for the movement for the mp3 files so I can so that I can stream it on demand their sentence what W reach bike can we add each other please enter your pass Kurt so I took a weird song but that's okay and if you do want to upload media then all you have to do is go to the media of you or any basically any list of content and you can just take a file I'm not really going to drag it up but you know it's just take this clipping file for example and drag it in and then you can just pick where you want it to go and it will get uploaded and if it's a movie file you don't have to worry about making it ready for fast start you don't have to worry about making it ready for hinting that all happens in the background on the server so see so the next thing I'm going to do is I'm going to make an mp3 playlist because of course on demand mp3 is one thing but of course another thing you that a lot of people technically will usually do it will start up a playlist that they can have basically an mp3 radio station going so I can go in here and click new playlist and i'll make an mp3 playlist and let's call it my music so i can go in here and yeah i can either from the folder view here from the song view i can just pick i'm going to be really moody and go for like a linkin park and then followed it up with REM and I guess that's all i have is linkin park in rem so you can see that i mean you know this is this is very very mac like I mean you can you can take things and drag them to rearrange them apparently not but this is beta so you can you can drag any of these files in that you want set them up and then when you're ready just hit start and the playlist will oh I don't have a broadcast password okay here's another time to see the admin let's go ahead and go in here and set an mp3 broadcast average so while he's doing that mp3 broadcast passwords in icecast rachelle castle you need to provide a password basically for people to be able to broadcast remember so he's setting that right now and and why does that matter because the broadcaster that broadcasts mp3 is actually broadcast to the streaming server which then distributes out to clients so you've gotta have a password on that server okay so we may end up skipping the the broadcast of the my music playlist let's try it in here sounds like linkin park and REM basically yes we can park in rem it's probably not going to be a real surprise to you at any at any point anyway so what we'll do is we'll just click ok on that error message and go on with the demo so next thing we'll do is we'll just look at some movies I'm going to go back to here to list you and I'm going to highlight this losing grip movie which is how I feel right now so you can see here you can settle the annotations the final version of course is going to have the full list of annotations in there I just put a few of them in here so far but it's the same idea you can go here and change the movie annotations remotely so you don't have to download the movie and change the annotations and then upload it back up again and here you see a couple buttons here media is available for streaming media is available for download if you make something available for download what it's going to do is it's going to prepare it for fast start and it's going to put it in your web server folder and make it available there so that it can be so that it can be viewed by fast start so if it's something short like a movie trailer or video or something that might work really well for that so for example here if I say make a bill for download and click on that link and you can see by the little progress bar that goes along here that it's actually fast starting the movie ok but what I'm going to do for this in this case is I'm going to make it available for streaming so this is going to go through quicktime streaming server instead so this is going to put a hinted movie in the quicktime streaming movies folder and so it's the same thing here i can click on this URL and you get interested on it's already streaming the thing here of course is that you're not going to want to hand somebody in the URL I mean it's another stopping point right it's like a where do you go from here you've got to start tsp or l you're not going to tell your users to type it into the quicktime player and so that's what the purpose of the links view is and this view will basically give you a list of everything that's publicly available so it's assumed that your playlists are publicly available of course and any of the movies and mp3 files that you've made available for streaming or download will show up here and so you can see here that for example that the losing grip movie is still highlighted and in this display tab you can basically explained how it is that you want this to be embedded in a page so for example here it's selected that you wanted to open the quicktime player so it's going to show this custom this custom image and when they click on its going to open a quicktime player with that movie playing in it optionally i can embed it in the web page which should have the same behavior except that the movie would play in the page itself or i can have it autoplay so so it starts playing as soon as the page is loaded in this case i'm going to go ahead and have it open in the quicktime player and if we look at the bandwidth tab you can see that you can provide you can actually create breast movies here so you can specify for example that if somebody's on a broadband connection they can see the streaming version and it's a nonce admit then they get the fast start version or maybe you can transcode it to a lower bitrate or anything like that so this is basically rest movies made easy and once you set that up you can go to the HTML tab and what I could do here for example is i can highlight all this stuff copy it and then i'm going to launch bbedit and make the world's simplest web page so i'll just do a new HTML document i'm not even going to title it except that and just paste that in now I take that movie off my desktop and drag it on to Safari see we have a movie with you that's pretty cool I mean that takes you the rest of the steps to getting something actually on to a page and not only can you drag that into bbedit but you can also drag it into Dreamweaver and go live and stuff like that and it will show up right away as it actually shows up as an activex control because it has to be compatible with internet explorer 6 for windows pay no attention to the man behind the curtain that's one of those demo things but yes very suit of you to notice that actually so that's that's pretty cool but there's another step that we can go to with this which is that you can highlight you can multiple select or even do a single select of these lengths and you can click to make web page button and what this will actually do is this will take that that HTML code and it will run it through what's called Apache xslt which means XML stylesheet transformations it's a well-documented and very versatile standard for templating and it means that you know what will provide some templates for you can go out and make your own and so I can type in a name here and say like my Avro movies and so what this will actually do is make a web page from your template with the movies in it and here's where it's actually paying attention to the stuff that I had chosen in that dialogue so [Music] so automatic webpage generation as well so let's see so that's the publisher thanks John okay so this is stopping point one for those of you who want to leave I'm going to get really boring up to this John's kind of the highlight of the show here I'm going to talk a little bit about firewalls firewalls or something that have been in the past the bane of streaming but then things are getting better and I can talk to a little bit about why our laws are a problem and why they're getting better I'm going to show you how to work through the command line a little bit and then talk about some troubleshooting and some configuration options you can do there that you can't do from the UI so first firewalls naps and proxies so when we first started out doing streaming quicktime streaming server one we we had a hard time getting streams to go through anything because the firewalls developed into fairly new stuff firewalls we're not configured to deal with it there were not necessarily proxies around naps have no idea what to do with anything so we did a few things we we added the ability to tunnel the protocols we use over HTTP which is great that gets around firewalls and naps because they know what to do with HTTP but it's not really the best way to stream it's not the way we like the strain we like to use that you know the standard protocols and so can I want to show you kind of why these protocols are a problem so streaming is comprised of three protocols typically on the wire you've got rtsp and that's the protocol that runs on tcp runs on porch 554 70 70 or 80 or whatever import the servers configured to use it's a lot like HTTP and it's basically gift away for the player the player initiates this to say I'd like to watch a movie what is the movie what does it look like okay I want to watch these tracks okay play the movie and the way that protocol works is the client makes it requests over TCP and the server responds when each of those boxes are the separate collapsed it's not one big request like that this is typically not a problem for firewalls because firewalls are usually configured to allow and the firewall I'm referring to as a firewall that's on the players side firewalls are typically configured to allow TCP connections from a client that are initiated from a client inside your network to work properly on submit the client initiated it's probably safe not all of them but most of them are the problem comes into play when we get done with with the rtsp and start sending data so data gets sent over RTP and RTP and arcs rtcp traditionally run over UDP so the problem with the UDP versus TCP is that TCP is not connectionless for the it's a protocol that keeps the connection to look at the connection is there UDP is connectionless when a client initiates a request to a server via TCP that connection stays open until the client or the server closes that connection and so firewalls you know they can deal what they're happy with that they like know where the connection came from they know who owns both ends and as long as it stays up there happy with it problem with RTP or with UDP is that it's connectionless every packet you send is basically a brand little vamp brand-new little mini connection to the server so what just happened here is that the pcp all got through fine the streaming server started this thing send media tracks and status tracks which are in via UDP and the firewall sees these things coming in at it bound for that QT player imports tsukino and 17 up and it's like where did these come from have no idea where it came from it so they're just they're just bouncing off the firewall so that's the really big problem and then not so problematic is the client sends back UDP packets to the server these are usually not a problem because the server's not gonna have a firewall that blocks that stuff or it'll be properly configured because you're doing screaming of course but being but you may have a firewall that will block outgoing UDP as well these status packets contain things like things that might be interesting to the server like which package to client received which ones that missed what its average bandwidth was what its frame rate was things like that you'll see a little bit more of that when I get into more esoteric topics okay so kind of recap firewalls so what so aren't the problem with firewalls is at RTP and rtcp or sent out of band from the rtsp connection right there sent via UDP they're completely separate number one excellent firewalls considered considered them to be unsolicited they don't know who they don't know why anybody would be sending these to the player because the firewall that has no idea that it was negotiated a tag and via rtsp Nats own you have a different problem so what naps do if they take a single IP address and then they they'll map all of the traffic coming through that that router than that router and redirect it to the proper client in the back end I think most of you are familiar with nets so what happens is in that gets the few DP packet and it looks at it and it's like I have no idea who to send this to so it just drops it so there are ways to fix this one as I mentioned is to streamline port 80 not other way of cystic sutter to configure your firewall the problem with configuring of firewall is that you basically have to open up ports 6970 through you know 6 steve it probably 6800 or something like that for incoming UDP well there's a potential security risk there you don't nest open up ports and allow packets to come through that you that you don't understand so what you normally would do is you'd set up a proxy a streaming proxy so screaming proxies typically live meeting to live in the DMZ on the client side where the players they understand rtsp RTP rtcp all of the protocols involved in streaming this river will see the proxy is just another client and the client will see the property is just another server so there's no problem there with some compatibility and what happens if the proxy translates the request from the client and from the server so what so the server of seeing the proxy has one is one client the proxy actually acts sort of as an at basic an app for streaming here's a diagram looks a little bit easier to understand ending so on the left you've got the screenings river in the internet so this is you you guys are the guys admit administering the server what you need to tell people who can't stream or assisted mins on that site is that they need a screaming proxy and the proxy lives right there in the DMV and the DMV is an area that the firewall trusts so things coming from that proxy server will be trusted by the firewall and allowed through to the brought to the clients anything that tries to bypass that string and proxy or go around the DMV is going to hit the firewall and get blocked because because the firewalls obviously I don't know who you are I don't trust you goodbye so that's basically how proxies work and how to get rid of the firewalls okay so this is the second point where people may want to locate will probably when I think about leaving I'm going to kind of go through command line options in quick time streaming server so quick time streaming server is comprised of a bunch of command line tools whenever when you see things like the admin app the admin that John was showing or the PSS publisher or the web-based admin all those really are just facades that are on top of these command line tools they just all they do is configure those configured the config files change the options from the command line and just execute these too often so if you really want to get kind of down and dirty there are all kinds of things you can do in the command line it can't do in the GUI and something to kind of run through a few of these briefly these are just good things to know we have a it's probably a lot of it'll like not make sense to you right now but there will be few really doing streaming there's going to come a time when you need to do something and this is when it comes this is this is the information that will come in handy it's not documented completely it's not something we you know we put a lot of effort into documenting we're trying to get better but we have a mailing list and all the engineers around that mailing list and they're really good about answering questions and we actually love to answer we love to see people sort of messing with things like this so starting off with the first command line tools quicktime streaming server so that's the command line tool that is the quicktime streaming server basically and so what I'm showing here is basically the usage for that tool if you were to type QuickTime straining server dash V for version you would show you this a couple of things that are kind of point out so when you're quick time streaming server normally runs with a demon so the D that you see there dash D running foreground that causes it to stay in the foreground and it'll cut and in that mode quicktime streaming server will actually generate print apps out under the certain one you can kind of watch what's happening you can watch more or less depending upon some other changes that you've made which I'll show you later dash p allows you to specify which port you want the server listen to so this is really useful when somebody's having a problem someplace you've got a streaming server that's up and running you don't want to bring it down to like mess around with config files or go through all of this trouble shooting you can you can spell you can just say dash p 8 7 6 force just pick a random port and when your client out the client that you're working with connect using that port in their URL and the server will run off to the side it won't have any impact on the server's it's already running so you can run multiple servers that way and then there a couple of options for specifying custom config files there's a default location for config files but if you wanted to do some troubleshooting on the side you can tweak the config files in a different location and then point point the server off to those in let's see Oh dash the dash best option is actually pretty interesting if you just kind of want to monitor your server it'll basically just a line at a time show you how many clients are connected I think it shows whether is it getting packet loss or have things like that so moving from the command line options for quicktime streaming server i want to go to the config file so the config file is XML based it's really modular the server's really modular right bits of if you've ever heard any of us talk about the streaming server before it's basically a core server built with multiple modules that a module for doing QuickTime movies we've got a module for the mp3's you've got a module for doing reflections of broadcast we have a module for doing administration but the XML follows that formats which module has its own mental block of configuration in the library QuickTime screaming config directory which is the default location for all the config files you'll see a streaming server at smelled dash sample but when that file is actually fully commented the file that the server normally uses doesn't have comments in it so this is great this was kind of some partial documentation you'll find things in there that you will not even you have no hope of understanding but probably does not touch those there are over 140 attributes in there and most of them don't need to be touched but they come in useful to two different people depending upon what they're trying to do if you do modify a file a config file and you don't want to restart the server if you send it a hub signal you guys are familiar with using the kill command it's killed dash hub upper case like that in the end the process idea of this rumor that will force the server to reread its preferences and kind of and pick up your new changes and I have no idea what those last two lines are well if you really mess up I think I know what it's supposed to say so if you really mess up your config file you can delete it and the server will automatically generate anyone for you so this key edit I think so here's what some of the attributes look like I said they're XML so here's this is a sample file so it's about the comments and it some things like auto restart to boolean set it the true if you want the server to auto restart if it crashes although it never crashes false if you wanted to just completed and died the movie folder location which you can let you see in the UI that's basically what it looks like in the config file down below you see some debugging options and these words I'll show you some more about these things later lets you kind of put the server into moans real kind of show you more information as it's running so here are some of the interesting ones so these are kind of things that people tend to want to play with because they want to do things we never thought of we have a technology called skip protection in the server and one of the things that it does is it will send media faster than real time the reason it does that it wants to grow the buffer on the client side reason it wants to do that is it gives us a lot more time if we do any Durant retransmit a package so basically it helps to improve the quality we have that fix that we have that capped right now 25 seconds if you had a reason to put that down to 10 seconds erupt up to a minute or five minutes whatever that's affects the value you would change the server also runs as whoever you launch it is launched it as it needs to be typically launched as rude because it needs to bind so to some low numbered ports needs to bind support 554 port 80 and anything of the 1024 you need to be route to bind to so what you can do is set both of these and this will cause the server after it binds to those pork stew the problem with being rude of course with security problems this will cause the server to set its user ID and it's group ID down to whatever user you're specifying here and this is basically a good thing to do for security reasons some options for error log verbosity the bind IP address option is actually available in the IP or I mean in the admin now I don't know why anybody would ever want to do this but before we add instance on there used to be like a minimum 3-second buffer and we put this in here because there was a reason for people to increase that buffer don't ask me why you ever need to do that that's how you do it another so another kind of component of streaming is the concept of a blob of text called SDP it stands for session description protocol it basically describes the movie it's got information about each track what format each track is in that information that North that information is actually embedded in a QuickTime movie or an mpeg-4 if you have some reason to override that information and don't want to have to edit the movie you just need to do a quick little hack then you can turn this option on drop in a file named movie named whatever the movie name is SFTP that has basically a full ftp description in it and that will cause the server to pick that up rather than using the ftp information out of the movie it's kind of an advanced thing but it actually can come in useful in emergencies if you don't want to generate the ftp by hand you can set this option to true and this will cause the server whenever a movie is requested to take the SFTP information from the movie and spit out a little text file so that's kind of a quick way to get the ftp up and running and then make a little tweak to it and with both of these options set then everything worked we like to you can have logging log in gmt time or local time for the admin module i'm going to show you a little more about an admin protocol we have later the admin protocol only allows local access right now for security reasons so you've got to be on the local machine to use this protocol if you wanted to allow outside access you could set the local access only to false and then you could provide a list of IP addresses that are the only IP addresses that are allowed to get in which is kind of medium security and then this last one is from the mp3 max flow control x so this is basically the buffer that we the size of a buffer that we use on when streaming mp3 so if you have problems with mp3 players kind of going through that rebuffing thing that they do go through sometimes if you increase this value that many times will take care of that okay moving on these were a little more esoteric they're dropping like flies this is awesome so with so when you're doing when you're using a broadcaster with the server there are a couple of behaviors that you may or may not like there are ways to override those so the first one is that if a broadcaster stops for some reason they're a bunch of clients listening to it our server will keep those claims connected for this the broadcaster comes back up it'll just continue working and the only thing the client will see is just kind of a blank blank spot right the screen will stop for a little bit and then start back up you may have a reason to have the behavior work the opposite way which is to actually have all of the client connections just get dropped when you stop the broadcaster so this is the option they would you use dad there is also our broadcaster also has the ability to automatically announced its brought it's just announced that it's got a broadcast to the server that's on by default if you wanted to turn that off for whatever reason to complete security you could turn that off although that isn't authenticated transactions that's kind of mine early security but this look at you even more security then another kind of behavior of the server is that if a broadcaster crashes for some reason the QuickTime streaming server doesn't necessarily know it doesn't immediately assume that the broadcaster is gone I mean it can't so what will happen is that it'll it'll sit there and wait it'll wait for a certain amount of time and if it doesn't get receive any more data from the broadcaster it'll eventually time it out well that can be a problem if you're in the middle of doing like a live broadcast and something bad happens you don't have two or three or four minutes whatever that timeout is to get you wanna get the broadcaster back up and running you wanted to start broadcasting again what you can do is you can change this value to allow duplicate broadcasts and basically what that means is that if a broadcaster if a broadcaster tries to come back in again while I'm waiting for this time out I'm just going to allow it otherwise it's going to reject it it's going to say I'm already doing this broadcast while explaining for the timeout so this is some value that you would want to set to true typically if you own your own controlled environment when you're when you're doing live broadcasts in a little more about firewalls so I don't need to talk too much about the port numbers these were just these are the port numbers that the server by default binds to if you wanted to you could turn off some of these ports side 54 is the standard rtsp port 8000 8000 one or the standard mp3 broadcasting ports and 70 70 is kind of a historical realnetworks RTSP proxy port number and the reason we have that in here is that back in the old days this actually helped us to get through some of the firewalls because they were configured for real screaming another important one this one will this one you will have you pulling your hair out if it ever happens to you so you remember that status from the client comes back via UDP so I mentioned that it that that that contains things like which package the client receives which one is it lost it also is used for something else that's really important the server uses that to determine whether the client is still alive or not and if the server determines that the client is no longer alive it's going to it's going to basically drop its connection after two or three minutes so you will there can be configurations usually on your end if you put if you have a configuration where you put a round robin DNS in front of your streaming server what's going to happen is that that round robin is going to know what to do with all of the tcp because it understands you know remember over persistent connections it knows who book which and belongs to everybody what's going to happen is that clients are going to start sending UDP packets at your round robin wright at your round at your at your round robin DNS machine so it's going to get them and it's not going to know who which of your back-end machines to send it to so what this option does is it tells the screening servers to actually embed their own IP address inside one of the transactions that goes all the way back to the client that will cause the client to bypass dns round robin when it's sending those status packets and send them directly around to the server which is fine it doesn't affect bandwidth or anything like that which is typically laying the navigators graham rather than the setup but it makes everything just magically work bind IP address we already talked about that a little bit me you I don't need to go into that okay so mp3 screaming at the command line this was probably something you are more likely to use mp3 screaming because it's basically for every broadcast you're doing or every playlist you're doing you're running one copy of this tool and so there are if you know if you guys were like kind of savvy pearl scripters whatever you can actually write your own tools to kind of start and stop playlist manage playlists and the command line is really the way you want to do that so the options here are let's drop down to like X their preflight configuration what that's going to do is actually going to walk through all of the configuration files and make sure that those all look ok the one underneath that is check mp3 files that's going to kind of do a fast scan through all of your mp3 files and look for problems corrupt files data rates that don't match between you know things that will cause them not to play properly in a player when you're doing a broadcast or when you're doing a playlist I mean other options are pretty pretty self-explanatory I think configuration files so mp3 streaming is you comprised of two required files when you do a broadcast config file and a playlist file and then there's some optional metafiles now get into hu vs a little more details so the config file looks like this it's got basically a bunch of the same things you saw in the command line options it's also got things like your broadcast name here your mount point which is basically the portion of the URL data usually would type in after the IP address actually they wouldn't type it in you would use QT OSS publisher and it will give up on your website the broadcast password max upcoming list size so this is if you want to the book V this'll help to control the file I'm going to explain in just a second the bitrate you want to use for doing preflighting as its kind of scanning through all those mp3 movies that's the bit rate it's going to use to determine whether they're valid or not and then the playlist file play the files are pretty simple they're basically just a list of paths to mp3 files in addition they've got a number to the right of when that number is the number that's used when you're doing weighted random playlist weighted random playlists are play this that play randomly but the higher and number is the higher oh wait is on a song a more often it'll play so you can adjust these numbers from from 0 to 10 or 12 10 so here the optional files so the dot replaced list so basically the file the real file name is going to be recover than in your playlist or name of your plane live students don't replace list and what it does is it we is the current playlist and the transition happens after the current song is done playing this is what you would want to use when you want to modify your playlist in real time you don't have to bring down the broadcast you can just modify your file and give it this name in and take care of that stop list so this is similar and this is usually used for broadcasts although can be used for anything usually used for broadcasts that are kind of running permanently it allows you to provide a list of things to play after the next song completes and then basically shut down the broadcast so maybe you need to come down for maintenance on your server and you want to put up a little message for those that are listening today will be down for whatever time next two files or files that you can actually use for creating websites these are files that the broadcaster rights and you can read from them the thought current file contains the name of the currently playing file so you can use that if you wanted to have like an auto updating web page or writing or if you're writing some other kind of an application around it and dot upcoming will show you a list of the move of the files or the songs that are going to be coming up and you can modify the number of items that shows in that file by changing that attribute in your in your plaintiffs configuration file this is useful if you wanted to show a web page that showed songs that have played and also songs that are coming up if you wanted to try to keep people I'm not sure the IRI al exit but to do that if he's like the thing about mp3 streaming play or mp3 playlist is that basically everything I just described here works for for movie playlists as well or QuickTime playlist the only difference is instead of mp3 broadcaster it's called plaintiffs broadcast for the tool but everything other than that is almost identical a few different config options of course mp3 streaming if you wanted you transcoding or live encoding of mp3s we don't do that but there are a lot of third-party products that do and these all do work with with the QuickTime streaming server products ohm a camp we amp lame and live eyes for live encoding on you can leave a unix-based open source project and there's another there's actually a Macintosh application of the name is escaping me right now okay so streaming load tool so this is our tool that allows you to put load on our servers well that's what we typically use it for it so it's basically it's a QuickTime Player simulator because naturally show any movies but it does all of the networking and acts just like a real quick time player as far as the server is concerned we use it for performance testing at Apple most people who are trying to who are deploying big servers will believe it for that as well they want to find out how many streams you know the server is comfortable with we use it for stress testing how we find a lot of bugs just load it up with as many students as we can at one time we also use it for protocol protocol testing it supports the screening load tool supports all of the protocols all of the rtsp or all of the variations of the rtsp protocols quicktime streaming server supports we have tunnelling over port a you know HTTP we've got standard our KSP we've got the skip Protection Enhancement switch your standard but they're kind of extensions to RTSP and so on and this simulator supports all of those you can test those protocols and it works with servers and proxies because it does look just like a standard um streaming claim this is what the the command line options were pretty straightforward not a whole lot there most of the information that you're going to modify will be in the config file the config file is again text format it's not XML is just a key value pair file some of the options are going to want to set possibly or the client type reliable UDP of skip protection UDP of standard rtsp HTTP use tunneling / tunneling rtsp over HTTP TCP use interleaved RTSP you know most of you probably don't care about this stuff but if you do that's how you set it number of concurrent clients this tool can simulate more than one client so if you wanted to simulate 100 clients you would set concurrent clients to 100 movie Langton so you want might want to control how long the movie is actually watched it may be a 20-minute movie but you just want to do a little tin you know 10 the second test to make sure that the movies up and just set that to 10 seconds run forever means that the tool just runs forever that's you'd normally use that if you want to um you know if you're doing performance testing it's hard to tell how long it's going to take you to kind of get everything all set up so you just get you know can you get this thing going crank it up and it just runs forever until you stop it the load tool also generates logs and these logs or what these logs contain all kinds of information I'm gonna show you one in a second I'm about what happened with each of the sessions and URLs of course you need to specify which movies you want to watch the load tool can take a list of URLs if you've got a hundred movies on your on your server and you want to have this tool walk through every one of them just include 100 URLs and consume violent I'll do that so here's what the output looks like in the terminal so one the important thing here is the checking for streaming load tool thought emoji on the target server so what that's saying what the way streaming mode tool works is that it requires that a movie with this name is on the server otherwise it's not going to run and the reason we do that is we don't want people to take streaming load tool and just start putting stress on everybody's servers right so the only reason the only way it will work is if there's a movie with this name on your server so you need to make sure that when you tried where you use it shows you whatever what the options were in there just kind of shows you every second kind of status until it gets done and then and then it's done so that stay out put there and this is the log the logs have all kinds of information in them i'm not even sure you guys can kind of parse through all of that it'll show you things like total packets last duplicate packets what the stream what the data rate was for the stream basically all that stuff if there were an error it would show you an error there's a couldn't connect to server error in the middle so what this is good for is this makes it possible for you for people to right tools and pearl or shell scripts or whatever the coop and periodically call streaming load tool with a preset predefined list of URLs those tools can then parse through this log and then actually could have monitor status they can send you an email when they see a problem or generate HTML and show you the status of all your streams we've done this at appleton florence actually kind of cool so new and Panther server I talked about a couple of tools that the Qt SS publisher uses we have now provided some command line tools for manipulating QuickTime movies for preparation aunt for internet preparation basically cutie media's new tool it allows you to do things like change the annotations make the movie a fast start movie at a hint track to the movie and so on it's pretty straightforward just I think this was going to be really good for workflow people you know people can set up scripts that do all of this stuff automatically cron jobs you can have the UNIX form of a folder action and have a cron job that Watchers folders and automatically hints movies and shoves Lofton's red spot next to Liz qtrs and this is just a command-line tool for creating resolution so you can do all of this through the terminal if you're at the machine I don't know why you'd want to do that but if you need to ssh in from a windows machine or a UNIX machine you can still do things with quicktime ok so you thought that was boring now it's going to get really esoteric so the servers got some trouble shooting modes we use these at apple we do a lot of streaming and we have come up we've come across a lot of problems if I mentioned firewall problems it's really hard to figure out why people are not able to get a stream sometimes or if they're saying blips you know not good quality video we have some modes in the server that really lets you kind of dive really deep down and kind of trouble shoot these problems there they're basically what you would see in a packet sniffer but we've format things because we understand what the protocol is we formatted them into a I don't want to say human readable but engineering engineer readable format so here a couple of them for you can turn on rtsp debug.print up so remember you saw all of the negotiation between the server and client I want to watch this movie what does it look like back and forth the TCP thing this will just kind of dump all of that to the terminal as happening you can run a monitor those things packet header products this will print packet headers for all of the RTP in the RT GP packets it will print obviously the media from New York to be back it's because it wouldn't be very useful bit and then you can set the header out the options here let you specify which of those things you want to see if you turn a cough you'll get far fewer packets week I'm going to show you how that works on so just so you can see how horrendous it is split slip over to the demo machine so I'm going to cheat a little bit i'm not going to take the entire type the entire command in but basically what I'm doing is launching the you guys see that ok up there no kind of highlight each thing so pseudo if you know as you you may not know is I'm just a way to run things basically a super user without actually becoming super user click then streaming servers to command I'm running dash you see i'm running a this i want that i want to run the server on using a config file that i have modified and i've turned on those options that i just showed you i'm running in debug mode dash D and I've already got a server running on this machine I don't want to interrupt that one so I'm going to tell it to actually bind to do all of its streaming on port eight seven six five so let me start it up asking for my root password because of the sudo command so the server is running and I'm gonna show you what happens when you connect the client with all of these debugging options turned on it very fun so can you guys read that you know what it means anyway basically the point here is to show you that there are all kinds of information coming out of there so can you flip back to the slides I'll kind of show you just a little bit of some of the information that comes through slide unless you guys we're still watching that okay so you probably couldn't see it because it went by way too fast so here's what our tsp looks like and this is what so this is the output that you'll get when you when you put it into this mode showing you the connected IP of the fervour showing you the port that the connect that the client connected to on the server 70 70 in this case which is a little interesting maybe that's part of the problem somebody's having shows you the port that the clients using not all that important the URL they used shows you the bandwidth the bandwidth here is two billion in something basically that means that they've got upset tool and it's set to the highest bandwidth possibly ever had their QuickTime Player set to modem it would probably they would say whatever modem rate quicktime player sends back that can be useful when people are complaining about not getting high quality content maybe they've left their quicktime player set to modem speed look at that you can tell immediately what happened also in the user agent feels you can tell what version of quicktime they've got you can tell which OS they're running on which GPU things like that and that could be really useful when you trying to troubleshoot as well the response from described has a couple of little a little less interesting when you're troubleshooting but let's just going to walk go through the red ones here that X except retransmit re transmit that basically tells you that the server and the clients have agreed to do skip protection if you don't see that in the response then it means that they're not going to get to skip protection and they're probably not going to get instant on as you as well so this could be this could help won't tell you what the problem is but it can kind of get you closer to start to determine what the problem is all of that information starting with the V equals sign and all the way down to the red MPEG that's the sdp information I was talking about so this is the description of each track of the movie the format of the movie all that kind of stuff not that useful for troubleshooting usually but sometimes setup request is request that the client makes after so the first request that makes is that describe you saw which is basically the client saying to the server tell me about this movie at this URL comes back client looks through all of that SDP information and it decides which tracks it wants to play doesn't have to play them all and then it sends a setup request for each track that it would like to play so if you look at the setup requests look at the red areas traffic saying here that I want track three of the sample 300k bit movie and then another important thing is that it's telling you which port that it would like you to send media to so this can help you kind of dealing with firewall issues so this is the client telling this river send data to me it on these ports via UDP and then not a helpful troubleshooting but in the response there you'll see this X random data and then underneath that you're going to see about 1,400 bytes worth of random data and don't don't be undisturbed by that so basically what that is that's part of our skin protection technology in the instance on technology we do some active bandwidth measuring measure and width measurement and this is one of the ways we I'm going to determine bandwidth we kind of send this random probe back it out there and then we measure the time it takes to get back that helps us to determine bandwidth ok so that's our tsp now rtcp these are the status package that go back and forth these are coming from the client how do I know that says app right there got all kinds of information in it some of the useful some of it not but it's going to show it and these things come over often every five seconds to 30 seconds or whatever it depends on basically the plot which player you're talking to show you the average will show you the bit rate of the client come the number of packets received the number of packets drop and you kind of kind of monitor these things in real time if you want to a little difficult you probably have to write a tool that actually parsed the out all this output and monitored things frame rate over but for window size these are all very esoteric okay this is a little less esoteric but still pretty esoteric admin protocol so we further supports a protocol that lets you talk to it directly via HTTP to set and get its attributes and to get it get basically at status the server is phenom Victorian it's written in C++ inside the server if you know anything about programming there are all kinds of objects and there's this whole hierarchy of some values that you can grab out of the server because it's http-based though it's really easy to write tools or it just send HTTP requests you get data back you can parse through do whatever you want with it that's what we use for the web admin web admin makes requests parcels it all out generate HTML and puts it up on a web page easiest way to deal with it is probably to use curl or a web browser if you want to kind of get it you know to look at things really quickly without writing a tool and you use pork 5542 conditioner it's pretty straightforward them here for the request looks like it's authenticated so you need to provide a username and password and then your host name and then an attribute path so as I said the servers very modular and object-oriented this is kind of the standard path to get to an attribute that belongs to this to actually to the server itself so modules admin server movie folder here are some curl commands I'm going to actually go over and do a couple of them over here that's what commands would look like that start you see there you can flip back over here so first let me kind of show you curl so curls basically just a command line like it's like client for making requests it can do HTTP FTP I mean all what it does is it just returns things in raw form and it doesn't try to try to format it at all so if I were to curl www apple in a new terminal because I experiment stuff into that one I'm going to get back Apple's website in HTML form right so that's that's basically what Colonel does I'll clean that up so if I wanted to talk to screaming admin server i would i would use curl use the format that i talked about now is notice at the end i put a star stars a wild card that means show me everything inside the server object so I hit that it's going to ask me for the password so there is all kinds of stuff in here so some of this fuel if you're familiar with the QuickTime streaming server programming ap is you probably understand what some of these are am sure most of you or not but it's showing me all kinds of things in the current band width of the server the total connections that it's ever served since its come up the the current bandwidth I really wanted to get even deeper into this take that same command and i'm going to insert a server client sessions i'm still using the wild card there because i want to see all of the sessions and i probably don't have any because i think are well yes it didn't find any so basically what that what i mean i'm not going to continue because i think this is probably not that interesting to people but it would show you a list of all of the current connections they would all have an ID attached to them and then if i wanted to dive down further i could say okay I want to see session number X you can show you all the attributes for that connection so you can remotely monitor your server remotely troubleshoot your server and actually look at what's happening on the server well double client okay how many people are asleep like a slob stuff okay so kind of closing things down here so for more information we've got the road map here a couple of quick times sessions 720 and 722 they did cancel the session Wi-Fi and 3G let the games begin has been cancelled tomorrow if you want to be probably a little bit less bored but it is definitely more tactical the QuickTime streaming server programming session is going to happen tomorrow if you're a open open source programmer that wants to learn about modules you should show up if you just want to know where to start when you're working on the server you are open source project is available to you and modify as much as you like as long as you buy buy apples on open source license John miradas are leading dinner on the server is going to go through in the entire architecture of the server and kind of walk you through how to how to get started on actually modifying the actual source code on the server and we've got a bunch of quick pine sessions and kind of a one to notice the producer listening party with QuickTime we're going to see probably a little more cutie SS publisher there and John's going to do a an mp3 playlist that actually works right thank right okay cool Friday more stuff need to contact anybody about quicktime streaming server anything quicktime quicktime man at apple com Guillermo Ortiz gives you man documentation and I don't see you on here let me back up okay I won't back up but you're not you're not if you're not aware of this we have a couple of mailing lists for the screening sir we have a users mailing list and we have a developer's mailing list the developers mailing list is mainly for people who are actually doing coding on the server writing plugins although a lot of administrators were there too and then the user playlist is more for system administrators and people who are deploying the server go to lift a pecan just search for streaming and subscribe they've they're great list say a massive amounts of good information browse the archives you to understand what I'm talking about and we're and we're all on the list who are trying to be as responsive as we can you
