在unbuntu上编译安装ffmpeg

脚本:install-ffmpeg.sh

sudo
 apt-get install build-essential git-core checkinstall yasm texi2html 
libvorbis-dev libx11-dev libvpx-dev libxfixes-dev zlib1g-dev pkg-config 
netcat libncurses5-dev

FFMPEG_VERSION=4.1

cd /usr/local/src
if [ ! -d "/usr/local/src/ffmpeg-${FFMPEG_VERSION}" ]; then
  sudo wget "http://ffmpeg.org/releases/ffmpeg-${FFMPEG_VERSION}.tar.bz2"
  sudo tar -xjf "ffmpeg-${FFMPEG_VERSION}.tar.bz2"
fi

cd "ffmpeg-${FFMPEG_VERSION}"
sudo ./configure --enable-gpl --enable-nonfree --enable-libfdk-aac --enable-libx264  --enable-filter=delogo --enable-debug --disable-optimizations --enable-shared --enable-pthreads --enable-version3 --enable-hardcoded-tables --cc=clang --host-cflags= --host-ldflags=
sudo make
sudo checkinstall --pkgname=ffmpeg --pkgversion="5:${FFMPEG_VERSION}" --backup=no --deldoc=yes --default

运行脚本:sudo sh install-ffmpeg.sh;

脚本上x264,libfdk-acc,没涉及到,需要先安装;

参考文章:https://www.cnblogs.com/CoderTian/p/6655568.html

https://www.cnblogs.com/war-hzl/p/5393308.html

你可能感兴趣的:(在unbuntu上编译安装ffmpeg)