[Part of an ongoing series.]
I had lunch with my father the other day, and I explained this series as well as I could to someone who didn’t start programming when he was 11. His immediate reaction was, “Why are there so many different formats? Why can’t everybody just agree on a single format? It is political, or technical, or both?” The short answer is, it’s both. The history of video in any medium — and especially since the explosion of amateur digital video — has been marred by a string of companies who wanted to use container formats and video codecs as tools to lock content producers and content consumers into their little fiefdoms. Own the format, own the future. And when I say “history” — well, it’s still going on. Tried to play a Windows Media Video on Mac OS X lately? The codec and container support is out there, but it’s not baked in. Want to watch movie trailers on Apple.com? Please install QuickTime. And so forth and so on. The only thing that was pre-installed on both platforms was Flash, so when a few startups dipped their toes into the Internet video waters, the ones that used Flash Video won despite it being an objectively inferior codec. (Some revision of Flash 9 added support for H.264 video, AAC audio, and the MP4 container, which is what YouTube HD uses.)
So that’s the politics. But there are also technical barriers. As with all engineering, video encoding is primarily about constraints. I can think of 10 just off the top of my head:
<video> element but will only support Theora and Vorbis in an Ogg container — even if your underlying operating system ships with other codecs.…and that’s the short list.
All of which leads me to the Zen of video encoding, which is this:
There is no right or wrong. There is only what works and what doesn’t.
If you can find even one combination of tools, delivery devices, and target platforms that satisfies your constraints and still accomplishes your goals, congratulations. You’re ahead of 99% of the people who’ve tried.
Tomorrow: specifics on common devices/platforms and their limitations.
§
Points two and ten combine to form one of the impressive ironies of media encoding–free codecs are unlikely to ever come preinstalled on a proprietary system, even if it would cost the vendor nothing. (I mused about this elsewhere.) Why would Microsoft play FLACs seamlessly on Vista, when it can nudge everyone toward WMA Lossless? It’s understandable, but it’s horribly frustrating, and it’s a persistent cause of codec headaches that has absolutely no legitimate (technical) cause. (The Xiph.org folks have been putting more effort into their quicktime and dshow plugins, seeing that Windows and Mac compatibility are key, but it doesn’t address the root issue.
Similarly, Linux “is broken!” because it can’t play MP3s out of the box–this isn’t any distributor’s fault, but the people in a position to fix it aren’t likely to do so, because doing so would conflict with their business model without providing any real gain to them. It’s a long-term, intractable problem, and we’ll be stuck with it unless some free codec gains as much mindshare as MP3 had circa 1999, forcing proprietary vendors to include support.
We got to that point with still images with JPEG, but it’s unlikely we’ll an analogous standard in video or audio any time soon.
Or, more succinctly: Free codecs are absent from proprietary systems because the vendors don’t want to include them. Proprietary codecs are absent from free systems because the vendors can’t include them.
One thing I do not like Apple and Sony is they alway use their own closed format. (Try to maintain the margin?)
Apple is lucky to have Steve Jobs.
— Mike ![]()
Nice series.
By the way, if you are desperate to encode something with a file wart on the end named “.mp3″, look at the twolame package, which provides mpeg layer 2 audio encoding. You’ll bloat your encoding by about 10-20%, but the license for this codec is not nearly as bad. If it’s free enough to show up in debian’s massive archive, it may be worth a look.
I forgot to add – many mp3 players will ingest the .mp2 file without batting an eyelid. Useful for encoding something for family or friends that can’t, or don’t, understand the complexity of encoding patent issues coupled with free software.
“Here ya go Dad, enjoy this on your mp3 player.” (hands over mpeg layer 2 file)
“What can we tell non-Googlers?” That would be a neat page to publish to the outside world. (Assuming it doesn’t also have comments along the lines of “You shouldn’t mention $x, $y, or $z.”)
— David ![]()
Actually, most of it is boring and vague, which is why I was so pleasantly surprised that the Youtube section was so interesting and specific.
— Mark ![]()
I am no longer accepting public comments on this post, but you can use this form to contact me privately. (Your message will not be published.)
§
© 2001–9 Mark Pilgrim