下载
wget https://ffmpeg.org/releases/ffmpeg-7.0.2.tar.xz
安装
# 安装依赖
sudo apt-get -y install libgmp3-dev yasm
sudo apt-get -y install libgnutls28-dev
sudo apt-get -y install libsdl2-dev
sudo apt -y install pkg-config gnutls-bin libaom-dev libass-dev libbluray-dev libfdk-aac-dev libmp3lame-dev libopencore-amrnb-dev libopencore-amrwb-dev libopenmpt-dev libopus-dev libshine-dev libsnappy-dev libsoxr-dev libspeex-dev libtheora-dev libtwolame-dev libvo-amrwbenc-dev libwavpack-dev libwebp-dev libx264-dev libx265-dev libxvidcore-dev liblzma-dev
./configure --prefix=/apps/ffmpeg --enable-shared --enable-gpl --enable-version3 --enable-sdl2 --enable-fontconfig --enable-gnutls --enable-iconv --enable-libass --enable-libbluray --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopus --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libtheora --enable-libtwolame --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxml2 --enable-lzma --enable-zlib --enable-gmp --enable-libvorbis --enable-libvo-amrwbenc --enable-libspeex --enable-libxvid --enable-libaom --enable-libopenmpt --enable-libfdk-aac --enable-nonfree
make
make install
下列错误的修复方式
ffmpeg: error while loading shared libraries: libavdevice.so.61: cannot open shared object file: No such file or directory
/sbin/ldconfig
sudo vim /etc/ld.so.conf
加入ffmpeg的lib路径
include ld.so.conf.d/*.conf
/usr/local/ffmpeg/lib/
# 最后生效
/sbin/ldconfig