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.
- 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
<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.