Saturday, August 6, 2011

Install Restricted Multimedia Codecs in Ubuntu

Some codecs like libdvdcss2 are restricted due to its proprietary nature. They are required to play dvds. To install them in Ubuntu, you can add the medibuntu repository and do an apt-get.
1. Add the repository
sudo wget$(lsb_release -cs).list --output-document=/etc/apt/sources.list.d/medibuntu.list
sudo apt-get -q update
sudo apt-get --yes -q --allow-unauthenticated install medibuntu-keyring
sudo apt-get -q update
sudo apt-get --yes install app-install-data-medibuntu apport-hooks-medibuntu
2. Install the necessary codecs:
sudo apt-get install w64codecs libdvdcss2
You can install w32codecs as well.
3. Done.

Also you can install the mplayer essential codecs package
wget  #download the codecs
tar -xvjf all-20110131.tar.bz2 #decompress (expand)
sudo mkdir -p /usr/lib/win32 #make win32 directory under /usr/lib
cp -R all-20110131/* /usr/lib/win32 #copy the contents to it