ffmpeg ubuntu 编译

  1. 源码下载:https://www.ffmpeg.org/download.html

ffmpeg ubuntu 编译_第1张图片
  1. 在linux系统中解压源码:tar -xvf ffmpeg-snapshot.tar.bz2

ffmpeg ubuntu 编译_第2张图片
  1. cd到ffmpeg目录,执行:./configure --prefix=/home/linuxwz/commonLib/ffmpeg --enable-gpl --enable-nonfree --enable-libfdk-aac --enable-libx264 --enable-filter=delogo --enable-debug --disable-optimizations --enable-shared --enable-pthreads

ffmpeg ubuntu 编译_第3张图片
ffmpeg ubuntu 编译_第4张图片

fdk-aac库在这之前已编译,如果需要用到x264, x265也需要提前编译。

安装pkg-config: apt-get install pkg-config,再执行./configure --prefix=/home/linuxwz/commonLib/ffmpeg --enable-gpl --enable-nonfree --enable-libfdk-aac --enable-libx264 --enable-filter=delogo --enable-debug --disable-optimizations --enable-shared --enable-pthreads,警告消失。

ffmpeg ubuntu 编译_第5张图片
ffmpeg ubuntu 编译_第6张图片
  1. 执行make -j16 编译,-j16是指定多线程编译,16可以根据自己情况修改,编译完后make install安装,生成的库及头文件就会在配置prefix指定的路径。

ffmpeg ubuntu 编译_第7张图片

完成。

你可能感兴趣的:(C/C++编程,ubuntu,linux)