步骤:
-
下载ffmpeg 4.x版本:
wget https://johnvansickle.com/ffmpeg/release-source/ffmpeg-4.1.tar.xz
-
解压
xz -d ffmpeg-4.1.tar.xz
tar -xf ffmpeg-4.1.tar
-
编译安装
cd ffmpeg-4.1/ ./configure --enable-shared --prefix=/usr/local/ffmpeg
make
make install
-
导入动态链接库并使用
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/ffmpeg/lib
cd bin
./ffmpeg
-
常见问题
5.1 libavdevice.so.58libavdevice.so.58: cannot open shared object file: No such file or directory
echo "/usr/local/ffmpeg/lib" >> /etc/ld.so.conf.d/ffmpeg.conf