May 20, 2007

We have recently been tasked with the development of a streaming media server to stream videos YouTube style. The concept of a streaming server YouTube style is a bit of a misnomer though. You see, streaming servers are based on streaming server protocols. You can’t “stream” over HTTP protocol, if you’re going to actually stream video you need to stream it over RTMP. There is a small problem with streaming over RTMP, the default port is port 1935. This port is pretty much blocked by all major service providers, which would leave us with either requesting that all users, who wanted to stream video, open that port on their firewall or going the HTTP route.

If you have ever tried to get a network administrator to open a port you would know that it is easier to debug windows. In the wild, our service wouldn’t stand a chance. Even the much touted YouTube does not stream video, it buffers it on the viewers machine and then plays it back.

So we went the HTTP route which left us with another problem. Our users wanted to be able to stream very long documentaries, unlike the YouTube market which rests at around 10 minutes per upload, we were looking at around an hour or so of footage at a time. Not many people would sit for 35 minutes waiting to get 35 minutes into the documentary. They must be able to go back and forth. In a streaming scenario, this isn’t a problem, the server downloads whatever footage is being played back, in our buffering scenario you had to wait until everything before the section you wanted to watch had already been downloaded.

After a bit of searching around and reading many forums, we came to our pseudo streaming solution. Using a Lighty Server optimized for static content and installing a module called ‘mod_flv_streaming’, we were able to create a pseudo streaming solution that allowed users to only download the section that they wanted to watch while at the same time getting the widest possible accessibility by ‘streaming’ the videos over HTTP (port 80). The solution is a bit more optimized than YouTube in terms of efficiency and capability.

UPDATE: I’m going to link to this comparison of ten video sharing services even though he has missed out on a couple of top notch services. Could be time for someone to do another comparison [linkbait alert].