下载地址:
https://ffmpeg.org/download.html
准备工作:编译选项(按需选择,详情可查看configure --help)
#Pre-requirement apt-get install yasm apt-get install libsdl1.2-dev apt-get install libsdl2-dev #libx264 is gpl #--enable-libx264 apt-get install libx264-dev #--enable-libx265 apt-get install libx265-dev #--enable-librtmp apt-get install librtmp-dev #--enable-libzmq apt-get install libzmq5-dev #Compile log #--logfile=/tmp/ffbuild.log touch /tmp/ffbuild.log #Installation directory #--prefix=/lib/ffmepg mkdir /lib/ffmpeg #Generate a dynamic library #--enable-shared #pc file storage #--pkgconfigdir = path echo ${PKG_CONFIG_PATH}
编译安装
#解压 tar -xvjf ffmpeg-snapshot.tar.bz2 -C /tmp #配置 ./configure --enable-gpl --enable-libx264 --enable-libx265 \ --enable-librtmp --enable-libzmq \ --logfile=/tmp/ffbuild.log --prefix=/lib/ffmepg \ --enable-shared --pkgconfigdir=${PKG_CONFIG_PATH} #编译 make -j 4 make install