Ever since Google’s acquisition of On2, the open source community had been looking to them for a resolution to the HTML5 video debacle. On2 are the developers of the VP3 video codec, which is behind Theora and are also the creators of VP6, the format that was used for web video with the Flash Player. Now On2 has another web video standard to its credit, VP8.
Hopefully the debate will soon be over; a clear format for web video has emerged - WebM
So what was the debate all about anyway?
Well, since the HTML5 specification included a video element
, there was required to be a standard format in which the video could be encoded such that it would play on all browsers. Browser developers would then have to honour that in order to keep up to the standard.
H.264 was a clear winner when it came to quality and is a format already used widely on the web. Adobe’s Flash Player too included support for this format making it lucrative for its smaller size and higher quality. The format also has wide support in hardware, with most Nvidia and ATI chip-sets supporting hardware decoding along with support in many devices.
Problem is, H.264 is heavily patented
, and has a rather expensive license. While the specification is open
, and anyone can create an encoder or decoder, such software needs to be licensed.
Even open source projects such as x264
cannot be used to legally encode video unless a license is acquired.
on the other hand is a completely open, and royalty-free specification which can be implemented by anyone. For a while, Theora was an alternative for web video, however it was shot down by Apple and Nokia, as they were concerned that there might exist submarine patents on Theora. Also, an important factor was that Theora was just not up the the mark in quality.
Due to all this, the HTML5 specification backed out from supporting any particular web video format, and each browser vendor went its own way. Mozilla and Opera stuck to open standards, and decided to support only Theora for web video, while Apple’s Safari, and Google’s Chrome supported H.264. Google’s Chrome browser also supported Theora for web video along with H.264. Microsoft too came out to state that they would support H.264 in their browser.
What this meant was that for a content creator to reach all audiences with HTML5 video, they would need to have it in both Theora and H.264; which places a huge burden in terms of storage and encoding. Since H.264 was already prominent and supported in the Flash Player, it could possibly give a near 100% audience penetration. Unfortunately since Mozilla was committed to never support H.264 in Firefox there was a deadlock, with no clear video format for the web.
So what’s changed now?
WebM is Google’s solution out of this video mess. Simply put, Google open sourced the VP8 video format, and released it royalty free for everyone to include in their products. As a video format, VP8 is much better than Theora, but not as good as H.264 is. Even so, it is now royalty-free and an open specification, making a good enough replacement.
Google has announced the WebM format for delivering web video, and has already begun converting their YouTube collection of videos to VP8. They have also got support from a wide range of organizations, from browser vendors to encoding services.
Google has announced WebM support in Google Chrome, and other browser vendors are not far behind (actually a little ahead). Mozilla has already released a preview version of the Firefox browser which includes support for WebM video. Opera software has also released a lab build of their Opera browser which supports WebM video. In fact even Adobe has announced that they will support the WebM and VP8 video format in their Flash Player in an upcoming version.
Most importantly, Microsoft has announced that they will support the playback of VP8 video in their Internet Explorer 9 browser, provided the codec is installed on the user’s machine. Not an ideal scenario, but it could be worse.
What is VP8, what is WebM, what’s the difference?
WebM is developed with a with a very narrow goal in mind: A WebM file should play on any computer, and on any media player. It has thus been defined to only include the VP8 codec and the Vorbis audio format. These files are packed into a Matroska container. So while WebM is the format of the video file, the actual video inside the file is in VP8 format.
Basically, there are three things involved here: a video format, an audio format, and a container format.
The video format is what is used to encode the video bit of a movie - H.264, xVid / Divx and VP6 (in Flash video), and Theora are all video formats. Google has opened the VP8 video format, which is a specification for the algorithm which compresses the image data in a video.
The audio format is what is used to encode the audio bit of a movie. MP3, AAC, FLAC, Vorbis are all audio formats. For their new web video specification, Google has decided to use Vorbis, which is comparable in quality to even the latest AAC audio standard. Vorbis is a free and open format. There was never much contention about this, Vorbis is a capable audio format free of patent issues.
Finally there is the container. The container is what is used to bundle together the audio and the video into one file. Avi, MP4, Mov, Ogg, and MKV are all container formats. A container defines how the audio and video are synchronized and combined together in the same file. Google has based the new WebM format on Matroska (MKV). Matroska is a popular open source container format which is known to be one of the most flexible formats for video. The range of features supported by MKV is unparalleled: multiple video tracks, multiple audio tracks, multiple subtitles tracks, support for virtually any audio or video format, streaming, attachments, even menus! Unfortunately there are few or no media players which support all features.
As said before, WebM is a just Matroska which is locked to VP8 for video and Vorbis for audio, and this narrow definition is to ensure playback compatibility with all computers and browsers.
How does it stand up to its alternatives?
First of all, it’s alternatives would be Theora and H.264 (technically also Dirac which is an open royalty-free video format by BBC). A lot in the quality of video is decided by the encoder and not just the specification, and the encoder is still a little immature, since this is its first public release.
Compared to Theora it is a big step ahead
. Keep in mind that Theora is a format also based on an On2 codec, VP3. As you can see, VP3 is 5 versions behind VP8, and although that isn’t a measure of quality in itself, this just goes to show how old the codec is.
The real comparison though, is with H.264 since that is currently the popular choice for web video. Apple and Microsoft have been pushing for H.264 quite a bit, which is understandable considering that they have licensors of the format, and stand to gain from it. However this is not to say that the H.264 format is not superior.
H.264 is superior to the VP8 format, however the gap between H.264 and VP8 is not as gaping as that between H.264 and Theora. An argument against Theora would be that it would require much more storage and bandwidth for the same quality video as H.264, however this is not the case with VP8. VP8 is not out to replace H.264 on Blu-rays, however for internet video it’s quality is sufficient.
What this means for the Open web?
Everything! Until the release of VP8 there was no agreed format for web video. Google has built enough momentum for VP8, by simultaneously announcing support in most browsers and by most companies from hardware support by AMD, ARM, and NVidia to support from online video ventures Brightcove, Skype, and Encoding.com, and by announcing support for WebM video in YouTube, that the format can’t just be shot down.
Even now, by adding the simple “&webm=1“ parameter at the end of a URL when searching for videos on YouTube you will see a number of videos which are already available in this new format. Of course you much be signed up for the YouTube HTML5 video experiment
(www.youtube.com/html5) to play back this video, and must have a supporting browser.
In a short period of time, support for VP8 will be available in open source libraries such as ffmpeg and Gstreamer; DirectShow filters for Windows are already available. A larger number of VP8 and WebM tools are available NOW, from encoders and decoders to the SDKs, such that people can begin encoding in it already, instead of having to wait. While the encoder itself is in its early unoptimized state, the specification is finalized and better encoders / decoders will come in time.
For those without new browsers which support HTML5 and WebM, Adobe’s support for VP8 in the Flash Player will only mean that VP8 content can fall back to the Flash Player in case the browser does not support HTML5 video or the VP8 codec.
In effect, Google has made the Open web possible, and feasible.