Streaming Live Video

Please note that due to changes made by SimpleCDN I can no longer recommend them for a CDN.

Ever since the breakthrough of YouTube more and more people have been interested in video online. The next step is to provide live events around the world for others to watch. In the past this would usually have taken a team of video and computer personnel to produce. As streaming has become more popular the tools to do so have also become more commonplace and accessible. This allows smaller operations to have the ability to stream events live even when the veiwership never breaks 100 viewers without breaking the bank. Lets take a look at some of the technologies used.

 

Formats

To start lets talk about the two dominant streaming solutions: Adobe Flash and Windows Media Video (WMV). WMV has long been the de-facto standard when working with live streaming video. One of the biggest live events that used WMV was the 2007 Live Earth where it was reported over 9 million video streams were served. While the server power behind such a feat is mind boggling it still shows that with the right setup one can truly reach a global audience. At the time MSN had declined to comment how many of the streams were concurrent which is one of the most important metrics when trying to reach a large audience.

Next up is the relatively new format and the subject of this article, Flash, which can utilize the Sorenson (H.263), VP6f, and H.264 video codecs and has support for FLV and MP4 containers. Flash has long been popular but it first became notable when put to use by YouTube to serve all of their videos. While Youtube utilizes primarily progressive downloads the format is quite capable when it comes to streaming. Flash has one of the widest footprints of all video platforms across many operating systems and devices. A newer codec you can utilize is H.264, also called MPEG4 Part 10 – Advanced Video Codec (AVC). This newer more advanced codec can maintain a higher picture quality while using a lower bitrate. The trade off is that it requires the viewers to have one of the latest versions of Flash (version 9.0.115 or newer), and it also requires a more powerful computer to process the video.

While both are capable formats, we will be focusing on Flash for a few reasons:

  • There is an open source solution for a server that has a lot of potential.
  • There is also a number of Flash players that can display the live footage to the world.
  • It is said that 98% of the computers on the internet have Flash.
  • If you are programming savvy and have Adobe Flash you can even go as far as to build your own player

We would recommend starting with the excellent JW FLV Player (utilized on this site) and work your way into skinning it (requires Adobe Flash still) and then program your own player if you still find the need.

Abilities

Adobe FMS 3.0 Abilities 

As you can see, a high-end server with Flash Media Server 3.0 has the potential to serve out to a lot of customers. This is limited by the bandwidth available to the server, and hardware. If you are going over a few hundred viewers you might find it best to utilize one of the all ready established CDNs (Content Delivery Network) that have hundreds of servers networked and ready to take on all of your viewers.

Alternatives to Flash Media Server include Wowza and Red5. Red5 is a free alternative.

What you need

To get started you will need a few things:

  • A camera that can connect and send video to your computer via firewire or USB
  • A computer with firewire or USB
  • A streaming server to connect to
  • Internet connection that can sustain your bitrate to upload to your streaming server
  • A webpage to display your video to the viewers or a link they can put into a media player

Now if you do not have a firewire port on your computer you do have the option of getting a USB Capture box that can take S-Video, or Composite RCA and feed it into the computer.

Streaming Server Options

Now that you have the tools to stream the video, what are you going to stream it to? At this point you have to decide which server option will work for you. If you are streaming in an environment where you need to be able to get quick support you are probably better off going with FMS or Wowza which are both just shy of the $1,000 price mark. If you are OK with tinkering with an open source project and setting it up You can look at the free alternative known as Red5. I was able to successfully setup Red5 on my dedicated server and use its built in demos to stream a nice image to it. I did run into issues when trying to stream 16:9 content which I have yet to resolve. What is important to decide and account for at this time is the number of connections (your audience) you will get for your live stream.

If you have a decent dedicated server with a 2GHz CPU and a GB or more of ram on a 100mbit line it is possible to host around 100 viewers with a decent video resolution. After the 100 viewer mark your milage will vary. If you are looking to host more viewers this is where you will probably be best served by looking at CDNs which can be found on Google. Keep in mind a quality CDN will not come cheap.

The good news is that if you have a dedicated server and a little know how you can setup a free server solution. You can even run the Red5 Solution on a home machine running Windows or OSX but your connection upload speed will probably only allow one or two connections.

The Flow of Data

Flow of Data

The flow of data is fairly simple to follow but it is good to know. First your camera will capture your image and send it to your computer. This will either happen over the firewire connection or via the capture box. This data is fed into the encoder. The encoder is what converts your DV, HDV, or other native format into the streaming format, such as H.264. The encoder will follow the settings you select so that the stream fits your specifications to send it along to your streaming server over your Internet connection. The streaming server picks it up from there to send down to the viewer. Depending on its setup it can redistribute to other servers that are closer to the viewer as well (this is what the CDNs do, for example). From there the Internet takes over and delivers it down the maze of pipes to your viewer’s screen.

Real World Application

Streaming Rack and Camera

One real world example of this would be what we use to stream sporting events at Rollins College. This NCAA Division II school streams a majority of their sporting events for friends and families of the players to watch.

To accomplish this we use a few tools:

We set it up so the camera feeds the DVD recorder. This gives us an instant copy of the game. The DVD Recorder feeds a Canopus box which is the feed for the internet stream. One possible addition to this setup would be a distribution amplifier. This would allow each device to get a clean signal without degradation. Because we are only passing through on device before the internet stream capture the loss is minimal. The stream is then compressed and sent out to a large CDN. In this case we went with a CDN because the average viewership is over 200 concurrent viewers.

Summing it all up

Hopefully this information has given you a small grasp on the huge world of online video streaming as it is by no means a complete view. If you have any questions, comments, suggestions, etc… please feel free to leave a comment or contact us via email.