opensource.google.com

Menu

Interesting times for Video on the Web

Friday, April 9, 2010

If I told you that Google had helped fund an ARM code optimised version of the Theora video codec, most people’s reaction would be immediately to skip forward to the next blog entry. Audio and video codecs are the classic example of things that no one cares about, until they don’t work.

Ask most computer users what their preferred video codec is and they’ll look at you as if you asked what sort of motor they’d prefer in their washing machine. “We just want it to work!” they say. In this regard, it’s exactly the same for content creators and publishers. Every visitor to a website that can’t view a video is one set of eyeballs less for a message to get through to. It doesn’t matter how clever the advertising is, how much time is spent honing the message or how many clever viral tricks are deployed to attract surfers to the site, the moment the page opens up with a big blank box where the content should be, all that has been in vain.

So, publish video so it plays back on everything

Nice idea - but far from simple to achieve. At the moment there is no standard way to deploy video on the web. Some sites use Flash, but this restricts them to a viewing audience that have Flash players, instantly excluding most phones. Some use embedded Java players, but this restricts you to a viewing audience running on powerful enough devices to be able to decode video and audio in a virtual machine, excluding anything slower than a laptop. Still others rely on embedded native players (such as Windows Media Player), excluding every platform other than the intended one. Finally some sites just offer videos as links and farm the job out to whatever video playing software the user has (hopefully!) installed on his machine.

None of these meets the seamless “it just works” goal - and none of them looks like it will ever do so in future. Like it or not, the profusion of different web access devices out there means that this is only going to get harder and harder. Once it was enough to make sure your video was viewable on both PCs and Macs. Now you have Android, ChromeOS, iPhoneOS, Linux, Maemo, Symbian and umpteen others. Not only that, you have to cope with a range of processing powers, from desktops to laptops, to netbooks, PDAs and phones. The problem is exploding, not shrinking.

Fortunately, there is some good news in the form of HTML 5. This new version of HTML (the basic language used to write webpages) introduces a video element.

This will allow people to write their websites specifying the appearance of videos in a standard way. How the individual browsers choose to implement the playback is then up to them - whether they handle movies themselves or farm them out to embedded/external players is a decision made by the viewer, not forced back onto the content creator. The even better news is that support for this is already arriving - Firefox, Opera, Chrome, and Safari have already rolled out HTML 5 support and other browsers won’t be far behind.

So, problem solved?

Well, sadly, no. Having a consistent way of publishing video is a great start, but there is still the issue of what format to use. There is no “one size fits all”. Are we surfing the site on a phone with a small screen? Or with a netbook? A desktop? Or on our new 150 inch QuadHD 3D LCD TV? Screen size, connection size and processing power all affect the decision here. In the same way that we’ve seen home video quality improve from VHS to DVD to BluRay, video on the web is going to get better and better. And that’s fine: existing web server technologies can tailor the video tags used to the browser/devices in use.

What is clear though, is that we need a baseline to work from - one standard format that (if all else fails) everything can fall back to. This doesn’t need to be the most complex format, or the most advertised format, or even the format with the most companies involved in its creation. All it needs to do is to be available, everywhere. The codec in the frame for this is Ogg Theora, a spin off of the VP3 codec released into the wild by On2 a couple of years ago. It scores quite well on both the quality and compression fronts, standing up respectably against it’s more popular rivals such as MPEG4, while actually being much simpler to decode. The overwhelming feature that makes it stand out from its rivals is the fact it’s free. Really free. Not just “free to use in decoders," or “free to use if you agree to this complicated license agreement," but really, honestly, genuinely, 100% free. The specification for the stream and encoder/decoder source is available for public download and can be freely used/modified by anyone. Theora was designed and is maintained with the overriding goal of avoiding patents. No other codec can come even close to claiming to be as patent or royalty free as Theora can, whilst still holding a candle to the alternatives.

So, what’s missing?

Video decode is a pretty CPU intensive task. In order to fulfill the dream of being able to work on every device some painstaking effort is required. The complexity of Theora is considerably less than that of many of its peers; other codecs often require dedicated hardware in devices to help achieve performance targets, but with careful coding Theora can be made to run without this. In fact, on desktop/laptops realtime decode can be managed by an embedded Java player (such as the excellent free Cortado), enabling video playback on browsers still waiting to have video tag support added. For the increasing range of PDAs, phones, netbooks, web tablets and media players out there though, this isn’t an option. Rather than having typical power hungry desktop processors in, these devices tend to be built using the much more frugal ARM processors. While these have increased in power in leaps and bounds in recent years, they still can’t compare with their larger cousins for raw computational grunt. These ARM based devices represent the single biggest class of devices still needing work for decent Theora playback. Any efficiency savings we can make feed back directly into being able to cope with larger screen sizes or giving longer battery life.

This is where Google's grant comes in - by helping fund the development of TheorARM (a free optimised ARM version of Theora), they are helping to hasten the day when video works everywhere on the web, for everyone. That’s got to be something to be pleased about. And now you can flick forward to the next blog post.

By Robin Watts, Pinknoise Productions Ltd
.