This issue needs more attention. Via Steve Makofsky
Codecs are the next DLL hell. While I love Nero Digital's simplicity and quality, the MP4's it produces aren't compatible with most commercial DVD players (due to the AAC or AVC audio). I've tried Dr. Divx - I get audio that isn't in sync with the video. Heck, even the camcorder video I saved the other night as an MPEG had some sort of audio codec problem. The most surprising? Some Windows Media (WMV) files that I've created in Adobe Premiere have had problems showing on my dad's machine. I suspect he has a codec problem of sorts. Codecs are the next DLL hell. While I love Nero Digital's simplicity and quality, the MP4's it produces aren't compatible with most commercial DVD players (due to the AAC or AVC audio). I've tried Dr. Divx - I get audio that isn't in sync with the video. Heck, even the camcorder video I saved the other night as an MPEG had some sort of audio codec problem. The most surprising? Some Windows Media (WMV) files that I've created in Adobe Premiere have had problems showing on my dad's machine. I suspect he has a codec problem of sorts.
Via Chris Lanier:
Another big issue is that these companies want their codecs to decode everything. Not only does the DivX codec from DivXNetworks decode DivX, but will also do XviD and 3ivX decoding. The 3ivX Suite decodes 3ivX, XviD, and DivX. So you get people installing DivX, XviD and 3ivX because they all have different names, and all the decoders can basically do the same thing (which is not always true; decode quality can be very different). Nero and EZ CD Creator also ship with MPEG-4 decoders that will generally decode XviD and DivX. Are you counting how many things on the system can decode the same content? It's too many!Microsoft has always been slow to correctly address these problems, and they really are problems. They can't address or fix people on the Internet being dumb and offering packs of pirated and hacked codecs but I would say a good 60-70% of the problems people have with Windows Media Player are due to codecs. People have issues with Windows Media Center Edition and codecs all the time. The main problem is that a large pool of [uncoordinated] companies are [doing this]. Microsoft should take a stand and do a good job of educating people on what codecs are, what they do, how to find out what codec is used in a file, and where to download the correct codec.
It's an embarrassment that Windows Media Center [in its Windows XP incarnation] is totally dependent on a valid MPEG-2 codec -- it literally cannot function at all without one -- and yet does not ship with one in the box. On Chris' site, there's a response from Microsoft's Ted Youmans that lists the reason I've always suspected: licensing costs.
The problem with shipping an mpeg2 codec in the box is the royalties. When MS includes something it goes out in every copy whether the user will use it or not. Including the codecs would dramatically increase the price of windows to OEM's. These same OEM's already have deals with IHV's to include their mpeg2 decoders and use it as an upsell to customers.Note that a DV codec is almost synonymous with an mpeg2 codec.
I can't say what MS will or won't do in the future, but it isn't quite as simple as just including them.
As to the original post: It's a very difficult problem to solve. DShow was based on the merit system (pun intended) with the idea being that using a combination of the filter’s merit and how specific the media type/sub type is one could reasonably pick the right codec every time. It wasn't really designed for a competing merit nuclear arms race.
Now you can solve it on an application level easy enough, just specify the filter you want and ignore the merit. But how to generically solve it, where any application will always get the "right" filter is quite a bit more complex. The question becomes how do you know what the right filter is? You can't programmatically tell if one has better decode quality than another. Heck, people can't even subjectively agree on what is best.
Test solution 1: within the current framework each user can choose what they want their "default" one to be and raise its merit all the way. If individuals do it, then there is no arms race, but if MS provides a mechanism for you to do it you will suddenly see every new codec with its merit set at the max, and it will all be useless again. So now we need to provide a way to lower the merit of other “unwanted filters”, easy enough but now the system is just as complex as it is today.
Test solution 2: Teach each app writer how to select their own filter and ignore the merit. This way they don’t need to register high, they will get what they want anyway. The problem is this is extra work and they can just get this for “free” by raising their merit. Development time is money. Aside from that there are the generic applications (like MCE) which need to rely on someone else’s codec and they don’t have the luxury of specifying their own unless they present you with a list and ask you to choose.
I really don’t have any answers for you. What I can tell you is that we are (and have been for quite some time) aware of the problem. It is one of our main concerns while designing the next generation of multimedia API’s.
The parallels with DLL Hell are eerily accurate.
I think Ted's response is a copout. Cost? What about the "hidden" cost of all the thousands of codec problem posts on The Green Button forums? Microsoft needs to provide a default MPEG-2 implementation in the MCE box. Yeah, the OEMs may get pissed, but so what? Which is more important: the Microsoft software customer, or some faceless OEM? At some point Microsoft has to take a clear stand for the customer. Nobody else in this random collection of companies has the authority to make that kind of binding decision in the customer's favor.
OEMs will do what is best for them, not for us. Microsoft is the only consumer advocate that can help. If they abdicate their responsibility here, all Microsoft customers lose.
Posted by Jeff Atwood View blog reactions
« It's the IDE, dummy! MAME Cocktail Arcade, documented »
I hear you man, I was so irritated when I first set up my MCE 2k5 box. I had purchased the box, purchased the software, purchased a nice NVidia card, purchased a WinTV card, purchased a remote, and then..... had to buy a decoder. What's with that????
"Yeah, the OEMs may get pissed, but so what? ... At some point Microsoft has to take a clear stand for the customer. ...
"... Microsoft is the only consumer advocate that can help. If they abdicate their responsibility here, all Microsoft customers lose."
I'm pretty sure it isn't the OEMs that Microsoft's afraid of--perhaps you'll remember the antitrust lawsuits in the U.S. and Europe? The governments have ruled that these sorts of things are no longer Microsoft's responsibility, and if Microsoft wants to take a clear stand for the customer than the governments will shut them down.
It's nice now that people are realizing the perverse consequences of the governments' actions, but it's a bit too late.
James on January 10, 2007 04:16 PMMicrosoft Windows Media codecs are automatically downloaded by Windows Media Player, including all Windows Media codec updates. The installation packages on this page are for IT Professionals and network administrators working in environments where corporate firewalls may prevent codec downloads. For general information about codecs and troubleshooting.
Jeremy on February 5, 2007 01:03 PM"OEMs will do what is best for them, not for us. Microsoft is the only consumer advocate that can help. If they abdicate their responsibility here, all Microsoft customers lose."
Next you'll tell me that Microsoft does what's right for us, and not for themselves.
Jon on May 6, 2007 06:34 PMJon, that was not the point of the topic. Anyone who has sat down and tried to convert their VHS movies, capture their favorite shows, or produce family movies into DVDs has also pulled all of their hair out. Encoders are still pretty horrible today. I've tried alot of so called solutions (including the Linux side) and I still hit and miss with them. For an example, I recently purchased a USB video capture device that came with it's own software. Everything I tried to capture had the audio totally out of sync. The company's customer service was sure it was my computers memory. After that they were sure it was my video card memory. Then they were sure it was that I needed to get their latest downloadable upgrade. Then they felt maybe my hard drive was slow. Finally they decided that my DVD recorder speed needed to be set lower. Guess what . . . after all of that, I still had 1 out of every 3 with audio out of sync. What really aggrevated me was their DRM. They listed my captures as MPEG but only their software could access it. I had a capture that I could not convert with another encoder (for troubleshooting). There are numerous codecs out there. You don't realize how many till you crank up MPlayer on a linux machine and get an error message about a missing codec. Then you try to play another video with the same extension and get another error message about another missing codec. You'd think eventually they would settle on one codec type or another (at least for files with the same extensions). Jeff, is this only going to get worse as the DRM war continues?
Ergo on May 6, 2007 09:14 PMI don't see how you could have encoded it to a proprietary format if you in fact encoded it into mpeg files for burnign to DVD. Probably you did not encode it properly or the software simply does not support encoding to DVD (MPEG2).
Now, Linux is something completely different, the linux "community" seem to think they should get everything for free so they crack the CSS and now crack the HD-DVD protection (although the encryption will change), why should any commercial company take linux seriously and create working codecs with that atittude ?
The "codec hell" comes from the fact that 1. there is more than one company in the world doing video software 2. not everyone agrees what the best format is. It's as simple as that. As pointed out a player such as Windows Media Player will automatically download the correct codec, although it wil not download any hacked codecs such as xvid.
The Linux community is not synonymous with DRM cracking and lumping the two together is just plain wrong. And while the original divx codec my have been a hacked solution, xvid itself is not.
KG on May 7, 2007 06:37 AMThis thread is a little out of date, but thought I should add some info to this. The problem is really that in a complicated field such as digital video, the average end user doesn't know enough about the tech to make informed decisions on playback / conversion / authoring solutions. Thus they buy in to marketing ploys, in much the same way that my dad insists he needs Antivirus Product X else his computer will be overrun with hackers who will steal his bank details.
1. The best solutions usually tend to be free. e.g. I have run my system for years with ffdshow, which provides almost all my decoding needs. It is free and constantly updated, as well as being very fast. For newer container formats like MP4/MKV, Haali Media Splitter (Matroska Splitter) is currently ahead of the game. So with the splitter outputting video / audio / subtitle streams (in whatever encoding they were made with), and ffdshow decoding those streams, I need nothing more... Thus haali / ffdshow are staples in my "stuff to install on fresh windows" package. The open-source community has always been ahead of the game in areas like this, due to their consistent drive to fix issues in their spare time and offer the most complete solution for everyone's enjoyment. It is an illusion that you "need" all that commercial software, which like you say, results in codec hell. Not to mention proprietary formats and extensions that don't comply to spec...
2. One of the most common sources of confusion I see is in file formats vs codecs. Quite often I see people assume that because they can play one AVI file, they should be able to play all of them. Not so. Think of it this way... AVI/MP4/MKV/OGM, they're all just containers that are capable of storing different things within them. Some, like AVI, are old and not flexible enough for modern needs (support for certain kinds of streams have to kind of be hacked in there), which is why formats like MKV were born and are becoming widely used by the encoding savvy. This distinction between container and the codecs used to store the various streams inside it is something that tends to be hidden by players, so people don't learn about it. As a general rule though, an MP4/MKV file tends to be chosen to hold H264 video (AVC) and often AAC audio to go with it. An AVI will usually contain something like DivX / XviD with MP3 audio.
OK so this may all seem pretty complicated... It is.
But as mentioned in point 1, there are some great solutions out there to take care of all this for you, and they tend to be the free ones.
For playback you can set it and forget it pretty much, with the occasional update. Encoding your own videos / mastering DVD's has always required further knowledge to get it right, but thankfully there is a wealth of free knowledge out there for that.
www.doom9.org has heaps of guides to get you started if you're willing to take a bit of time to get your toolset figured out. :)
| Content (c) 2008 Jeff Atwood. Logo image used with permission of the author. (c) 1993 Steven C. McConnell. All Rights Reserved. |