This document describes how to use PlayListBroadcaster, a new feature available with QuickTime Streaming Server 1.0.2 Update. PlayListBroadcaster lets you create a virtual radio station or TV broadcast that to users appears to be a live broadcast of the media.
With PlayListBroadcaster you can use the QuickTime Streaming Server to broadcast QuickTime media from a play list, which is a text file that lists the media files to broadcast. You can broadcast the media in the play list once through the list sequentially, repeatedly through the list sequentially, or randomly.
If you broadcast the media randomly, you can specify a weight for each media file in the list. The weight, which is a number from 1 to 10, determines how often an item plays. Media files that are weighted as 10 play more often than media files that weighted with lower numbers. In addition to using weights, you can prevent a media file from playing again until a specified number of other media files play.
To broadcast a play list, you use the PlayListBroadcaster command to start the process. The PlayListBroadcaster process is a separate process from the QuickTime Streaming Server. The PlayListBroadcaster process can broadcast the media from one play list only. However, you can run the PlayListBroadcaster process as many times as you want to broadcast other play lists.
Note: Each PlayListBroadcaster process requires approximately 2 megabytes of memory.
As PlayListBroadcaster broadcasts a play list, it can keep a log of the media files it plays. You can use the log to help you account for the media that is broadcast.
To use PlayListBroadcaster, you need to prepare the QuickTime media for streaming. In addition, you need to create two other components that PlayListBroadcaster requires:
When you have prepared the media, play list, and broadcast description file, you can execute the PlayListBroadcaster command to start the broadcast. If you broadcast the media repeatedly or randomly, you also use the PlayListBroadcast command to stop the broadcast.
Setting up to use PlayListBroadcaster
To use PlayListBroadcaster, you need to prepare the QuickTime media, create a play list file, and create a broadcast description file.
Preparing the QuickTime media
You can use PlayListBroadcaster to broadcast any media that the QuickTime Streaming Server is capable of streaming. For more information about the types of media you can stream, see Server Administration Help on your Mac OS X Server. To see the Help, open the Server Administration Help (named ServerAdministrationHelp.help) located in /System/Documentation/Help.
To prepare the media you need to do the following:
Be sure all the media files contain the same type of media; for example, each file includes a sound and a video track.
Format the media in each file in the same way. For example, use the same size for each file that contains a video track.
Use the same encoding for each file.
Be sure each item is a hinted QuickTime movie optimized for the server.
Note: To hint a QuickTime movie, you can export it from QuickTime Player and select one of the hinting options in the export dialog box. To optimize the movie for the server, click Options in the export dialog box. If the Hint Exporter Settings dialog box appears, select the Optimize Hints for Server option. If the Movie Settings dialog box appears, select open the pop-up menu below Prepare for Internet Streaming and choose Hinted Streaming, then click Settings to see the Hint Exporter Settings dialog box.
Creating the play list
The play list text file specifies the media to use in the broadcast. The list can consist of individual media files or other play list files. To specify a media file, you need to provide a complete or relative pathname to the file.
For individual media files, the list should include a weight. The weight is a number from 1 to 10. Items with a weight of 10 play more often than those with lower numbers.
To create a play list, you can use any text editor, such as TextEdit on the Mac OS X Server, to type the information for each item included in the play list. Then, save the text file where you can locate it on your server.
Here's an example of a play list file containing individual files with weights and another play list
# Lines beginning with "#" are comments
# individual media files weight (1-10)
#---------------------------------------
/music/jazz/take5.mov 2
/music/rock/freebird.mov 9
/music/reggae/onedrop.mov 5
# path to another play list
#---------------------------------------
/music/classical/playlist.txt
# relative path to another play list
#---------------------------------------
<<TBD>>
# individual media file with space
#---------------------------------------
/music/jazz/"ice cream love.mov" 9
Note: If the pathnames include spaces, enclose the pathname in quotation marks.
Creating the broadcast description file
The broadcast description file is a text file that specifies how the media should be broadcast, the play list file, the IP address of the QuickTime Streaming Server, and other information about the broadcast.
To create a broadcast description file, you can use any text editor, such as TextEdit on the Mac OS X Server, to type the information needed to broadcast the play list. Then, save the text file where you can locate it on your server.
The information you need to enter in the broadcast file includes the following:
Play List (play_list_file): The complete or relative pathname of the play list file you want to broadcast.
Play Mode (play_mode): The method you want to use to broadcast the media files. You can specify one of three modes:
sequential
sequential_looped
weighted_random
If you specify sequential or sequential_looped, PlayListBroadcaster broadcasts the media in the order it appears in the list.
If you specify weighted_random, PlayListBroadcaster broadcasts the media in random order using the specified weights to broadcast how often an item plays.
Destination (destination_ip_address): The IP address of the QuickTime Streaming Server you are using to broadcast the media. The default destination is the QuickTime Streaming Server on the same computer as the PlayListBroadcaster.
Destination Base Port (destination_base_port): The base port number for the broadcast. If you do not specify a base port, PlayListBroadcaster uses the default port (5004).
If the media you are broadcasting contains several tracks (for example, video and sound), then each track requires a port. PlayListBroadcaster uses the destination base port number you specify as the starting port number, then assigns an incremental port number to other tracks automatically.
Important: Each track of each broadcast must use a different port number. If you are streaming more than one broadcast of multi-track media from your QuickTime Streaming Server, be sure to assign base ports so that tracks do not play on the same port.
For example, if you use the default destination base port for a broadcast in which the media has three tracks (video, audio, and text), then the broadcast will use ports 5004, 5005, and 5006. If you want to broadcast another stream, then you should set the destination base port to at least 5007.
Allow Repeats (allow_repeats): If you broadcast a play list using the weighted_random Play Mode, you can use this paramenter with the Repeats Queue Size parameter to prevent media from playing until a number of other files have played.
This parameter can have one of two values:
enabled
disabled
If you enable Allow Repeats, then files play repeatedly based only on the weight you have assigned to each one.
If you disable Allow Repeats, after a file is broadcast, it will not be available to play again until the number of files specified by the Repeats Queue Size parameter have played. Of course, it may not play again immediately because PlayListBroadcaster will broadcast any available media randomly.
Repeats Queue Size (repeat_queue_size): If you disable Allow Repeats, you use this parameter to specify the minimum number of files to broadcast before allowing a file to play again.
SDP File (sdp_file): The complete or relative pathname of an SDP file in the movies folder used by the QuickTime Streaming Server. You must specify an SDP file. If the SDP file you specify doesn't exist, Play List creates one.
Logging (logging): You use this parameter to specify whether or not to keep a log. It can have one of two values:
enabled
disabled
Log File (log_file): The complete or relative pathname of the log file. If you enable logging but do not specify a log file, then Play List creates a log file with name of the broadcast file followed by ".log" in the same directory as the broadcast file.
Here's an example of the items for a broadcast file:
destination_ip_address 12.345.678.901
destination_base_port 5004
play_list_file /server/local/media/lists/playlist1
play_mode weighted_random
allow_repeats disabled
repeats_queue_size 10
sdp_file /server/QTSS/movies/playlist1.sdp
logging enabled
log_file /server/local/playlistlogs
Starting and Stopping PlayListBroadcaster
To start, you use the PlayListBroadcaster command. You also use the command to list existing Play List broadcasts and to stop broadcasting a play list.
Starting to broadcast a play list
To start broadcasting a play list, type the following command in a Terminal window:
PlayListBroadcaster broadcast_filepath
where the "broadcast_filepath" is the complete or relative pathname of the broadcast description file that describes the play list you want to broadcast.
Listing broadcasts
To stop a broadcast, you need to specify an index number. If you are broadcasting more than one play list, you need the index number of the play list broadcast. To see the index number of the play lists that are broadcasting, type the following command in a Terminal window:
PlayListBroadcaster -list
This lists all the PlayListBroadcaster broadcasts that are currently running. Here's an example:
1: /music/classicalradio.txt
2: /misc/randommovies.txt
3: /music/reggaeontheriver.txt
The number at the beginning of each item is the broadcast's index.
Stopping a play list broadcast
If you are broadcasting one play list, then type the following command in a Terminal window to stop broadcasting it:
PlayListBroadcaster -stop 1
If you are broadcasting more than one play list, list the broadcasts that are currently playing then type the following command in a Terminal window:
PlayListBroadcaster -stop broadcast_index
where "broadcast_index" is the index of the broadcast you want to stop.
Connecting to the broadcast
To connect to the broadcast, users need the appropriate client software that can play QuickTime media, such as the QuickTime Player. They can also use Internet browser programs, such as Microsoft Internet Explorer or Netscape Communicator, if they have the QuickTime Plugin installed.
You will need to provide users with the URL for the QuickTime Streaming Server and the SDP file that connects to the Play List broadcast.
Solving problems with PlayListBroadcaster
If the media in the play list is not being broadcast:
Use ProcessViewer to be sure the PlayListBroadcaster process is running. If it is and the media is not being broadcast, you may need to stop and restart the process
If a user cannot connect to the broadcast:
Be sure the user's computer has installed QuickTime 4 or later. If the user is connecting to the broadcast using a Web browser, be sure the QuickTime 4 Plugin is installed correctly for the browser.
If the correct software is installed, be sure the user has the correct URL
Be sure the broadcast file has correct IP addresss, base port, and pathname for the SDP file
If the media in the play list is not broadcast randomly:
Be sure the broadcast description file specifies that the play_mode parameter is weighted_random.
If the media plays once then stops:
Be sure the broadcast description file specifies that the play_mode parameter is sequential_looped or weighted_random.
If the media isn't presented correctly:
Be sure the content, format, and encoding of the media is the same for all files in the play list.
If the presentation of the media is slow:
Be sure each media file is an optimized hinted movie.
<<TBD: Need error codes.>>
© 1999 Apple Computer, Inc. All rights reserved. Apple, the Apple logo, Mac, and Macintosh are trademarks of Apple Computer, Inc., registered in the U.S. and other countries. Netscape Communicator is a trademark of Netscape Communications Corporation. Microsoft Internet Explorer ?