Stream Videos Across the Internet With Apple’s Darwin Streaming Server
If you are interested in streaming media across the Internet using industry standard RTP and RTSP protocols, besides Apple’s QuickTime Streaming Server, you also have the option to use Apple’s
Darwin Streaming Server, the open source version of Apple’s QuickTime Streaming Server which is based on the same code as QuickTime Streaming Server.
Darwin Streaming Server is an open source project intended for developers who need to stream QuickTime and MPEG-4 media on alternative platforms such as Windows, Linux, and Solaris, or those developers who need to extend and/or modify the existing streaming server code to fit their needs. Darwin Streaming Server is only supported by the open source community and is not eligible for technical support from Apple.
Installation & Testing
I installed Darwin Streaming Server on a Windows Server 2003 to see how it works. The installation requires that you have ActivePerl installed on your Windows Server 2003. ActivePerl is available for free from ActiveState. I downloaded ActivePerl’s latest version 18.104.22.1683 for Windows. The MSI file was 12.4MB in size. After I installed ActivePerl, I tested the example scripts and it worked fine. I also used the following TEST.PL script and ran it in my browser. It worked fine.
# ^^^ this must be the first line of the script! ^^^
# start code
my $q = new CGI;
# print header and start the markup output
print $q->header( “text/html” ),$q->start_html( “hello from perl cgi!” );
print $q->h2(“ActivePerl is working…”);
# end code
Here are the basic steps to install and configure the Darwin Streaming Server on Windows Server 2003.
1. Download and install ActivePerl on Windows Server 2003. If you run into some issues, read the Troubleshooting section below.
2. Test the installation by running the example script successfully at the command prompt (c:\perl\eg\example.pl).
3. Save the TEST.PL script listed above in the root directory of the Web site and then test it in your browser (http://localhost/test.pl).
4. Download and install Darwin Streaming Server from Apple.
5. Enable Perl CGI and Perl ISAPI Extensions in Internet Information Services (IIS) Manager (see Figure 1).
6. At the command prompt, run streamingadminserver.pl. It is best to have both Darwin Streaming Server and ActivePerl in the path. If they are not, switch to the directory where StreamingAdminServer.pl file is located and then run StreamingAdminServer.pl. When you execute this command, you won’t see a prompt in return. This is expected. See the Troubleshooting section for more information.
7. In your browser, configure and manage the server at http://localhost:1220. You need to make sure that IIS is running before you can manage the server in your browser.
I won’t go into every setting for the Darwin Streaming Server but would list some of the basic steps to stream videos. Assuming you have configured Active Perl, Darwin Streaming Server and IIS properly, first go to the browser at http://localhost:1220. On the left hand menu go to the General Settings and enter the full path to the Media Directory where the media is located. For example, c:\inetpub\http\videos. This is the master directory where all of your media is located.
Under Port Settings, “Streaming on port 80” is typically enabled. The Playlists area is where you configure your media and make it available for streaming. Here you can create a Playlist for MP3 or Media. Create a “New Media Playlist” and use settings similar to the following.
Mount Point: /movies.sdp
Play Mode: Sequential (or choose a different option)
Repetition: 1 (or enter another appropriate number)
If you copied your videos under the master directory mentioned earlier, you should see all your videos in the left hand window under “Available Content.” Click and drag the movies that you want to stream to the right hand window “Items in the Playlist.” You can arrange the order by moving them up or down. Click Save Changes when you are done. Back on the main Playlist page you will notice that the Available Playlists lists “movies” as your playlist, as shown in Figure 2 below. The status will say “stopped.” Highlight the movies playlist and click on the little triangle to start the playlist. If everything is configured correctly, your playlist status should change to “Playing.”
You should see your videos streamed based on the configuration method you’ve used. For example, if you’ve configured 5 videos to repeat once, they will play one after another and stop after the last video is streamed.
Although ActivePerl was installed and working properly on my server, when I tried to run the StreamingAdminServer.pl file at the command prompt, it failed to execute. I kept getting the error that ActivePerl was not installed. Needless to say that I wasn’t able to successfully access my server at http://localhost:1220, as instructed in the documentation. Port 1220 is the default port used by the Streaming Server.
After spending hours with various settings and looking for troubleshooting help I read somewhere on the Internet that if you try an older version of ActivePerl with the Streaming Server, it should work. The error stated that I must use a version 5.8.0 or later and I was using 5.8.7, which had failed. On ActiveState’s Web site I also found the older version 22.214.171.1248. I tried that but that didn’t help. Fortunately, I stumbled upon another site that had version 126.96.36.1991. I downloaded and installed that version and it did the trick. My Darwin Streaming Server was up and running.
Some people feel that when they run the script it hangs. When you execute this command, you won’t see a prompt in return. This is normal. Simply minimize the command prompt window. DO NOT close the window or else Darwin Streaming Server will stop working.
If your Web site stops working after a reboot and won’t start when you try to start it manually, first stop the Darwin Streaming Server service in Services console, then start the Web service in IIS Manager. It should start without errors. Once the Web service has started, you can restart Darwin Streaming Server service. At that point both your Web site and Darwin Streaming Server should be started and working. If you run into a problem, make sure StreamingAdminServer.pl script is running at the command prompt.
If you have modified your playlist and then saved the changes, you must start the playlist again. It is easy to overlook this so when in doubt double-check to ensure that the playlist has started.
And finally, if things are not working as expected, don’t forget to look at the error log which is located just under the Playlists on the menu (see Figure 2).
Here are some additional tips. When you install Darwin Streaming Server, it installs as a service that can be managed in the Services console. Make sure that the service is configured to start automatically and that it is started. If you start the installation and ActivePerl setup hangs, make sure that you do not have another version already installed. I ran across this problem on one of the servers where I had version 5.8.7 installed and then I was trying to install the version 5.8.6 which eventually worked but I had to remove the newer version first from Add/Remove Programs.
ActivePerl will install the Perl CGI Extension and the Perl ISAPI Extension in Internet Information Services (IIS) but you must enable the extensions manually, as shown in Figure 1 below. The extensions are installed but not enabled. Also, make sure that both Darwin Streaming Server and ActivePerl are in the path. If you’ve looked at your path by typing PATH at the command prompt and then modified the path statement (Control Panel|System|Advanced|Environment Variables), you must close and reopen the Command Prompt window to see the changes. Also, if you can’t access http://localhost:1220 in your browser, ensure that you’ve executed StreamingAdminServer.pl at the command prompt.
If you’ve forgotten your password or would like to reset the password, go to the command prompt (make sure the Darwin Server is running) and type qtpasswd some_user_name, where some_user_name is the name of your choice for the Administrator account for Darwin Server. You’ll be prompted to reset the password. When you logon to the server in your browser with the new password to manage your server (http://localhost:1220), you may also be prompted to change the password for MP3 Broadcast, which by the way doesn’t allow spaces in the password.
(This article was last updated on Sunday, June 25, 2006)