When Written: Dec 2010
Any discussion about developing with Silverlight always comes round to the question of why? When HTML5 is just round the corner should we all abandon Silverlight, and Flash for that matter and start building HTML5 applications? Currently the development tools for HTML5 are not great in my opinion and one large limitation of HTML5 when using it to display videos is that there is currently no agreements for copyright protection of video content whereas Silverlight, Flash and Apple have already got this covered. It makes sense that providers of video content would be happier having their content shown within one of these systems rather than the current HTML5. Now obviously this issue will eventually be resolved but there currently is no sign of it in the W3C specification.
Talking to people like Mark Quirn at Microsoft UK, their view is that HTML5 is the technology of choice for a public facing web application whereas Silverlight with its greater flexibility and ease of programming is more suited to application development where the user platform is known or it is considered ok to limit the application to run on Windows or OSX devices. I have seen some great Silverlight applications although it currently seems to be suited to data visualisation or video, but I’m sure as the limitations of having secure access to the host system are lifted, we should see a greater variety of applications appear. Whilst adding basic video content to a Silverlight application is a relatively easy process, what a lot of people ask for is how to do live streaming. Live video streaming is something in the past that you might leave to a dedicated company and so this would render it out of question for smaller budget events.
Microsoft has a particular technology called ‘Smooth Streaming’ which differs from ordinary video streaming by dealing with poor network connections by seamlessly reducing the video quality so as to avoid the annoying pauses in the video playback whilst the playback device buffers more content. The BBC iPlayer that we are all familiar with uses similar technology to enable it to deliver video over poor internet connections. The Microsoft solution is extremely easy to implement and will not only stream video to Silverlight clients but now with the latest release, it will stream to iPhone and iPads using Apple’s own video playback technology built into iOS. This means that your content will be available on a wider range of devices than before. The server side parts of the Smooth Streaming system have to run on a Windows 2008 server with of course IIS7 but the Media services are free. The set up is relatively simple and mostly wizard based. Once done there is a quick test screen so you can check that all the relevant services are installed and running.
Once installed the creation of a publishing point for live smooth streaming is simple
Next you need to produce your Smooth Streaming video stream, to do this you need Expressions Encoder 4 Pro, this is a paid for program but at only £69 it will hardly break the bank and there are other encoders out there which will work as well. Expressions Encoder will do more than just Smart Streaming encoding; it can be used for all sorts of video creation. You would run this product on a machine near to the video source. I fired up Encoder on my Windows 7 laptop and pointed the video input to the web cam, I then set the output options to streaming and entered a publishing point which is basically a url on the server that I previously set up, and that is about it.
Producing live smooth streaming content with Expresions Encoder
So to test all was working I pointed a browser at the url of the of the streaming server and I had a live video feed of me looking at a live video feed. Not quite the sort of content that would go viral but I was impressed at how simple it was to setup. You have lots of other options that you can play with, like quality of video and bandwidth limitation so your hosting company doesn’t hit you with a big bill for all the video bandwidth that you have used. You can also add captions and adverts into your feed, and the users watching your feed can also pause and restart the live feed, which is very useful. A new feature is the ability to slow down or speed up the playback whilst still maintaining the correct pitch to the voices on the video. This is all very clever stuff and the ease of set up renders video streaming availability to a lot of areas where before it was just too difficult or too expensive to do.
One of the drawbacks of providing video streaming still is the peaky nature of the medium, and this can put a strain on your servers and bandwidth. Obviously when you are broadcasting a live event you would expect to have the maximum demand on your servers and bandwidth during that event. Afterwards the demands on your servers would drop to almost nothing, so there is a problem of how to have enough servers and bandwidth for that short period without having to invest in a lot of equipment which will for a lot of the time be redundant. In the past this was a tricky one.
But this is where Cloud computing comes in.
With Cloud computing you have access to any number of servers which can be brought online within minutes and similarly taken off line when you no longer need the capacity. Cloud computing is not free by any means, but it does enable your company to host web events that require short periods of large bursts of activity without having to invest in the complication of a large web farm. Microsoft’s Cloud computing is known as Azure and you can use this for Smooth Streaming. This ability to increase the capacity of your web servers based on demand, perhaps created by an advertising campaign, is one of the advantages of Cloud Computing. The other is that it enables smaller companies to provide a level of worldwide capacity that would previously been out of their pockets, which brings me to a problem I have with Cloud computing. The cost. The charges are based on the amount of usage that your web site or web application uses, this is very difficult to judge for many companies and there is a fear amongst many of the companies I have spoken to that in the event of something on their site attracting a lot of attention they could suddenly find themselves presented with a large bill.
This extra activity could even be in the form of an attack like we are seeing on behalf of Wikileaks against the credit card companies. It is bad enough for your web site to be brought down but even worse would be presented with a bill that could bankrupt your company! Those issues aside, for event based web sites where there is a large amount of traffic for a short period then Cloud Computing could offer a viable solution, but for the day to day running of a web site, give me a my own server in a rack at a data centre any day.
Article by: Mark Newton
Published in: Mark Newton