Video support

2010-03-30

Consider this a pre-emptive blog post about video where I vent some frustrations ;) (I've rewritten this blog after getting some feedback on my first attempt.)

So I've been messing with HTML5 Video the past few days. Putting together a fancy demo, just for the heck of it. Will post more on that later.

When trying to explore some strange new technology, you want to see how the different implementations handle their implementation. The problem with video is that the whole market is completely segmented. There are namely two codecs being fronted for; ogg (Theora) and mp4 (H.264). I've been corrected by Sander... it's actually Theora (which is usually found in an ogg "container" and MPEG-4 (found in an mp4 "container") which is H.264. It's kind of puzzling for me so I'll just leave it at that.

There are basically two camps... Theora and H.264. Theora is backed by the open source community and H.264 by companies like Apple, who hold part of the patents involved. They are (obviously) incompatible with each other.

The problem is patenting and license fees. The patents for H.264 is held by the MPEG. They issued a license for H.264 that guarantees no fees for some end-users (that's probably you though) up to 2016 (after which anything could happen) but not everyone and not every company or browser vendor. This is of course an issue as nobody wants to pay just because they published or allowed someone to publish a video in a certain format.

The other codec, Theora, has no patents right now. For as far as possible, it's guaranteed to be free of licensing fees. I say possible because there might be unknown "submarine patents" swimming around that might surface. If that is the case, Theora could be facing the same problem (maybe worse) as H.264...

As for us, the techies who want to play with html5 <video> early, we're basically in between this browser war. We want to play around and test our videos, but to do this you have to create two or three encodings of the same video. Luckily the video element supports this through the <source> tag, but that's no very reassuring. For the demo I've created, I was able to convert a youtube movie to Theora through tinyogg.com (there are a few others around). I was unable to find a proper recoder for H.264 and so I've been unable to test my demo in Safari because it doesn't support Theora. Chrome, which should support both Theora and H.264 was unable to play my Theora video (so much for early adopting) and Opera (which only supports Theora) also choked on it. Firefox (only Theora) has no problem. I really hope these issues will be resolved when the spec is finalized because having a video play in one but not another browser will only add to the whole problem...

Thing is, my demo uses video and frame processing and uses a really optimized webworker. It's performing fair in Firefox, but I wanted to see what it would do in Chrome and Opera (both claiming to have the fastest Javascript engine). No such luck now though, as I don't know what the problem is. I'm not a video buff and I don't know what exactly is wrong with the encoding, or how to fix it. #cry

Whatever happens next, I hope one video codec will be chosen and I really hope it'll be free of charge. I think it'll end up like GIF though and both pushed away by some unknown third codec. Or maybe the spec won't be finalized within five years, by which time submarine patents should no longer be possible to be hidden (so I was told) and it could be certain that usage is free for anyone and everyone.

Browser wars over? Don't count on it.