Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I want to install ffmpeg on ubuntu. and following this article but when m doing make after config

Then go to the ffmpeg folder.
cd ffmpeg
Start the installation
./configure --enable-gpl --enable-version3 --enable-nonfree --enable-postproc \
--enable-libfaac --enable-libmp3lame --enable-libopencore-amrnb \
--enable-libopencore-amrwb --enable-libtheora --enable-libvorbis \
--enable-libvpx --enable-libx264 --enable-libxvid --enable-x11grab

giving this error

/home/reach121/ffmpeg/libavcodec/x86/cabac.h:93: undefined reference to `ff_h264_norm_shift'
/home/reach121/ffmpeg/libavcodec/x86/cabac.h:93: undefined reference to `ff_h264_lps_range'
/home/reach121/ffmpeg/libavcodec/x86/cabac.h:93: undefined reference to `ff_h264_norm_shift'
/home/reach121/ffmpeg/libavcodec/x86/cabac.h:93: undefined reference to `ff_h264_mlps_state'
/home/reach121/ffmpeg/libavcodec/x86/cabac.h:93: undefined reference to `ff_h264_norm_shift'
collect2: ld returned 1 exit status
make: *** [ffmpeg_g] Error 1

Please suggest why this error is coming and what to do to solve this problem

share|improve this question
Is there any reason why you don't install the ffmpeg version from the official Ubuntu repositories? – htorque Jun 24 '11 at 8:24
i dont know how to install from official repository , and m doing this because encoding to mp3 file was not working in previous instalation so reinstalling again with above article – Rahul Mehta Jun 24 '11 at 8:25
What version of Ubuntu are you using (probably 10.10 as you are using a guide for that version) – htorque Jun 24 '11 at 8:36
Could you post your full log? Something wasn't compiled well, that's why it now complains about undefined referenes. – Lekensteyn Jun 24 '11 at 8:38
Yeah right its 10.10 – Rahul Mehta Jun 24 '11 at 8:41
up vote 2 down vote accepted

The Ubuntu version of ffmpeg comes without support for restricted formats like MP3, but you can fix that by installing packages that include that support. So to fix your initial problem:

  1. Purge the existing installation of ffmpeg (if any):

    sudo apt-get purge ffmpeg
  2. Install ffmpeg:

    sudo apt-get install ffmpeg
  3. To install the restricted formats, you need to enable the Multiverse and Universe repositories. Open the file /etc/apt/sources.list:

    sudo nano /etc/apt/sources.list

    and uncomment the lines ending with multiverse and universe. If you don't have such lines, just append the following to the file:

    deb maverick multiverse
    deb-src maverick multiverse
    deb maverick-updates multiverse
    deb-src maverick-updates multiverse
    deb maverick-security multiverse
    deb-src maverick-security multiverse
    deb maverick universe
    deb-src maverick universe
    deb maverick-updates universe
    deb-src maverick-updates universe
    deb maverick-security universe
    deb-src maverick-security universe

    Save (Ctrl + o , Enter) and exit (Ctrl + x).

    Now update the package list by running:

    sudo apt-get update
  4. Install support for restricted formats like MP3:

    sudo apt-get install libavcodec-extra-52

Now something like:

 ffmpeg -i in.wav out.mp3

should work.

share|improve this answer
pls see the error i got while doing step 4 in edited question – Rahul Mehta Jun 24 '11 at 8:51
@htorque i am accessing it by putty ,it is on rackspace instance so i cant enable it by gui , i want to know the command for setting that – Rahul Mehta Jun 24 '11 at 9:28
still the same error is coming ? E: Package 'libavcodec-extra-52' has no installation candidate , when i pasted in source.list the six line already there with ending with universe , i appended your six line below them and there was no line ending with multiverse – Rahul Mehta Jun 24 '11 at 9:57
Beware when overwriting the whole file. Rackspace may add their own repo (or not), you'd better just add the multiverse lines. – Lekensteyn Jun 24 '11 at 10:09
Perfect thanks its done now – Rahul Mehta Jun 24 '11 at 10:28

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.