< Day Day Up > |
Streaming Live Events with QuickTime BroadcasterMuch of the fun of streaming media comes from the ability to broadcast live media. DSS playlists, for example, enable you to create your own streaming music or video station and provide around-the-clock programming by continuously broadcasting a stream of predefined content. The drawback to what you've seen so far is that the media must already exist in order to be streamed. To extend streaming to encompass live events, you need two additional components: Apple's QuickTime Broadcaster software (free) and a video input source. Video input can come from any QuickTime-recognized video source such as an iSight, or a FireWire-equipped video camera. If you want to connect live analog video sources to your computer, products such as the Canopus ADVC110 (http://www.canopus.us/US/products/advc110/pm_advc110.asp) provide analog-to-DV connections. Budget-minded users might consider the InterView USB capture device that provides video input for well under $100 (http://www.echofx.com/). After a video source has been established, download the QuickTime Broadcaster application from http://www.apple.com/quicktime/download/broadcaster/. Install the QuickTime Broadcaster package by double-clicking the .pkg file and following the onscreen instructions. Running QuickTime Broadcaster and DSS from the Same MachineThere are two ways to work with QuickTime Broadcaster: either locally from the same machine as the QuickTime Streaming Server or from a remote machine the communicates directly with DSS. The benefit of running QuickTime Broadcaster directly on the DSS-enabled server is that the streaming server administration utilities are QuickTime Broadcaster aware and can control the live stream directly through a web browser. Let's look at this approach first.
After the broadcasting application has been installed, you can create and launch a live stream using the Broadcaster link on the right side of the DSS administration web pages. After clicking the link the first time, you'll be asked whether you want to launch broadcaster, as shown in Figure 25.14. Figure 25.14. The DSS administration web pages can launch and control QuickTime Broadcaster.Click OK to launch the broadcasting utility. After a few seconds, your screen should refresh to show the broadcast settings. If the settings do not appear, wait a few seconds and click OK again. I find that this is necessary about 50% of the time when using the current version of DSS and QuickTime Broadcaster. The settings screen is shown in Figure 25.15. Figure 25.15. Customize the broadcast stream settings.Use the audio and video pop-up menus to choose a preset encoding that best matches your clients network access from modem to LAN, and the type of audio (music/speech) and video (high motion/low motion) you will be transmitting. If you want to disable the audio or video stream, uncheck the Enabled check box beside it. Next, choose a mount point for the stream. Unlike the playlist setup, you should choose a name that includes the .sdp extension, such as TRainingsession.sdp. Finally, provide a buffer delay, if any. This will force the client to buffer a certain number of seconds of video before it starts playing this is effective smoothing over network hiccups during playback. Values of 5 15 seconds are not unreasonable. When your settings are complete, you can click the Start Broadcast button. After a few seconds, the screen will refresh to reflect the Broadcasting status, as demonstrated in Figure 25.16. Figure 25.16. You are now broadcasting your video and/or audio streams live!Your broadcast is now live and accessible via the mount point you specified. For example, when using the TRainingsession.sdp mount point, the streaming URL would become rtsp://<streaming server hostname>/TRainingsession.sdp. To view the stream within your web browser, click the View Broadcast button below the broadcast settings. You can use the other buttons to stop the broadcast or Quit QuickTime Broadcaster altogether. Running QuickTime Broadcaster RemotelyManaging QuickTime Broadcaster through the DSS web interface is nice, but it isn't always practical to run both applications on the same computer. When broadcasting a special event from a laptop or multiple events from different locations, it makes more sense to have a central streaming server and allow remote QuickTime Broadcaster applications to interact with it. To do this, you must first enable QuickTime Broadcaster to write its SDP file on the DSS server. When running locally, this happened automatically, but remote access requires the creation of a special username and password. Granting Rights to QuickTime BroadcasterTo advertise a stream, QuickTime Broadcaster must have write access to the directory were the SDP file is located typically /Library/QuickTimeStreaming/Movies. Earlier you learned how to create a qtaccess file to restrict user access to a directory. Now you're going to use that same file to provide additional user rights to a broadcaster user. To begin, create a new user, such as broadcaster, by using qtpasswd: # sudo qtpasswd -p mypass broadcaster Adding userName broadcaster This adds the new user broadcaster with the password mypass to the qtusers file. You must now modify access to the Movies directory so that broadcaster has write permissions and everyone else can continue to retrieve movie streams and other files as normal. To do this, create a new qtaccess file in /Library/QuickTimeStreaming/Movies/ with the following contents: AuthUserFile /Library/QuickTimeStreaming/Config/qtusers <Limit WRITE> require user broadcaster </Limit> Require any-user This modified qtaccess file provides write permissions to the broadcaster user while maintaining normal access for everyone else. You are now ready to create a remote broadcast. Setting Up a BroadcastTo begin, open QuickTime Broadcaster (path: /Applications/QuickTime Broadcaster.app). When the application has launched, click the Show Details button in the lower-right corner to display all the available options, as shown in Figure 25.17. Figure 25.17. The QuickTime Broadcaster application provides full control over your broadcast stream.To begin configuring QuickTime Broadcaster, review the settings within the Audio and Video portions panes, which re accessible from the buttons along the top right side of the window. Within these two areas, you can choose your audio and video sources, enable and disable their streams, and choose and adjust the codecs that will be used for the broadcast. These settings are virtually identical to the settings we looked at in the "Preparing Media for Streaming" section earlier in this chapter. For greatest compatibility, using the MPEG-4 compressor for both audio and video is recommended. The Preset pop-up menu at the top of the Audio and Video panes will automatically configure MPEG-4 settings based on the type of audio (music/speech) or video (low/high motion) to be streamed and network access method of your clients. If you choose to change any of the settings, you can use the Save Preset option under the Preset pop-up menu to name and add your customized settings to the menu.
After you've chosen your audio and video settings, you must configure QuickTime Broadcaster to talk to your streaming server. To do this, click the Network button to display the Network settings pane, shown in Figure 25.18. You should always use the Automatic Unicast (Announce) transmission type. Figure 25.18. The Network settings pane is used to configure access to the streaming server.Enter the information that describes your streaming server: hostname or IP (Internet Protocol) address, the file (or mount point) to advertise the stream, and the username and password to access the streaming server. For example, my streaming server is hosted on the IP address 10.0.1.118 and I'd like to use the file mystream.sdp as the mount point for the stream. The username and password are the same as what I set up earlier: broadcaster and mypass, respectively. You can also enter a stream buffer value in seconds; doing so will force the client to buffer n seconds of the stream before it starts playing, which should help to eliminate any network slowdown problems. A value of 5 15 seconds is reasonable and recommended. One final network setting is the option to stream over TCP (Transmission Control Protocol); this can result in a higher-quality stream, but with a greater chance of network-induced jitter. After the broadcast has started, the stream will be accessible at rtsp://10.0.1.118/mystream.sdp. Because network streams can be launched from virtually anywhere without a client necessarily knowing who created the stream or what it is, the bottom of the Network pane provides several fields that you can fill in to describe your content and its creator. This is purely optional, but completing it will help provide information to the end user and will serve to brand the content and clear up any potential copyright confusion. Starting and Storing a BroadcastYou are now ready to begin broadcasting your live stream. Directly below the preview in the upper-left corner is the Broadcast button; clicking it will create the necessary SDP file on your remote DSS server and start broadcasting. Before starting, however, you might want to archive the broadcast so that it can be streamed statically from your DSS at a later date. If the stream is not stored, there is no way to retrieve and view the broadcast again after it has completed. To store a broadcast, first open the QuickTime Broadcaster preferences. Use the Recording settings to choose a path for the saved media file along with the name you want to use. Make sure that the Hint for Streaming Server checkbox is selected so that the resulting file will be ready for streaming. Click OK to save the preferences. Finally, enable the Record to Disk checkbox beside the Broadcast button. You can now click the Broadcast button to begin streaming live video and/or audio to your server. Statistics of the broadcast (frames per second, bandwidth, and so forth) will be displayed directly below the preview video during the stream. Click the Stop button to end transmission. Your broadcasting station and server are now complete.
|
< Day Day Up > |