yum install yasm
git clone git://git.videolan.org/x264.git cd x264 ./configure --enable-static --enable-shared make make install
git clone git://source.ffmpeg.org/ffmpeg.git ffmpeg cd ffmpeg #编译成动态库 ./configure --enable-shared --disable-static --enable-memalign-hack --enable-libx264 --enable-gpl --extra-cflags=-I/usr/local/include --extra-ldflags=-L/usr/local/lib --enable-pthreads #编译成静态库 ./configure --enable-static --disable-shared --enable-memalign-hack --enable-libx264 --enable-gpl --extra-cflags=-I/usr/local/include --extra-ldflags=-L/usr/local/lib --enable-pthreads
参考资料:
1、http://www.helyar.net/2010/how-to-compile-ffmpeg-from-source/
2、https://help.ubuntu.com/community/FFmpeg#Source_Build
原文地址:http://blog.csdn.net/sjin_1314/article/details/41142665