• 下载

http://ffmpeg.org/download.html

实际上现在有2、3、4两个系列。有朋友问,应该下载哪个?如果是使用ffmpeg本身,当然是下载新的。如果是跟其他版本整合编译,一般是使用2、3系列。

实际上doubango使用的版本很老,所以只能下载2.8.15。原因参考:

https://blog.csdn.net/quantum7/article/details/104409302

  • 解压
tar xf ffmpeg-2.8.15.tar.bz2
cd ffmpeg-2.8.15
  • 编译

ffmpeg的编译参数非常多,这里是参考doubango的编译参数。

BUILD_LIBS=${HOME}/build_libs
./configure \
    --prefix=${BUILD_LIBS}  \
    --extra-cflags="-fPIC" \
    --extra-cflags="-I${BUILD_LIBS}/include" \
    --extra-ldflags="-L${BUILD_LIBS}/lib" \
    --bindir="${BUILD_LIBS}/bin" \
    --enable-pic --enable-pthreads \
    --enable-shared --disable-static \
    --disable-network --enable-pthreads \
    --disable-ffmpeg --disable-ffplay --disable-ffprobe \
    --enable-gpl --enable-nonfree \
    --enable-libx264 --enable-encoder=libx264 --enable-decoder=h264 \
    --disable-debug

# ./configure --pkg-config-flags="--static" --bindir="$HOME/bin" --enable-gpl --enable-libass --enable-libfdk-aac --enable-libfreetype --enable-libmp3lame --enable-libopus --enable-libtheora --enable-libvorbis --enable-libvpx --enable-libx264 --enable-nonfree

# --enable-memalign-hack
# --disable-ffserver

make

make install


cp libavfilter/motion_estimation.h ${BUILD_LIBS}/include/libavfilter

 

更多推荐