The first thing anyone would want their computer to do is to play music. Mp3 is the most common format for storage and distribution of digital music files. Unfortunately, the codec is propriety, so it cannot be distributed free with distros. Some distros like Linux Mint simply give the codec with the distro. Contrary to open source beliefs, most free music on the internet is also distributed in the mp3 format. Installing the codec on a linux distro, while not exactly painful, is an irritating process. It is irritating if you do it the old way i.e. downloading the fluendo package and copying them to /usr/local/lib/codecs.
If your Linux system is connected to internet, you will have no issue playing songs and movies. If you try playing any music file, whose codec is not installed, the default Media player (Banshee or Movie Player) will automatically ask you to download the codec before you could play that file. And after downloading the codecs, music files associated with that codec will play without any problem. But, the thing is, you have to download new codecs for each kind of file format. For example, suppose you are trying to play Mp3 file, and it asks you to download the codec. Once you download the codec, all Mp3 files will start working, but mpeg won’t. You have to again download codecs for mpeg, wmv, mp4, flv and other formats seperately. There is a solution.

Ubuntu 11.04 Natty
Online Method
If you prefer terminal way of working, go to Terminal (Ctrl+Alt+T) and type this :
sudo apt-get install ubuntu-restricted-extras
It will look for the “ubuntu-restricted-extras” package in the software repository, download it and then install it. The Ubuntu Restricted Extras will install Adobe Flash Player, Java Runtime Environment (JRE) (sun-java-jre) with Firefox plug-ins (icedtea), a set of Microsoft Fonts (msttcorefonts), multimedia codecs (w32codecs or w64codecs), mp3-compatible encoding (lame), FFMpeg, extra Gstreamer codecs, the package for DVD decoding (libdvdread4), the unrar archiver, odbc, and cabextract. It also installs multiple “stripped” codecs and avutils (libavcodec-unstripped-52 and libavutil-unstripped-49).
If you prefer to install it graphical way, go to Software Center and enter Ubuntu Restricted Extras. Press ‘Use this source’. Wait for the program to complete downloading.
And then click on install.
Restart the system and most of the music files should work now.
Offline Method
Installing music codecs is only difficult, if you don’t know what to download. Once you know the thing you require to download is “Ubuntu-restricted-extras”, you won’t have any problem. Just google for it.
To make your task easier, I have already looked up one for you : http://www.mediafire.com/?qcm0wzkv59wjn6m (126 Mb)
The above file consists not only music codecs, but lots more common files like fonts and java run time plug ins. If your internet connection is slow and you’d like to download only music codecs then here’s the one for you : http://www.ziddu.com/download/12921112/ubuntu-codecs-pack-10.04.tar.gz.html (19.57 Mb)
Once downloaded, put them in your USB drive and copy them to your Ubuntu system. Now, Extract and read the ReadMe file for further instructions.
Good Luck!

