Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

Almost every desktop *nix seems to ship without support for MP3 or other popular codecs that you really need.

What is the easiest way to add support for these codecs?

share|improve this question
    
By the way, I've intentionally left this question vague as to which specific *nix I mean, to test how well this sort of question works. If folks decide to close it and think a separate question for each *nix is more appropriate, that is fine. It would be kind of cool to have one resource that answers the question for all distros and OS's, though. :-) –  Sandy Aug 14 '10 at 3:06
    
This question should at least pick a distro, if not talk more about a specific problem. It's subjective by 'popular codecs'. –  xenoterracide Aug 16 '10 at 4:04
    
Also this user started a meta discussion about this –  xenoterracide Aug 16 '10 at 4:10

4 Answers 4

up vote 5 down vote accepted

Our *nix's always recommend free formats over the restricted ones... see the Ogg Vorbis format (lossy) or FLAC (lossless). But if you must have your non-free format supported here are guides for a few *nixs

Ubuntu

Ubuntu has a detailed guide for installing restricted formats. In particular for recent Ubuntu versions it is as simple as opening the Terminal, and executing the following command:

sudo apt-get install ubuntu-restricted-extras

OpenSuse

OpenSuse has a page on restricted formats and links to a 5 minute solution to MP3 support that shows you how to install the Fluendo MP3 decoder.

LinuxMint

On LinuxMint install the "Codec MP3 Encoding" mint file and you should have MP3 support in SoundJuicer.

Fedora

Fedora only supports MP3 through third party repositories. And also has a guide to installing Fluendo.

OpenBSD

The OpenBSD FAQ recommends installing LAME and states that "Lame is included in the OpenBSD ports tree."

MP3 Support included

There are some Linux distros like Slackware that include MP3 support by default.

share|improve this answer
    
I was also looking for a comprehensive answer and I found this article on the wayback machine that explains MP3 install for a few distros. web.archive.org/web/20061117024517/http://linuxmint.com/content/… –  jjclarkson Aug 16 '10 at 22:03
    
On Debian follow use: debian-multimedia.org –  Bauna Aug 16 '10 at 22:10

In Debian based distributions, such as Ubuntu, you first have to enable their non-free package repositories through your-favorite-package-manager.

In synaptic open Settings > Repositories and make sure all boxes are checked.

In apt-get things are a bit more tricky. You'll have to track down the URL for your distro's non-free repository and add it to your /etc/apt/sources.list.

Then install your-favorite-mp3 lib, or simply reinstalling your-favorite-media-player. If that doesn't work, just install VLC, any other media players you have running should pick up and run with the mp3 libraries it depends on.

share|improve this answer
    
In Ubuntu in particular, you have the ubuntu-restricted-extras package which will automatically include support for most of the codecs you miss in a vanilla install. –  zugaldia Aug 16 '10 at 20:34

The mp3 codec is patented through Fraunhoffer AG in the United States (Patent 5,579,430). Deployment of a decoder requires a very small royalty be paid to Fraunhoffer for use of mp3 tech. Use of the codec without payment subjects the creator(s) of the installation to the liability of patent infringement.

  • For paid *nix installs, this shouldn't be a problem; it's assumed it will be included in the price.

  • For free *nix installs, this can be toxic to ship in a "official" manner. Being a "free" install, there would be a burden to cough up royalty money every time someone did a download. Kinda makes it difficult to be "free".

Expect answers to differ on how to best approach this. The free installs tend to take the "not here, go over there, nudge nudge wink wink" approach. There is typically a repository that is "unofficially" maintained by volunteers (always in a country where the patent doesn't apply), which you will need to enable in your local installation to gain access to. Visiting the website or FTP directory for these repositories usually shows an up-front disclaimer that states "If you're in a country that has patents on mp3 tech, you are liable for use of these, yada yada..."

If there is no repository system (such as apt-get or yum) then you're left to your own devices to download the required binaries and/or source, and install them. One such installation would be LAME, which also provides an mp3 encoder.

Debian's approach is rather novel; they ship the toolame library, which uses the non-patent-encumbered mp2 (mpeg audio layer 2) format, which was a precursor to mp3 (mpeg audio layer 3). The advantage to this is that the file format works interchangeably with mp3 players, without any effort or incompatibility. The disadvantage of this is that mp2's are not as well-compressed, so the files tend to be about 10% larger than the same audio compressed as an mp3. Unfortunately, toolame never really seemed to catch on..

share|improve this answer

Unfortunately, I think this is likely to be very distro specific; in general there's probably a package in your package manager that provides the capability, you just have to figure out what the name of it is


On Gentoo there are global use flags:

  • mp3 -- Causes a package to depend on media-sound/lame for MP3 encoding
  • mad -- Causes a package to depend on media-libs/libmad for MP3 decoding
share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.