环境:centos 6.3 64位
ffmpeg依赖的第三方库的编译:1. 编译yasm:
wget http://www.tortall.net/projects/yasm/releases/yasm-1.2.0.tar.gz
./configure
make
make install
2. 编译faac:
wget http://jaist.dl.sourceforge.net/project/faac/faac-src/faac-1.28/faac-1.28.tar.gz
./configure --prefix=/usr/local/faac --enable-static --disable-shared
make
make install
3. 编译lame:
wget http://jaist.dl.sourceforge.net/project/lame/lame/3.99/lame-3.99.5.tar.gz
./configure --prefix=/usr/local/lame --enable-static --disable-shared
make
make install
4. 编译x264:
wget ftp://ftp.videolan.org/pub/x264/snapshots/last_x264.tar.bz2
./configure --prefix=/usr/local/x264 --enable-static --disable-shared
make
make install
5. 编译xvid:
wget http://downloads.xvid.org/downloads/xvidcore-1.3.2.tar.gz
./configure --prefix=/usr/local/xvid --enable-static --disable-shared
make
make install
ffmpeg编译:
6. 下载ffmpeg代码:
wget http://ffmpeg.org/releases/ffmpeg-0.8.12.tar.gz
7. 设置configure:
./configure --prefix=/usr/local/ffmpeg/ --enable-gpl --enable-nonfree --enable-libxvid --enable-libx264 --enable-libmp3lame --enable-libfaac --extra-cflags=-I/usr/local/faac/include --extra-ldflags=-L/usr/local/faac/lib --extra-cflags=-I/usr/local/lame/include --extra-ldflags=-L/usr/local/lame/lib --extra-cflags=-I/usr/local/x264/include --extra-ldflags=-L/usr/local/x264/lib --extra-cflags=-I/usr/local/xvid/include --extra-ldflags=-L/usr/local/xvid/lib
8. 编译安装
make
make install
最后:
编译遇到的问题google一下基本都可以找到答案。