The purpose of this blog is to not get into the technical details of Smooth Streaming but to help architects understand what it is, what you need to implement it and its immense benefits.  For mor technical details look here.

Background

For any application that allows a user to view video there is a fundamental decision that the architect has to make; to stream the media or to do a progressive download.  To restate the high level differences they are as follows:

Streaming

·         Specialized media servers are used to broadcast the media.

·         Allows users to Play, Pause, and move through the video. 

·         Runs on specialized ports to can pose firewall issues.

·         Provides a high quality viewing experience. 

Progressive Download (think the Youtube experience)

·         The media file is downloaded to the client via a web server.

·         Easily works over port 80 so no firewall issues.

·         Can leverage edge servers and cache services.

·         Less expensive then streaming.

·         This is the Youtube approach so the user can get many pauses while the player buffers the content.

Why is Streaming More Expensive

Streaming requires a state-full connection between the client and the media server.  Each media server only has a certain amount of capacity so scaling is achieved by adding extra servers.  Progressive downloads on the other hand treat the media as a file.  What this means is that the files can be spread out on edge servers at a CDN and served from there.  Typically, CDN’s provide these services more economically then hosting the services yourself. 

Introducing Smooth Streaming

Microsoft has created a new technology called Smooth Streaming (or Smooth HD) which allows adaptive streaming of Silverlight content over HTTP.  What this means is that the video file can leverage edge servers and cache services plus the Smooth streaming clientwill automatically detect the clients bandwidth and hardware capabilities and adjust the video quality to give them the best experience.  So, if the bandwidth is low the client will request the lower bitrate version of the subsequent files. 

The following is what you need to deploy:

Microsoft Expression Encoder 3

Expression Encoder 3 (or you can use Expression Encoder 2 SP1) is used to encode the file to the appropriate bitrate and then to break the file into many small files.  These files are deployed to a share that is accessible to the IIS web server.  You may choose to encode the video in 720p HD quality and then again at a lower resolution.  As stated earlier, smooth streaming will determine the best video quality for the client and send those encoded files.  Other vendors have adapted their encoders to support smooth streaming and will be announced soon. 

IIS 7

You need an IIS7 web server to serve and manage the video content. 

IIS Media Services 2.0

Microsoft has created an extension for IIS named “IIS Media Services 2.0”.  It can be downloaded from here and note that if you don’t want to use the Web Platform Installer then you can click on the x86 or x64 links obviously selecting the appropriate one for your platform.  IIS Media Services 3.0 is currently in beta and adds the ability to use smooth streaming with live events.  BTW: this is a free download.

Silverlight

Use the MediaElement element in Sivlerlight.  If you are using Expression Encoder it gives you the ability to generate a player.  You can then change the generated xap file to a zip (just change the extension) and pull out the AdaptiveStreaming.dll.  The details on implementing it into your code are here.  Yes, you do need to do some coding, unless of course you use the player generated by Expression Encoder. 

 

Summing Up the Benefits

By implementing smooth streaming you gain the benefits of:

·         It being cheaper to deploy and operate.  The broken up files can be served for the cheap edge servers at CDN’s.  Also, imagine a 2 hour movie.  If after 10 minutes the user seeks to 1 hour into the movie then the server jumps to the files that make up the one hour mark and forward and serves them.  Since the files seeked past are not served you save bandwidth charges. 

·         Better scalability because the media is really just small files.  If you take image files on a CDN as an example they scale so well because the image files are distributed all over the CDN’s network on cache servers.  The cache servers are super fast and cheap.   Your media files are treated the same way.  The small media files are cached throughout the CDN on the edge servers and served up to the clients. 

·         better customer satisfaction due to the better video experience. Imagine your users never seeing a spinning circle that tells them the video is buffering!

·         your users have fast start up and the ability to seek within videos

·         as a users circumstances change (such as reduced bandwidth) the bitrate can change to give the user a seamless experience