Monday, May 10, 2010

{Video codecs} The HTML 5 dimension

This post is the first in a three-part sequence on video codecs. Click here for the next post in the sequence, "Accusations flying in the aftermath of Steve Jobs' email".

All of the recent activity surrounding video codecs is undoubtedly related to the question of which codec(s) will become part of the HTML 5 web standard or, in the absence of an official standard, will evolve into a de facto standard in connection with HTML 5.

HTML 5 will be the first version of the web markup language to have <audio> and <video> tags and XML-based interfaces for controlling media players.

W3C requirement for patent-free (or at least royalty-free) standards

The W3C has so far only allowed standards definitions that are, to the best of the W3C's knowledge, unencumbered by potential obligations to pay patent royalties. The W3C recognizes the important role that Free and Open Source Software has played in the field of Internet infrastructure and would like as much Internet software as possible to be available free of charge.

The W3C's current set of requirements leaves only two kinds of options for W3C standards:
  • patent-free standards (which may be the case if a standard was published before anyone might have filed patents on it, in which case the standard could be used as prior art to invalidate patents filed by others later)

  • standards for which licenses to all relevant patents are available on a royalty-free basis
Licenses to the undisputed market leader in web video, the H.264 standard, are available from the MPEG LA patent pool firm on commercial terms. The need to pay royalties makes H.264, despite being a de facto standard, a non-option for the W3C under its current set of rules.

Browser makers divided into two (if not three) camps

Some browser makers, especially Mozilla, Google and Opera, would like an open-source codec such as Theora to become part of HTML 5. While the availability of those codecs on open-source terms seemingly ensures compliance with the W3C's requirements, proprietary vendors such as Apple and Microsoft consider the patent situation surrounding such formats unclear. They are, however, comfortable that those who obtain a license to H.264 from MPEG LA are reasonably safe from patent hold-up.

Microsoft's Dean Hachamovitch stated the following in a recent post to the official Internet Explorer blog:
The biggest obstacle to supporting more than H.264 today is the uncertainty. When there’s industry consensus and confidence that the uncertainties are resolved, we’ll be open to considering other codecs. Until then, we’ll continue with our current plans to deliver great HTML5 video in IE9 with certainty for consumers and developers.
The proponents of Theora and similar formats believe the major proprietary vendors are just spreading FUD (fear, uncertainty, doubt) against the "open" approach. Accusations of this kind have been leveled just again following Steve Jobs' email. In the subsequent part of this sequence of posts, "Video codecs: accusations flying", I will discuss the more recent statements.

At this stage, a further division into three camps (H.264, Theora and VP8) is actually more likely than industry-wide consensus in favor of one format. VP8 belongs to Google, which acquired its maker, On2 Technologies, this year.

Living in a multi-codec world

A single standard video codec for HTML 5 would simplify things. An HTML 5 web page could then include a tag such as
<video src="">
and the video (specified by its Internet address) would be played. It would have to be available on the server in only one format in that scenario.

In a situation in which different browsers have support for different codecs built in, web sites that wish to display video to users of different browsers will need to keep their video content available in all of the formats required to support all of the (relevant) browsers.

In order to make sure that browser A is provided with a video encoded in format X and browser B with the same video content encoded in format Y, the server will have to make a distinction. Since browsers tell a web server their name and version number, such a distinction is possible. The server can then either provide different versions of an HTML page -- with different addresses (URIs) attached to all those <video> tags in order to offer different files to different browsers -- or can use the same URI and then provide the video file in one format or another. Presumably it would be more efficient to provide different URIs (but then there can be problems if users of different browsers share not the URI of the web page but of the video file itself).

Absent an agreement on a standard HTML 5 video codec, plug-ins will continue to be relevant

Originally the World Wide Web Consortium (W3C) believed that standardized <audio> and <video> tags and interfaces could greatly reduce or even ultimately eliminate the need for media player plug-ins. However, the W3C's authority is limited: it is a well-respected and influential organization, but it does depend on support from the major browser makers.

Those couldn't agree last year on the inclusion of a standard codec in the HTML 5 specification.

As a result, it is expected that different browser vendors will make different decisions, and multimedia plug-ins are likely to continue to be relevant for some more time.

With plug-ins, it is possible to make all video codecs available for all browsers. Such plug-ins could support only one format each (in which case one would -- and could -- install multiple plug-ins to watch different formats), but the most popular ones, such as RealPlayer, support a multitude of formats anyway.

I understand Microsoft's position as saying that if third parties wish to display Theora videos in Internet explorer, they can provide a plug-in for it if they wish.

FOSS advocates would obviously prefer the adoption of Theora as a standard by the W3C and all major browser makers. In that case, users of open-source software wouldn't have to install closed-source plug-ins in order to be able to watch web video in the most popular format (which right now is, and probably continues to be for some time, H.264) and content providers could make Theora videos available on their servers without having to require Internet Explorer and Safari users to install a plug-in. But the adoption of Theora looks like a long shot now.

After analyzing some of what's been said in the debate in the following post, I will later outline my thinking (in the last part of this sequence of posts) on video codecs, including what I believe the W3C may have to consider at some point.