libdvdcss2 and w32codecs for Ubuntu
Posted by Carthik in 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.
Update: The following instructions have been updated & work perfectly fine! Some of the old repositories that do not work anymore have been moved to the very end of this post for archival purposes. Last Updated: April 08, 2007
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.list to open it in the GUI text editor
$sudo vim /etc/apt/sources.list to 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 on https://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:
- http://free.linux.hp.com/~brett/seveas/freenx (Sponsored by Brett Johnson)
- http://seveas.imbrandon.com (Sponsored by Brandon Holtsclaw)
- http://mirror.ubuntulinux.nl/ (Sponsored by Niels Roosen)
- http://seveas.theplayboymansion.net/seveas (Sponsored by Henri Cook (orion-hosting.co.uk)
- http://mirror2.ubuntulinux.nl/ (Sponsored by Peter Lieverdink)
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
Note: These don’t work anymore - they are here more for archival purposes than anything else.
Update: you can add the PLF repository to your sources.list to get the required multimedia codecs and binaries through apt-get (Synaptic).
The line to add to your /etc/apt/sources.list file would be:
deb http://packages.freecontrib.org/ubuntu/plf/ breezy free non-free
After you have done this, do
$sudo apt-get update
Now you can install the following using the PLF repository:
* w32codecs: A package of codecs needed to play multiple formats, notably DivX. (disponible. Maintainer: MirSPCM)
* RealPlayer: Stream player (disponible. Maintainer: keyes)
* libdvdcss2: The library needed to play back encrypted DVDs.(Disponible. Maintainer: MirSPCM)
* Xdtv: http://xawdecode.fr.st - Tv viewer and recorder, the dependancies, and plugins like plug-m (Maintainer: Stéph)
* Free-Go and FreePlayer: logiciels pour freenautes exclusivement (and Linux compatible FreePlayer mods: Homeplayer, FreeMode)
* autopano-sift: http://freshmeat.net/redir/autopano-sift/47274/url_homepage/autopano-sift - Panorama Image compositor (Disponible dans Marillat, Maintainer: Stéph))
* hugin: http://hugin.sourceforge.net/ - you can assemble a mosiac of photographs into a complete immersive panorama, stitch any series of overlapping pictures and much more.
* Divx4Linux: http://www.divx.com/divx/linux/ - Read and create DivX (Période de test. Maintainer: Stéph)
* Varsha: http://varsha.sourceforge.net/ - make DVD slideshows, videos, and interactive menus.
* dir2ogg: http://badcomputer.org/unix/dir2ogg/ - Converts mp3, m4a, and wav files into ogg-vorbis format
* dvdstyler: http://dvdstyler.sourceforge.net/ - DVD Authoring System
* kmplayer: http://kmplayer.kde.org/ - a working player for KDE
* kplayer: http://kplayer.sourceforge.net/ - a working player for KDE
* K9Copy: http://k9copy.free.fr/ - a small utility which allows the copying of DVDs on Linux.
* XDVDShrink: http://dvdshrink.sourceforge.net/ - allows you to create fair-use archival copies of DVD content on single-layer writable DVDs.
* Sharpmusique: http://www.nanocrew.net/software/sharpmusique/ - iTunes music store frontend, already packaged by the author, for Ubuntu Breezy here: http://www.nanocrew.net/sw/sharpmusique/sharpmusique_1.0-1_i386.deb
For the future, if the repositories above are not available, let me remind myself that I can find libdvdcss2 and w32codecs specially built for Ubuntu at the following locations:
libdvdcss2 : ftp://cipherfunk.org/pub/packages/ubuntu/pool/main/libd/libdvdcss/
w32codecs : ftp://cipherfunk.org/pub/packages/ubuntu/pool/main/w/w32codecs/
These two are required for playing dvds and for playing various kinds of media files, such as .avi .wmv etc in Ubuntu, and these packages are hard to find for Ubuntu. The Debian .debs usually work just fine, but it is good to have the Ubuntu .debs for these.
Disclaimer: In certain countries it may be illegal to use these libraries, since they may circumvent copyright laws, and the infamous DRM laws. Also, by linking to these software, I do not seek to encourage their use. Use at your own discretion. For the record, the site I linked to is not mine, and I have no clue who administers it.
Sad world this, where one has to risk violating the law to watch movies on DVDs that one has bought with one’s own money!