- 下载
http://ffmpeg.org/download.html
- 解压
tar xf ffmpeg-4.2.2.tar.bz2
cd ffmpeg-4.2.2/
- 编译
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
来源:CSDN
作者:柳鲲鹏
链接:https://blog.csdn.net/quantum7/article/details/104087693