Linux下安装ffmpeg

Linux下安装ffmpeg

 

首先要安装各种解码器

1
lame
lame-3.97.tar.gz
Url
http://sourceforge.net/project/showfiles.php?group_id=290&package_id=309
安装方法如下:

  1. tar -zxvf lame-3.97.tar.gz   
  2. cd lame-3.97  
  3. ./configure --enable-shared --prefix=/usr   
  4. make   
  5. make install  

tar -zxvf lame-3.97.tar.gz

cd lame-3.97

./configure --enable-shared --prefix=/usr

make

make install



2libogg
libogg-1.1.3.tar.gz
Url
http://downloads.xiph.org/releases/ogg/libogg-1.1.3.tar.gz
安装方法如下:

  1. ./configure --prefix=/usr   
  2. make   
  3. make install  

./configure --prefix=/usr

make

make install



3libvorbis
libvorbis-1.1.2.tar.gz
Url
http://downloads.xiph.org/releases/vorbis/libvorbis-1.1.2.tar.gz
安装方法如下:

  1. ./configure --prefix=/usr   
  2. make   
  3. make install  

./configure --prefix=/usr

make

make install



4xvid
xvidcore-1.1.3.tar.gz
Url
http://downloads.xvid.org/downloads/xvidcore-1.1.3.tar.gz
安装方法如下:

  1. tar zvxf xvidcore-1.1.3.tar.gz   
  2. cd xvidcore-1.1.3/build/generic   
  3. ./configure --prefix=/usr   
  4. make   
  5. make install  

tar zvxf xvidcore-1.1.3.tar.gz

cd xvidcore-1.1.3/build/generic

./configure --prefix=/usr

make

make install



5x264
x264-snapshot-20071107-2245.tar.bz2
Url
http://www.videolan.org/developers/x264.html
ftp://ftp.videolan.org/pub/videolan/x264/snapshots/
安装方法如下:

  1. bunzip2 x264-snapshot-20070913-2245.tar.bz2   
  2. tar xvf x264-snapshot-20070913-2245.tar   
  3. ./configure --prefix=/usr --enable-shared   
  4. make   
  5. make install  

bunzip2 x264-snapshot-20070913-2245.tar.bz2

tar xvf x264-snapshot-20070913-2245.tar

./configure --prefix=/usr --enable-shared

make

make install



6libdts
libdts-0.0.2.tar.gz
[url]http://download.videolan.org/pub/videolan/libdca/0.0.2/libdca-0.0.2.tar.gz [/url]
安装方法:

  1. tar zxvf libdts-0.0.2.tar.gz   
  2. cd libdts-0.0.2  
  3. ./configure --prefix=/usr   
  4. make   
  5. make install  

tar zxvf libdts-0.0.2.tar.gz

cd libdts-0.0.2

./configure --prefix=/usr

make

make install



7a52
a52dec-0.7.4.tar.gz
http://liba52.sourceforge.net/downloads.html
安装方法:

  1. ./configure --prefix=/usr   
  2. make   
  3. make install  

./configure --prefix=/usr

make

make install



8faad2
faad2-2.6.1.tar.gz
http://www.audiocoding.com/downloads.html
安装方法

  1. autoreconf -vif   
  2. ./configure --prefix=/usr --with-mp4v2 --enable-shared   
  3. make   
  4. make install  

autoreconf -vif

./configure --prefix=/usr --with-mp4v2 --enable-shared

make

make install



9faac
faac-1.26.tar.gz
http://
linux.softpedia.com/progDownload/FAAC-Download-554.html
安装方法:

  1. tar zxvf faac-1.26.tar.gz   
  2. cd faac   
  3. ./bootstrap   
  4. ./configure --prefix=/usr   
  5. make   
  6. make install  

tar zxvf faac-1.26.tar.gz

cd faac

./bootstrap

./configure --prefix=/usr

make

make install



10amr-nb
amrnb-6.1.0.4.tar.bz2
http://ftp.penguin.cz/pub/users/utx/amr/amrnb-6.1.0.4.tar.bz2
安装方法:

  1. ./configure --prefix=/usr   
  2. make   
  3. make install  

./configure --prefix=/usr

make

make install



11amr-wb
amrwb-7.0.0.1.tar.bz2
http://ftp.penguin.cz/pub/users/utx/amr/amrwb-7.0.0.1.tar.bz2
安装方法:

  1. ./configure --prefix=/usr   
  2. make   
  3. make install  

./configure --prefix=/usr

make

make install



12lib52
a52dec-0.7.4.tar.gz
http://liba52.sourceforge.net/downloads.html

如果前面的安装一切顺利的话,恭喜你,可以安装
ffmpeg

安装
ffmpeg

Tar xjvf ffmpeg-export-snapshot.tar.bz2
Cd ffmpeg-export-2010-03-02
./configure --prefix=/usr --enable-shared  --enable-gpl
Make
Make install
 
 
 
测试!
ffmpeg -i 4128666.flv -y -f image2 -ss 8 -t 0.001 -s 400x300 test.jpg
原文地址:https://www.cnblogs.com/feihongwuhen/p/7170923.html