I’ve been meaning to write about the Linux codec problem for a while now but didn’t have a good enough reason, but I recently listened to the (not-podcast) The Linux Link Tech Show, episode 233 where one of the guys (apparently Dann, but for the life of me I can’t distinguish between them on the broadcast) discusses his new Eee PC (the tiny Linux laptop that has taken over the world or at least the blogosphere), and how it handles video playing.
To sum the Linux codec issue for people who haven’t been listening – it is one of the major hurdles for “Linux on the desktop” (the effort to have Linux operating systems be a viable Desktop operating system for everyday users). One of the key parts for providing a good desktop experience is being able to play multimedia files that users get regularly through email and the web. To be able to play a video or audio file you need a good player (and that Linux has plenty) and the software codec (“enCOder/DECoder”) that understand the file format and can play it. Different file formats – such as MP3, AVI or WMV – require different codecs from different manufacturers, and for legal reasons these are not always available out of the box with your choice of Linux operating system.
Anyway, the comment that prompted this post is at about time code 1:35.10, where Dann discusses how the Eee PC handles viewing videos, and of course it boils down to codecs being available, which they aren’t out of the box in the Eee PC’s built in operating system (a variant of XandrOS):
I went out and I took my Fluendo codecs and I put them on here and they worked well. I went across seas to Denmark, and I installed the windows win32 codecs – to see if they would work, in a country that I can legally do that – and they worked and I deleted them promptly and came back to the United States.
Gahhh ?!? can’t they even discuss how to use codecs properly without doing this “I went to a country which has sensible laws so I can try something”?
From listening US residents (not really Americans, as in Canada this problem is much less apparent) talking about codecs it sounds like none of them would touch this topic without surgical gloves and a few 10 foot poles.
I think this is because there is great confusion on about those legal reasons I mentioned above, and what is allowed and not allowed (and the companies that have commercial interests in such codecs benefit from increasing the confusion instead of resolving it). so I’m going to discuss this rationally, but first a primer on the current situation:
Currently available options
- Operating systems usually do not come with codecs that let you play video and audio and you have to install them separately. There are only a couple of exceptions, namely:
- MS-Windows XP: comes with: MP3 codec licensed from the patent holder on MP3, all of the Microsoft codecs (WMV,WMA,VC-1), and Microsoft implementations for some MPEG4 codecs under license from the MPEG licensing association (can’t remember their name right now). Notably missing are all the DivX/Xvid codecs that are very popular and AAC which is the MPEG audio format and is becoming really popular – These you have to install yourself. Also needing a separate installation are more fringe codecs such as the Ogg family of free software codecs.
- Free software codecs: a few codecs that were developed entirely in the open by the free software community and are believed to be not encumbered by patents(1) – such as FLAC and Ogg – these are usually available with most Linux operating systems.
- 3rd party software vendors that develop their own codecs (for example Real and Apple) distribute their codecs only as part of their software application bundles, and such software offers are either only available for Windows/MacOS-X or the software is available for Linux users but it does not integrate with Linux media frameworks(2) and so files encoded with such codecs can only be played with the vendor’s software.
- Two prominent Linux media tools – VideoLAN and FFMPEG – have jointly developed their own versions of codecs for all the important media codecs and these are available for download from their respective web sites. FFMPEG is also known as libavcodec or lavc, and is used under that name by many video conversion applications.
- The popular cross-platform media player MPlayer can use codecs built for MS-Windows on all operating systems, and its developers have collected native MS-Windows codecs from the respective software bundles that carry them (including from Microsoft software) and are making them available as a bundle for use by win32-codec capable players. This is known as the win32codecs or the MPlayer codec pack
- Fluendo – a software company that makes a streaming media server – has an online shop where they offer for download codecs that they have developed and have licensed from the respective patent holders. Some codecs from the shop has a cost for download, others are free.
Lets look at what we can do
If we look at the above options, we can see that there are two main problems for using media codecs under linux: Copyright (in the codec software) and patent issues (I’m not going to talk about DMCA as its only relevant for DVD playback and anti-DRM methods. I can discuss this in a different post if you want). Very few people try to look at these problems separately, but if we do we’ll notice that the MPlayer codec pack is the only solution that is hindered by copyright issues. In the past the MPlayer codec pack was the easiest and best way to get your Linux desktop to play popular media formats such as MPEG4, but now this is not the case and the MPlayer codec pack cannot be legally distributed by anyone as it contains software protected under copyright. And this is true no matter in which country you are: using the MPlayer codec pack is illegal.
Once we got that out of the way, we are left to examine the patent issues. From the above list the options for Linux desktop users are basically down to using the VideoLAN/FFMPEG codecs or buying from Fluendo – the other option is using the Real media player for linux for most of your media needs, which is a terrible solution, or getting a legal copy of multimedia software for MS-Windows (including a copy an MS-Windows operating system) and ripping the codec libraries from there yourself – not a viable option for most users.
Fluendo’s codecs are obviously not encumbered by patent issues – they are licensed, and I’m sure the Fluendo would like every Linux user to visit the Fluendo shop and buy the codecs, but at 28 Euro for the full pack (which does not include the popular DivX/Xvid codecs) I doubt many users would find it appealing. That being said, a Linux operating system vendor can probably strike a deal with Fluendo for a volume license and add MPEG and Windows Media support to their operating system. It doesn’t make sense for most Linux vendors as they make their operating system available for download free of charge, but for some its a viable solution – for example Mandriva’s powerpack edition comes with the Fluendo codec pack and a licensed DVD player. It is still unclear to me why XandrOS didn’t go this way with their Eee PC operating system – surely they get payed by ASUS for each Eee PC box they sell – Microsoft gets their cut for each Eee PC that is sold with an MS-Windows CD.
What can you get for free?
For Linux operating system vendors that distribute only a free version (i.e. Fedora) or have the same version for both paying customers and free download (i.e. Novell SuSE), paying Fluendo for each download is not an option, so why aren’t they distributing FFMPEG?
This is indeed about patents – interested parties have tons of patents that relate to media playing, and while nobody has yet to sue the FFMPEG project for distributing software that potentially infringes on such patents, its clear that the minute a large Linux vendor tries to distribute it, they’ll get in very serious troubles.
So this is the reason why you don’t get a side dish of codecs with your Linux distro – but what does this have to do with the ability of Joe Schmoe to download FFMPEG for their Linux distro – the same as any MS-Windows user downloads codec packs to get DivX working? Nothing at all!
Microsoft for obvious reasons, as well as Fluendo for the only slightly less obvious reasons, would want you to believe that using FFMPEG for playing all your favorite media file is illegal, but it is completely bogus! Patents allow an owner of a patent to prevent someone from selling or even distributing technology that infringes on their patents, but they are not allowed to stop anyone from using such technology! If you can legally get software that infringes on some patents, as a private user(3) you can very legally use it.
FFMPEG cannot be distributed by residents of the United States as it contains software that infringe on many US patents, but the same patents do not hold in other countries that have a more sensible patent system (and do not allow for patents on software). So a website in Europe (for example) can offer users to download FFMPEG legally, and even US residents can download these files as it is legal to download files from Europe, and there’s no law (in the United States or elsewhere) that prevents people from getting and using FFMPEG this way – or even to talk about it on their podcasts and blogs and recommend that other people do the same.
How to get FFMPEG for your operating system
To sum up all this – here is how to get your Linux desktop to play media files:
Fedora users need to go to Livna and click on the “repository RPM” for your version, and install it (using “system-install-software”). After you do that you can use “add/remove programs” to install ffmpeg or any other media thing that you want. To get all the standard Fedora media tools to play all your media files, install
Ubuntu users need not to worry about anything – when you try to play a media file using the Ubuntu movie player, for which you don’t have a codec, Ubuntu’s codec buddy would pop up and offer you to install the required codec for you.
Mandriva Powerpack users should have support for most media codecs out of the box using the Fluendo codec pack that comes built-in. For missing codecs and for Mandriva Free Edition users – go to Easy URPMI and choose your version and continue to step 2. In step 2 mark “free” and “non-free” under the “Penguin Liberation Front” section and choose your mirror from the drop down. You can check the “use compressed index” for faster download but less details in the RPMDrake software manager. In the next screen you get a few lines in a box – you can either do what Easy URPMI recommends and copy them to a terminal in super user mode, or easier – open Mandriva Control Center and click “manage software source” (or something similar), click “Add” and copy just the URL from each line (there should be one for “plf-free” and one for “plf-nonfree”) in to the text box – one at a time. Then in “add software” you can add the FFMPEG support packages.
If you have instructions for other operating systems, do share and I’ll post them up here.
- “believed” as in – “you can’t really expect us to do a full patent disclosure process with a free software budget, and regardless what we think is immaterial, a lawyer opinion carries more in a court of law” [↩]
- Linux’s equivalent of Microsoft’s DirectShow [↩]
- and possibly as a corporate user as well, I’m not sure and IANAL [↩]