News, ideas and randomness

HTTP Live Streaming for the iPhone

Posted: March 17th, 2010 | Author: Andrew Gleave | Filed under: iphone, mobile | Tags: , , , | 1 Comment »

There are many types of live streaming technology, some with wider adoption than others. Currently, the most widely used platform for streaming media is Adobe’s Flash technology, and is what sites like YouTube, BBC iPlayer and ABC.com use to stream their video content.

However, to watch the stream you need to have Flash Player installed. This isn’t a problem for typical computers – approx. 90% of all computers already have Flash installed – but if you’re an iPhone user, you’re out in the cold. Apple have been very public in their criticism of Flash, and some well-known Apple fans have claimed that it is the “leading source of application crashes on Mac OS X”.

Whether on not this is the case is beside the point, but what is interesting is the technology Apple have developed as an alternative to Flash streaming, for both the iPhone and, more generally, the web as a whole. Not only is it built on existing and well-established protocols and technology, it’s a proposed standard and headed off to the IETF for approval. The best bit of all: it’s very simple.

The technology is called HTTP Live Steaming and is fundamentally very straightforward to deploy. There’s no special / expensive kit required to deploy the stream, and instead uses standard web servers with minor modifications.

Key differences:

  • No streaming software required.
  • No extra ports have to be opened on your firewall as they do for RTSP / RTP.
  • Clients can make use of standard HTTP constructs like caching, load-balancing and expiry headers to optimise delivery to clients.
  • Only needs a standard web server. No extra modules necessary: just add the mime types to your config and you’re done.
  • Clients can dynamically switch between streams of different quality depending on available bandwidth. If you’re on a WiFi network you can be watching a HD-quaity video stream; move to the garden (and 3G) and it can automatically switch to a lower quality stream with no interruption.
  • Can support both live and VOD (Video on Demand) streams.
  • The stream can be encrypted. Therefore, you don’t need access restrictions on the content itself. An authorised client is served a key which enables it to decrypt the stream on the fly. If someone gets hold of the stream but don’t have a key, it’s totally useless.

For the iPhone, or any other mobile device, this is all a great win: you can be on the move, your phone dynamically switching from 3G to EDGE to WiFi as you move around, and your stream will intelligently adapt to give you the best broadcast quality with no drops or stalls. Perfect.

Actually, this is where HTTP live streaming differs from the “progressive download” model where the client incrementally downloads the content as it the stream is being watched: with a progressive download you’re stuck with whatever resolution you chose when you started watching the stream, and if your bandwidth decreases, you stream will stall.

The only real downside is that it’s currently only supported on the iPhone and Mac OS 10.6. However, I can see Apple implementing it in its Windows version of QuickTime and Google implementing it for the Android platform so this shouldn’t be a limitation for long.

Another tangible advantage for this technology is that WebKit has native support for HTTP live streams being used as the source for <video> and <audio> elements. This means you can use live streamed content in your web app as well as in native iPhone applications without the need for any external plugin.

This all adds up to a pretty attractive package, with minimum fuss on both the client and server sides.

Get in touch to find out how we can help you stream audio and video to your iPhone app.


Custom web, Django and mobile development

Posted: February 8th, 2010 | Author: Scott Barnham | Filed under: Company | Tags: , | No Comments »

We started Red Robot Studios in 2008 to develop web-based apps using great technologies like Django. Since then we’ve learned an enormous amount about what it takes to build and deploy large-scale web applications, and as we’ve developed and released our own sites and apps, we’ve increasingly been approached by people who want us to work with them to help them build great sites and services.

We’re still going to be building and releasing our own projects but have also decided to offer our development service to clients as well. We have some excellent clients already and will be accepting work from new clients.

Our aim is not just to provide a normal development service but to help our clients achieve their goals. We want to help and advise based on our experience and go the extra mile to provide really great development services to all our clients.

Our main focus is Django developmentiPhone and mobile development, but we are well experienced in many other areas including things as diverse as WordPress plugins, Facebook apps and Firefox extensions. We’d love to hear about your great idea, so get in touch!