先点上面下载源码。
然后,下载x264
x264, the best H.264/AVC encoder - VideoLAN
进到x264里
./configure --enable-static prefix=/home/yoyock/compile/libx264/static
配置生成static静态库,再指定生成要放的路径。
然后make
再sudo make install
再下载
lame-3.100
LAME (Lame Aint an MP3 Encoder) - Browse /lame/3.100 at SourceForge.net
进到lame-3.100目录
然后
./configure --enable-static prefix=/home/yoyock/compile/lame/static
配置生成static静态库,再指定生成要放的路径。
然后make
再sudo make install
其它的库也类似的像上面那样加。
最后,配置ffmpeg
./configure --enable-static --enable-libmp3lame --enable-libx264 --extra-libs=ldl --enable-gpl --prefix=/home/yoyock/compile/ffmpeg/static extra-cflags="-I/home/yoyock/compile/libx264/static/include" extra-ldflags="-L/home/yoyock/compile/libx264/static/lib"
--enable-libx264 --extra-libs=ldl --enable-gpl 配置x264这三条一定要有然后,要指定x264的include和lib目录。然后就可以了,配置其它的库应该差不多这个方式。