Creating and Managing Playlists via the Web

Introduction

Darwin/QuickTime Streaming Server support playlist broadcasting. This feature provides a way to stream files from disk as if they were being broadcast live. The web interface can be used to create and manage playlists. Clients tune in on playlists like other live broadcasts, and they appear as live events when accessed. Note: QTSS Publisher can be used to dynamically create and manage playlists on Mac OS X Server.

Preparing media for Playlist Broadcasting

All audio tracks in Media Playlists must use the same encoding, sampling rate, compression, and bit rate. All video tracks in Media Playlist must use the same encoding, compression, bit rate, and frame size. All MP3 files in MP3 Playlist must use the same sample rate. For more information on compressing media for streaming see this section of the site.

Logging in to the Web Administrative Interface

To log into the web administrative interface directly on the streaming server, launch your web browser on the server and opening the URL:

http://127.0.0.1:1220

To log into the web administrative interface from another system on the Internet, launch your web browser on the server and opening the URL:

http://<serverIP or DNS name>:1220

The enter the streaming administrator's username and password:

Creating and Editing Playlists

Click on the Playlists link in the sidebar of the web admin interface. MP3 Playlists are delivered via the Shoutcast Protocol (over http). Movie Playlists require hinted .mp4, .3gp or .mov files. MP3 Playlists have a musical note icon, while Movie Playlists have a film clip icon. The window will display any previously created playlists, their status, and provide buttons to create new playlists or remove existing ones:

When you edit or create a new playlist, you are presented with the following window:

At the top of the window, enter a name for the Playlist (for reference). The mount point will be added to the url of your server to tune in on the playlist. In the MP3 Playlist, specifying the mount point "/blues" means that clients would tune in on http://g5panther.demo.edu:8000/blues. Movie Playlists should include the extension .sdp. A Movie Playlist with the mount point "/movies.sdp" on the server above could be tuned in with QuickTime Player using the URL rtsp://g5panther.demo.edu/movies.sdp.

There are three play modes for a playlist:
Sequential
The Playlist will start at the beginning, play through each file, and stop when the last item has been played.
Sequential Looped
The Playlist will start at the beginning, play through each file, and repeat this process over and over. Looped playlists will play indefinitely until stopped.
Weighted Random
The Playlist randomly play files on the list. The weighting on individual files can be set from 1 to 10; 1 being the lowest and least likely to play. Weighted random playlists also use the Repetition setting. This number determines how many files must play before a playback of a file is repeated. Weighted random lists will play indefinitely until stopped.

To add new media to your playlist, navigate to the directory with the media in the left pane of the window. Then drag and drop the media file into the playlist. Remember the guidelines above about preparing your media.

Playlist activity can be logged if required and sent to another server for scalability. The save button is at the bottom of the window. Changes won't be saved unless you scroll the browser window and click on this button.

Starting and Stopping Playlists

To access playlists, click the Playlist link on the left side of the administration window. If you have just saved a playlist, this window will automatically appear. Click on the small icon next to the playlist name to start or stop the playlist. In the following example, we have received a warning icon next to the playlist:

The warning icon indicates that there is a problem with our playlist. In this case, some of the media in the playlist is encoded differently. The specific problems identified by the playlist broadcaster can be displayed by clicking on the alert icon:

The playlist error log displayed above is a useful tool in debugging playlist problems. In this case, there were two movies with problems that won't be played because of the problems indicated. Removing these files from the playlist and restarting it will clear the alert icon.

Playlists from the command-line

The web interface creates Playlist directories and files in the Playlists directory where the streaming server was installed. Each playlist directory will have files with the name of the playlist, and the following extensions:
.playlist
This file is the primary playlist file. Inside the file the individual files in the playlist will be listed followed by their weight (for weighted random playback).
.err
This file is will log any errors with the playlist. It is a useful file to analyze when trouble occurs with a playlist.
.log
This file is the playlist log file. If you have enabled logging on the playlist, this file will log activity.
.current
This file contains the name of the currently playing file. It can be useful when creating custom interfaces to Playlist broadcaster via web applications.
.upcoming
This file contains the name of the file that will play next. It can be useful when creating custom interfaces to Playlist broadcaster via web applications.

The web administration front-end calls PlaylistBroadcaster. It can also be called from the command-line. The command-line options for PlaylistBroadcaster are:

usage: PlaylistBroadcaster [-v] [-h] [-p] [-c] [-a] [-t] [-i destAddress] 
                           [-e filename] [-f] [-d] [-l] [-s broadcastNum] filename
    -v: Display version
    -h: Display help
    -p: Verify a broadcast description file and movie list.
    -c: Show the current movie in the log file.
    -a: Announce the broadcast to the server.
    -t: Send the broadcast over TCP to the server.
    -i: Specify the destination ip address. Over-rides config file value.
    -e: Log errors to filename.
    -f: Force a new SDP file to be created even if one already exists.
    -d: Run attached to the terminal.
    -l: List running currently broadcasts.
    -s: Stop a running broadcast.
    filename: Broadcast description filename.
Documentation on how to create a config file is online here.

For example, this config file:

playlist_file /Users/joeuser/Documents/test.playlist
play_mode sequential_looped
destination_ip_address 127.0.0.1
destination_base_port 9000
sdp_file /Library/QuickTimeStreaming/Movies/test.sdp
logging disabled

Combined with this playlist file:

*PLAY-LIST*
"/Library/QuickTimeStreaming/Movies/Eisenhower_Kennedy.mp4" 5

Can be started up from the command-line with the command:

sudo PlaylistBroadcaster -f -d test.config

Note: Running attached to a terminal session (with the -d flag) is a good way to troubleshoot problems with Playlists. The PlaylistBroadcaster command could be called by server cron jobs for scheduled broadcasting.