Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I want to install ffmpeg on ubuntu. and following this article http://pasindudps.blogspot.com/2010/12/compiling-ffmpeg-in-ubuntu-1010.html 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
make

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

1 Answer 1

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 http://archive.ubuntu.com/ubuntu maverick multiverse
    deb-src http://archive.ubuntu.com/ubuntu maverick multiverse
    deb http://archive.ubuntu.com/ubuntu maverick-updates multiverse
    deb-src http://archive.ubuntu.com/ubuntu maverick-updates multiverse
    deb http://archive.ubuntu.com/ubuntu maverick-security multiverse
    deb-src http://archive.ubuntu.com/ubuntu maverick-security multiverse
    
    deb http://archive.ubuntu.com/ubuntu maverick universe
    deb-src http://archive.ubuntu.com/ubuntu maverick universe
    deb http://archive.ubuntu.com/ubuntu maverick-updates universe
    deb-src http://archive.ubuntu.com/ubuntu maverick-updates universe
    deb http://archive.ubuntu.com/ubuntu maverick-security universe
    deb-src http://archive.ubuntu.com/ubuntu 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
1  
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

 
discard

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.