CentOS 5.3安装ffmpeg备忘录
安装前准备编译的环境
yum install -y automake autoconf libtool gcc gcc-c++
安装CentOS自带相应的Ogg与 Vorbis支持:
yum install -y libvorbis libvorbis-devel libogg libogg-devel
下载需要的解码器
wget http://liba52.sourceforge.net/files/a52dec-0.7.4.tar.gz
wget http://downloads.sourceforge.net/faac/faad2-2.6.1.tar.gz
wget http://downloads.sourceforge.net/faac/faac-1.26.tar.gz
wget http://nchc.dl.sourceforge.net/sourceforge/lame/lame-3.97.tar.gz
wget http://www.tortall.net/projects/yasm/releases/yasm-0.7.0.tar.gz
wget ftp://ftp.videolan.org:21//pub/videolan/x264/snapshots/x264-snapshot-20090107-2245.tar.bz2
wget http://downloads.xvid.org/downloads/xvidcore-1.1.3.tar.gz
wget http://down1.chinaunix.net/distfiles/libdts-0.0.2.tar.gz
解压安装
for i in *.tar.gz; do tar -xzvf "$i"; done
for i in *.tar.bz2; do tar -xjvf "$i"; done
a52dec: ./configure -enable-shared=PKGS && make && make install
faac & faad2: ./bootstrap && ./configure && make && make install
xvidcore: cd build/generic; ./configure && make && make install
lame & yasm: ./configure && make && make install
libdts: ./configure --prefix=/usr -enable-shared && make && make install
x264: ./configure -enable-mp4-output -enable-shared -enable-pthread && make && make install
下载和安装ffmpeg
svn checkout svn://svn.mplayerhq.hu/ffmpeg/trunk ffmpeg
./configure --enable-gpl --enable-postproc --enable-nonfree --enable-libfaad --enable-avfilter --enable-pthreads --enable-libxvid --enable-libx264 --enable-libmp3lame --enable-libfaac && make && make install
更新动态链接库
因为是编译器安装的,所以需要让系统可以找到动态链接库
#echo "/usr/local/lib" >> /etc/ld.so.conf
#echo "/usr/lib" >> /etc/ld.so.conf
#ldconfig