Monday, June 04, 2007

Darwing Streaming Server basics

Streaming Server Setup


The Streaming Server comes in two flavors: Darwin Streaming Server is an Open Source project from Apple. Binaries of Darwin Streaming Server are available for Mac OS X, Red Hat Linux 9, Solaris 9 and Windows 2000/2003/XP. Apple includes QuickTime Streaming Server, a commercially supported version of the server, with Mac OS X Server. QuickTime Streaming Server adds:

QTSS Publisher, content management for streaming media.
QuickTime Broadcaster, a live encoder for live streaming from video/audio sources.
Server Admin, the graphical administration tool for managing Mac OS X Server including the Streaming Server, File Services, Web Services, Mail Services, Directory Services, etc.

QuickTime Streaming Server is formally supported by Apple, while support for the Open Source version is informally provided via mailing lists and on-line resources.

Support and Documentation
Documentation on QuickTime Streaming Server in pdf format is available here (most of the documentation applies to Darwin as well).

A QuickTime/Darwin Streaming Server technology brief in pdf format is available here. Developer documentation is available here. Apple has also posted a good summary of the use and advantages streaming versus http fast-start.
Mailing list support for Darwin Streaming Server and QuickTime Streaming Server is provided informally via the streaming server mailing lists (the users list or the developers list).
Online support resources include the QuickTime section of Apple's support site, and the Streaming Server FAQ.

Download and Install

If you are using Mac OS X Server, QuickTime Streaming Server is already installed. The procedures outlined on this page use the web administration front end for QuickTime Streaming Server. To use web administration you must enable this capability using the Server Admin application in Panther Server. Select the QuickTime Streaming Service and navigate to Access-Settings. Check off "Enable web-based administration", set the password for web administration and save your settings.

If you want to use Darwin Streaming Server, it can be downloaded here. Windows does not include Perl which is required for web administration of Darwin Streaming Server. You can download Active State Perl for Windows here. Make sure to have Perl installed before running the installer on Windows.

Once the Darwin binaries are downloaded, unpack the archive and review the Read Me file, then start the server. On Mac OS X, the server will automatically start after installation. The best way to start the server on Solaris, Linux and Windows is to start up the Perl script that provides web administration:

On Solaris and Linux: /usr/local/sbin/

On Windows: C:\Perl\bin\perl "C:\Program Files\Darwin Streaming Server\"

Note: On Windows it may be necessary to reset the administrative password before running, the Perl administrative server.

You can create/reset the administrative password on Windows with the following command: C:\Perl\bin\perl "C:\Program Files\Darwin Streaming Server\"

Once the Perl process is running you can access the web administrative interface by opening your web browser on the server and opening the URL:

The Streaming Server can reflect live Icecast/Shoutcast broadcasts if you configure a MP3 Broadcast password.

SSL certificate. The server can be administered over SSL if a valid SSL certificate installed. Usually this feature is not enabled during installation.

Media Folder.
This is the "document root" for the streaming server. Media files will be placed in this folder or subdirectories of this folder.

Port 80 Streaming.
The server can be configured to stream over Port 80. If you are not running a web server on port 80 on the same system, it is a good idea to enable this option. This will allow clients to connect to your server through most firewalls.

Once you have navigated through the setup screens, you should see the main window for web server administration on your server. The options configured during setup can be changed in the general settings and port settings panes of the administrative web interface.

Note: You can set up the to automatically execute when your server is started if you always want to have the server running (i.e. by editing rc.local on Linux). On Windows 2000/2003 Server the installer adds Darwin Streaming Server as a service in the Service Manager.

Test the Server

To test your server, go to another system on your network with QuickTime installed. Open QuickTime Player and select "Open URL..." from the File Menu:
Enter the rtsp url to your server using it's IP address and the filename (a sample movie installed in the Movies directory on the server):
The player should open up a stream from your server. Compressed and hinted movies can now be placed in the Movies directory and streamed.

1 comment:

andy said...

Web casting, or broadcasting over the internet, is a media file (audio-video mostly) distributed over the internet using streaming media technology. Streaming implies media played as a continuous stream and received real time by the browser (end user). Streaming technology enables a single content source to be distributed to many simultaneous viewers. Streaming video bandwidth is typically calculated in gigabytes of data transferred. It is important to estimate how many viewers you can reach, for example in a live webcast, given your bandwidth constraints or conversely, if you are expecting a certain audience size, what bandwidth resources you need to deploy.

To estimate how many viewers you can reach during a webcast, consider some parlance:
One viewer: 1 click of a video player button at one location logged on
One viewer hour: 1 viewer connected for 1 hour
100 viewer hours: 100 viewers connected for 1 hour…

Typically webcasts will be offered at different bit rates or quality levels corresponding to different user’s internet connection speeds. Bit rate implies the rate at which bits (basic data units) are transferred. It denotes how much data is transmitted in a given amount of time. (bps / Kbps / Mbps…). Quality improves as more bits are used for each second of the playback. Video of 3000 Kbps will look better than one of say 1000Kbps. This is just like quality of a image is represented in resolution, for video (or audio) it is measured by the bit rate.