<body><script type="text/javascript"> function setAttributeOnload(object, attribute, val) { if(window.addEventListener) { window.addEventListener('load', function(){ object[attribute] = val; }, false); } else { window.attachEvent('onload', function(){ object[attribute] = val; }); } } </script> <div id="navbar-iframe-container"></div> <script type="text/javascript" src="https://apis.google.com/js/platform.js"></script> <script type="text/javascript"> gapi.load("gapi.iframes:gapi.iframes.style.bubble", function() { if (gapi.iframes && gapi.iframes.getContext) { gapi.iframes.getContext().openChild({ url: 'https://www.blogger.com/navbar.g?targetBlogID\x3d23884446\x26blogName\x3dJust+Another+Tech+Blog\x26publishMode\x3dPUBLISH_MODE_BLOGSPOT\x26navbarType\x3dSILVER\x26layoutType\x3dCLASSIC\x26searchRoot\x3dhttps://justanothertechblog.blogspot.com/search\x26blogLocale\x3den_US\x26v\x3d2\x26homepageUrl\x3dhttp://justanothertechblog.blogspot.com/\x26vt\x3d-484221019928432923', where: document.getElementById("navbar-iframe-container"), id: "navbar-iframe", messageHandlersFilter: gapi.iframes.CROSS_ORIGIN_IFRAMES_FILTER, messageHandlers: { 'blogger-ping': function() {} } }); } }); </script>

Just Another Tech Blog

Anything and everything having to do with technology, computers, science, and most of all... Linux! The documentation of my Linux endeavor.



Play MP3s and Other Multimedia File in Ubuntu

Saturday, March 24, 2007

So, you've installed Ubuntu, like what you see, and have gotten situated. You decide to put on some music, of course in mp3 form. Wait... what is this "Cannot play media: proper codec not found!". This is an all too common problem that many users experience. And yes, by default, Ubuntu cannot play mp3 files. However, there are many ways to get it so that it can!

The easiest way is just to use EasyUbuntu. " EasyUbuntu is an easy to use (duh!) script that gives the Ubuntu user the most commonly requested apps, codecs, and tweaks that are not found in the base distribution - all with a few clicks of your mouse." It really is that easy. Just download, and then use!

However, I generally don't prefer that method. Here's the method I have used for ages (excuse the hyperbole). This comes pretty much straight from the "Ubuntu Guide".

First, one must add a few extra repositories:
sudo gedit /etc/apt/sources.list
Replace everything with (unless you have added your own sources, which your should leave):
## Add comments (##) in front of any line to remove it from being checked.
## Use the following sources.list at your own risk.

deb http://archive.ubuntu.com/ubuntu edgy main restricted universe multiverse
deb-src http://archive.ubuntu.com/ubuntu edgy main restricted universe multiverse

deb http://archive.ubuntu.com/ubuntu edgy-proposed main restricted universe multiverse

## MAJOR BUG FIX UPDATES produced after the final release
deb http://archive.ubuntu.com/ubuntu edgy-updates main restricted universe multiverse
deb-src http://archive.ubuntu.com/ubuntu edgy-updates main restricted universe multiverse

## UBUNTU SECURITY UPDATES
deb http://security.ubuntu.com/ubuntu edgy-security main restricted universe multiverse
deb-src http://security.ubuntu.com/ubuntu edgy-security main restricted universe multiverse

## BACKPORTS REPOSITORY (Unsupported. May contain illegal packages. Use at own risk.)
deb http://archive.ubuntu.com/ubuntu edgy-backports main restricted universe multiverse
deb-src http://archive.ubuntu.com/ubuntu edgy-backports main restricted universe multiverse

## PLF REPOSITORY (Unsupported. May contain illegal packages. Use at own risk.)
deb http://medibuntu.sos-sts.com/repo/ edgy free
deb http://medibuntu.sos-sts.com/repo/ edgy non-free
deb-src http://medibuntu.sos-sts.com/repo/ edgy free
deb-src http://medibuntu.sos-sts.com/repo/ edgy non-free

## CANONICAL COMMERCIAL REPOSITORY (Hosted on Canonical servers, not Ubuntu
## servers. RealPlayer10, Opera, DesktopSecure and more to come.)
deb http://archive.canonical.com/ubuntu edgy-commercial main

## Listen
#deb http://theli.free.fr/packages/ edgy listen
Save, and then run:

wget -q http://medibuntu.sos-sts.com/repo/medibuntu-key.gpg -O- | sudo apt-key add -
sudo aptitude update


Now, time to install stuff! By installing the following, you can pretty much play any media type:

sudo aptitude install gstreamer0.10-ffmpeg gstreamer0.10-gl gstreamer0.10-plugins-base \
gstreamer0.10-plugins-good gstreamer0.10-plugins-bad gstreamer0.10-plugins-bad-multiverse \
gstreamer0.10-plugins-ugly gstreamer0.10-plugins-ugly-multiverse libxine-extracodecs w32codecs


All that is left, is to find an audio player you like (I like Amarok). Enjoy your MP3s!

For more information, and instructions on how to get files to play withing Firefox, see the rest of the "Ubuntu Guide's" multimedia section.
posted by linnerd40, Saturday, March 24, 2007


3 Comments:

Ubuntu 7.04 which will be out soon, will automatically install the necessary codecs for you!

commented by Anonymous Anonymous, 8:18 PM  

Yes! I have read much about this, and it sounds like an exciting development! It makes Ubuntu even more user friendly.

commented by Blogger linnerd40, 10:06 PM  

also, for those still running previous versions you might be interested in this tutorial on getting all the multimedia codecs all from official ubuntu repositories.

http://ubuntu-tutorials.com/2006/11/24/how-to-install-multimedia-codecs-ubuntu-6061-610/

commented by Anonymous Anonymous, 12:35 AM  

Add a comment