Tuesday, July 30, 2013

libdvdcss2 and w32codecs for Ubuntu

You need codecs (decoders) and software to read the contents of DVDs to be able to see multimedia files of different formats, as well as DVDs. These software are provided free for use in Ubuntu – however due to restrictions on distributing these modules in countries like the USA, they are not always easy to find. This post will tell you how to find them to install them on your Ubuntu computer. The libdvdcss2 package helps you play dvds. The w32codecs package is used to play some media file formats in mplayer, xine etc.

Installation instructions for libdvdcss2 and w32codecs in Ubuntu

To add libdvdcss2 and win32codecs to your Ubuntu installation, you have to add the Medibuntu package repository to your /etc/apt/sources.list file.
To do this, you have to:
1. Edit the file /etc/apt/sources.list using either of the following commands in a terminal:
$gksudo gedit /etc/apt/sources.listto open it in the GUI text editor
or
$sudo vim /etc/apt/sources.listto open it in the Vim command line text editor
2. Add the following lines to add the Medibuntu repository to the file:

## Medibuntu - Ubuntu 6.10 "edgy eft"
## Please report any bug onhttps://launchpad.net/products/medibuntu/+bugs
deb http://medibuntu.sos-sts.com/repo/ edgy free non-free
deb-src http://medibuntu.sos-sts.com/repo/ edgy free non-free

If you are running Feisty or some other release, other than edgy, replace the word “edgy” in both lines above with the name of the release you are using.
3. Import the gpg key for the Medibuntu repository to ensure that the packages are installed without warnings/errors regarding trust:
To do this, run the following command from the terminal:
wget -q http://medibuntu.sos-sts.com/repo/medibuntu-key.gpg -O- | sudo apt-key add -
4. Now update the local list of packages to get the list of packages from the newly added Medibuntu repository:
In a terminal execute the following command:
sudo apt-get update
5. Now you can install libdvdcss2 and w32codecs using the following command:
sudo apt-get install libdvdcss2 w32codecs
Note: There are installation instructions on the Medibuntu page for Dapper and newer that are different - only because the instructions help you create a new sources.list file without mucking around in the old sources.list file. Feel free to follow them instead. I posted the old-style instructions that modifies the existing sources.list file to ensure that the instructions work for everyone - those using Warty(the first release ever) through those using the latest release of Ubuntu.
There are a lot of wonderful packages provided by Medibuntu. Feel free to install any other you like, or might want.

Just in case...

In case the medibuntu repositories go down, you can add and use Seveas' repositories. You will then have to add similar line to the /etc/apt/sources.list file, with the Seveas repository url etc. Seveas' repository has a few mirrors as listed below:
As a quick guide to using Seveas' repository instead of the Medibuntu repository, you should change the lines added to the sources.list file to read like:
deb http://mirror.ubuntulinux.nl edgy-seveas all
deb-src http://mirror.ubuntulinux.nl edgy-seveas all
and the gpg-key add command will now be:
wget http://mirror.ubuntulinux.nl/1135D466.gpg -O- | sudo apt-key add -
The other commands/steps can be modified as neccessary - it is not too difficult to figure it out, and the exercise is left to the reader for now 

0 comments:

Post a Comment