Install FFmpeg with MP3 and AMR support

Linux   2008-08-12 11:22   阅读63   评论0  
字号:    

I compiled vlc  but the FFmpeg debian package is not compiled with MP3 nor AMR support. So I had to reinstall ffmpeg compiled with amr support.

Get audio codecs (MP3 and AMR)

MP3 LAME:

  1. Grab the latest sources from the MP3 LAME official site:
    e.g. lame-3.97.tar.gz
  2. Decompress the source code:
    gunzip lame-3.97.tar.gz
    tar xvf lame-3.97.tar
  3. Change directory:
    cd lame-3.97
  4. Configure and install:
    ./configure
    make
    make install (as root or sudo)

AMR (NB & WB):

  1. Grab the AMR Codec Libraries (The FFmpeg documentation has a section about installing AMR):
    e.g. amrnb-6.1.0.4.tar.bz2 and amrwb-7.0.0.1.tar.bz2
  2. Decompress sources:
    bunzip2 amrnb-6.1.0.4.tar.bz2
    tar xvf amrnb-6.1.0.4.tar
  3. Change directory:
    cd amrnb-6.1.0.4
  4. Configure and install:
    ./configure
    make
    make install (as root or sudo)
  5. Repeat same steps 2,3 and 4 for amrwb-7.0.0.1.tar.bz2

Make sure that that your /etc/ld.so.conf includes the directory where these 3 libraries just got installed (usually its /usr/local/lib). Mine didn’t so I had to add it:

  • create the file /etc/ld.so.conf.d/ffmpeg.conf
  • add the line /usr/local/lib
  • then run ldconfig

FFmpeg

  1. We need to get FFmpeg from the subversion repository:
    svn checkout svn://svn.mplayerhq.hu/ffmpeg/trunk ffmpeg
  2. Change directory:
    cd ffmpeg
  3. Configure and install:

    ./configure –enable-nonfree –enable-libamr-nb –enable-libamr-wb –enable-libmp3lame

    make
    make install (as root or sudo)

After that configure error again:

configure: error: Your FFmpeg library doesn't have the needed img_resample() function. You should rebuild it with software scaler disabled

Maybe I need reboot my computer! Have a test!

评论(?)
阅读(?)
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
网易公司版权所有 ©1997-2009