We are in the process of building out our own streaming video server at the school, and tinkered around with Darwin from Apple for a bit. While it ended up not being the product we are going to stick with because it needs a completely different link structure than http, and it is difficult to embed, actually you can’t embed any videos on a web site we have gone past the software. In the mean time, installing Darwin is very simple on Amazon Web Services, so here is a quick how to do this.
Since I am running from a windows box, you might need to follow the instructions here on how to connect to a Linux AMI using windows tools. If you are using strictly windows that is ok, and you can find those instructions here at Dave Winers blog by clicking here.
Make a directory for where you want to drop all your video server software on the server you are working with. In this case we were very simple and used the word “video”.
Once you have the directory made, check the rights of that directory (upper right hand corner, RWXR-XR-X) is a good place to start. But some installation software might need RWXRWXRWX (777) when you run the installation script for the software. The next step is to copy over all your software.
Once the copy is done, you can then start working on the installation. Again we used Darwin, which can be downloaded from the Apple site for free.
You will need to login to your AWS management console because you will need to open up your firewall for the specific ports that Darwin needs to run. This is really the only way to change the firewall settings on your server. While yes you can do it from the command line, you will also need to do this with your security groups in AWS.
Darwin needs 1220 open, so we added this to our firewall settings. Because we didn’t know where anyone would come from, we didn’t restrict who could access the server. If you are going to stream videos to the world, you do not want to restrict the source IP’s.
Then you want to open Putty (or other terminal command line program, but I recommend putty) and do the install by running the install script. Once the installation is done, you should check to make sure that the service is running by doing a ps – ef |grep DarwinStreamingServer as shown below.
Here is some bad news, the Darwin server needs to bind to Port 80, if you are running apache, then you will have to proxy through 8000 or 8001 (per the setup configuration file) to serve videos. You might also get this error:
RTSP/1.0 400 Bad Request Server: QTSS/5.5
This s because Darwin does not use http, rather it needs the link to start with RSTP, and even then it won’t work in a browser, however it will work great if you open the URL in your QuickTime player as shown below.
It took about an hour to build out Darwin on Amazon Web Services and getting it running even with the associated pitfalls when working with software you have never installed before. This includes all the firewall setups, and actual installation of the software. It was truly very easy to do and if you are interested in working with Darwin in the cloud, could be something that is worth doing. The major pitfall is to make sure you are using a flat non LAMP (Linux, Apache, MySQL, PHP) server for this so that Darwin can bind to port 80 and not contend with Apache.
Related articles by Zemanta
- Cloud Computing for Developers (aws.typepad.com)
- Using the Cloud to Design Your Startup Computing Infrastructure (cloudave.com)
(Cross-posted @ TechWag)