Anne van Kesteren

Web Video Codecs

Despite mention of codecs being removed from HTML5 for now, I think there is all the indication that this open video thing might actually work. Where with open video I mean a format that can be implemented without having to pay any royalties. I believe it is very important that standards and formats we actively deploy to the Web are both royalty free and documented in enough detail that independent implementations can be made. In terms of usage it seems pretty clear that Wikipedia will be using Ogg Theora and Vorbis. In a previous post on Web video I mentioned Dailymotion. Since then The Video Bay has been announced. It would be really great if YouTube started delivering Ogg Theora and Vorbis as well, but so far Google has not shared much about this. Firefox 3.5 has been released with — based on limited testing — a great implementation of the video element. Opera has announced support for Ogg Theora and Vorbis for a post Opera 10 release. (I suppose we will make that announcement on a non-mailing list place in due course.) Google Chrome will support Ogg Theora and Vorbis out of the box. (Chris DiBona from Google meanwhile explained why Google thinks that Chrome’s usage of H.264 is done in such a way that downstream usage of FFmpeg is not covered by their patent license while still complying with the LGPL by the way.)

The other good news about Theora is called Thusnelda. The Xiph.Org Foundation is working hard on making a better encoder for Theora video. The nice thing here is that the format itself is stable. So an encoder that makes the video more compressed and of higher quality will run fine in existing decoders (e.g. the one shipping in Firefox 3.5). The quality is getting really close to H.264 and is better than older formats which are also still widely deployed on the Web today.

I think the HTML5 specification should make the requirement for Ogg Theora and Vorbis. Everything we do has the risk of patents after all and Mozilla and Opera not being able to commit to H.264 is a red herring. H.264 is not suitable regardless as it is not a royalty free format. And once Ogg Theora and Vorbis support is in browsers and content is encoded using these formats, hardware support for it will most definitely come.

Comments

  1. Can you recommend any good, easy to use, encoders / converters for people completely new to video who currently have flash / mpg / wmv videos that they would like to convert to this open format?

    Posted by Chris at

  2. Well, here's Ian Hickson's take on the situation.

    I considered requiring Ogg Theora support in the spec, since we do have three implementations that are willing to implement it, but it wouldn't help get us true interoperability, since the people who are willing to implement it are willing to do so regardless of the spec, and the people who aren't are not going to be swayed by what the spec says.

    Going forward, I see several (not mutually exclusive) possibilities, all of which will take several years:

    1. Ogg Theora encoders continue to improve. Off-the-shelf hardware Ogg Theora decoder chips become available. Google ships support for the codec for long enough without getting sued that Apple's concern regarding submarine patents is reduced. => Theora becomes the de facto codec for the Web.

    2. The remaining H.264 baseline patents owned by companies who are not willing to license them royalty-free expire, leading to H.264 support being available without license fees. => H.264 becomes the de facto codec for the Web.

    When either of these happen, I will reconsider updating HTML5 accodingly.

    (Emphasis mine)

    Posted by Ast A. Moore at

  3. From a practical standpoint, I think web developers will need to serve up 2 separate videos for now: an h.264 file where it is supported, and an ogg file for the others. I give h.264 preferential treatment because of its hardware support.

    However, if a developer chooses to go with one or the other, they'll choose h.264 because nearly 90% of users have Flash 10 installed in their browser, which means it supports h.264.

    So, as a developer, I can implement h.264 and hit 90% of the market (including mobile devices like the iPhone) while giving a better performance to my users.

    I wish all the best to open formats, but they need to (1) become a standard, (2) get hardware support, and (3) get a good Flash player for compatibility with that other browser.

    Of course, these are all practical standpoints - not the way things should be. Eventually on the web open (or at least royalty-free) formats will win out.

    Posted by Steven at

  4. Well, there's just two things that need to happen:

    1. Xiph.org need to get their butt into gear and make Theora better than their competitors
    2. Google can then hire a team of bad-ass patent lawyers to shift through Theora, just as AOL did for the Firefox trademark

    Hardware and implementation into browsers should follow.

    Posted by James John Malcolm at

  5. Yeah! I'm for OGG in HTML5!

    And the hardware support is not necessary, since OpenCL is approaching. OpenCL implementation should better started developing now. Or it has already?

    Posted by Vytautas Jakutis at

  6. Can you tell me why Dirac didn't make it ?:

    Dirac on Wikipedia

    supposedly from the post from Ian it might have hardware available soon ?

    Posted by Leen at

  7. Vytautas Jakutis, I'm the current video implementor at Opera. Dirac is still not tuned for anything but high bitrate at high resolutions. At lower bitrates it doesn't really degrade well, you get artifacts that are kind of blob or star-looking and quite noticeable. Try playing with a Dirac encoder and you will see. Apart from that Dirac is just very new still, and I don't believe the patent landscape is very well explored yet.

    Perhaps in a few years Dirac can be used, but not right now.

    Posted by Philip Jägenstedt at

  8. The quality is getting really close to H.264

    No, it's not. As Greg Maxwell has had to remind people before, realistic expectations are important.

    No, this does not mean that Thusnelda is useless. No, this does not mean that Thusnelda isn't a tremendously important project. But it does mean that Theora is simply not in the same class as H.264. Improvements to the encoder, while vital, are not going to change that.

    Posted by grendelkhan at

  9. What about a pluggable video codec system, you start off without codecs, but when you need one, the browser searches for that particular codec, and downloads it(or asks to download it)

    Posted by me at

  10. Theora is pretty crappy. I hope for their sake that Thusnelda can improve the quality such that it's no longer an embarrassment.

    But increasingly people are getting used to HD quality, so we should be seriously looking at Dirac. I'm aware it's young and has some limitations, but I would say it's the future and it's a lot more promising.

    In the meantime, Google's choice for FFmpeg/H.264 is interesting.

    Posted by Ben at