One of the things we do most on our systems is play music and movies. If you buy a computer without an operating system and then install your own operating system one of the details you normally have to take care of is installing codecs to play mp3 files and DVDs.
Despite the scary name codecs are easy to understand, coder/decoder. Most people use codecs for decoding media. Like operating systems there are a variety of codecs you can choose from. There are also codecs to encode/decode audio and codecs to encode/decode video. Popular audio codecs include FLAC, Dolby’s AC3, AAC, and MP3. Popular video codecs include H264, Huffyuv, and Dirac.
Codecs are sometimes patented by companies. This means that often someone has to pay the company with the patent on the codec in order to use the code to decode/play something stored in that format (or to code/store something in that format). If you don’t pay the patent holder then you either don’t get their codec or you have to reverse engineer the format and write your own coder/decoder software/codec to play the format. It’s for this reason codecs often don’t come with an operating system. Operating system writers don’t want to step on the toes (get sued) of codec patent holders.
Luckily in Ubuntu Linux it’s very easy to install codec support for mp3 playback and a variety of other codecs. Simply open up a terminal session and type:
sudo apt-get install ubuntu-restricted-extras
The ubuntu-restricted-extras package includes mp3 codec support, but also includes a lot of other “restricted” software such as java, some truetype fonts Microsoft once released (and then immediately tried to take back), and importantly a package that includes libdvdread4.
DVD playback is one more step. It doesn’t need to be an extra step, but because it’s actually illegal in some countries to decode a DVD using “unapproved” software (think of it this way, the movie industry is writing your laws making it illegal for you to do something so they can make a buck) this extra step is necessary to get DVDs to play in the standard Ubuntu Linux Totem Movie Player. Again at the terminal type:
If you’re using a really old version of Ubuntu Linux you might need to change the pathname from libdvdread4 to libdvdread3. Also this command won’t work if you’ve just freshly installed Ubuntu – you have to either install ubuntu-restricted-extras first or install libdvdread4 first. This command is a shell script to install libdvdcss which takes care of the encryption on many DVDs. Unfortunately there are some DVDs that are just so laden with protection techniques that they can’t be played back without software the movie industry has approved.