一、安装mp3插件和mp4插件,无优先顺序。lame--libmp3lame的安装包,支持MP3编码;yasm--NASM的重写,用于编译ffmpeg
1、安装mp3插件
lame:LAME (Lame Aint an MP3 Encoder) - Browse /lame at SourceForge.net
tar -zxf lame-3.100.tar.gz cd lame-3.100 ./configure make make install
yasm:http://www.linuxfromscratch.org/blfs/view/svn/general/yasm.html
tar -zxf yasm-1.3.0.tar.gz cd yasm-1.3.0 ./configure make make install
nasm:nasm-2.13.03.tar.gz
cd nasm-2.13.03 ./configure make make install
x264:VideoLAN / x264 · GitLab
cd x264-master ./configure make make install
cd ffmpeg ./configure --enable-gpl --enable-nonfree --enable-pthreads --enable-libx264 --enable-libmp3lame --disable-x86asm make make install
配置:
执行:ffmpeg --version
报错:ffmpeg: error while loading shared libraries: libavdevice.so.57: cannot open shared object file: No such file or directory
解决:编缉/etc/ld.so.conf,新建一行追加:/usr/local/lib;保存后执行命令重加载配置文件:ldconfig
include ld.so.conf.d/*.conf /usr/local/lib
ldconfig