View the Most Wanted LQ Wiki articles.
LinuxQuestions.org > Linux Wiki > Installing Codecs

From LQWiki

Jump to: navigation, search

This guide is meant to be a way to generically install Linux codecs on virtually any distribution. It should keep the New User in mind, and not get too technical without explanation.

Codecs cannot come pre-installed on most Linux distributions because of patent and/or copyright issues.

Installing these codecs should allow you to play most video and audio files you can find on the internet. (avi, mp3, mov, etc.)


Contents

Quick Steps

  1. Go to the "Binary Codec Packages" section of this page http://www.mplayerhq.hu/design7/dload.html
  2. In the table on that section, find and download the "Linux x86" file from "US".
  3. Unzip/Untar the file on your system. (tar -xjf filname)
  4. Copy or move the contents to this location /usr/local/lib/codecs/
  5. You should now be able to play the latest Videos, Audios, and Streaming Media.


Full Guide

Go to the Webpage

The Codecs you need can be found on the download page of the Mplayer website, located at http://www.mplayerhq.hu/design7/dload.html


Locate the Download Section

Scroll down the page until you see section "Binary Codec Packages" in large print. Below the "Binary Codec Packages" there will be a table with the headings "DESCRIPTION HTTP FTP BT".


Download the Codecs

On the left side of the table is a selection of codecs for PC (x86), Macintosh (PPC), AMD64bit, and other architectures. Through the center, you will see different language selections for these available codecs. These look like "[ CH | HU | US | RS | KR ] [ CH | HU | RS | KR | DE ]". The "US" selections are for English speakers.
Selecting which file to download:
  • If your machine is a PC, download the file across from "Linux x86" marked "US". (If you are unsure, choose this option.)
  • If your machine is a Macintosh computer, download the file across from "Linux PPC" marked "US". (Unless you have an Intel CPU/Processor, then you will choose [Same as choice above] the "Linux x86" row, and "US" option.)
  • If you have a newer AMD64bit (or Intel 64bit?) Processor computer, download the file across from "Linux AMD64" marked "US".

Unzip/Uncompress the Codecs

After downloading the file, you will need to uncompress the contents. You may be able the easily uncompress the file by:

  1. Opening the directory where the file is located with your File Manager(explorer). (Nautilus or Konqueror)
  2. Right-click on the file and choosing "Extract".

If you are unable to extract the file this way, you will have to use a command line/terminal to extract the file. CLICK HERE FOR THE COMMANDLINE INSTRUCTIONS.


Install the Codecs

After you have the file extracted/unzipped, you will need to copy them to the proper location. This must be done as 'root' user (aka administrator).

To install them as 'root' user with your File Manager (Nautilus or Konqueror), run the following from a terminal:
  1. Open a terminal and run your File Manager as root:
    • gksu nautilus
    or
    • kdesu konqueror
    or
    • sudo nautilus
    or
    • sudo konqueror
  2. Go into the directory ("Desktop/essential-20061022/"?) that was created by extracting the file (essential-...tar.bz2).
  3. Highlight(select) all of the files in that directory. (Use the mouse, or press Ctrl+A)
  4. Right click on one of the files, and a menu should appear. Choose "Copy" from that menu.
  5. Now go to the directory /usr/local/lib/codecs/
    (NOTE: You may need to create this directory.)
    • You can create new directories in Nautilus by pressing these keys together 'Shift+Ctrl+N'.
    • You can create new directories in Konqueror by pressing the 'F10' key.
  6. Click "Edit' from the top menu of your File Manager, then on the drop down menu, click 'Paste'.
    If everything went well up to here, then you are finished.
Skip to the end of the page.

If you are unable to copy the files with your File Manager, you will have to use a command line/terminal to extract the file. CLICK HERE FOR COMMANDLINE INSTRUCTIONS.


CommandLine - Unzip/Uncompress the Codecs

  1. Open a terminal.
  2. Enter the command to 'change directory' to your Desktop (or whichever directory you saved the file to).
    • cd Desktop
  3. Make sure you are in the correct directory by 'listing' the file. This command should show that the file exists. (If doesn't list anything, then you are probably in the wrong directory, or there was a problem saving the file.)
    • ls essential*
  4. Extract the file contents by running this command on the file.
    • tar -xvjf <replace with filename>
CLICK HERE TO CONTINUE REGULAR INSTRUCTIONS.


CommandLine - Install the Codecs

  1. Open a terminal, and login as 'root' user.
    • su
    or
    • sudo su
  2. Enter the command to 'change directory' to the directory ("Desktop/essential-20061022/"?) that was created by extracting the file (essential...tar.bz2).
    • cd Desktop/essential
  3. Copy all the files from that location to /usr/local/lib/codecs/
    • cp -a * /usr/local/lib/codecs/
      If the directory /usr/local/lib/codecs/ does not exist, you will need to create it and then try copying the files again. To create the directory, use this command:
      • mkdir /usr/local/lib/codecs


Finish

Congratulations. Your codecs should be installed. Close and restart your video/audio player to try them out. If you are still having trouble playing any files, please post about it on the discussion page.



See also


Personal tools