lame–libmp3lame的安装包,支持MP3编码;yasm–NASM的重写,用于编译ffmpeg。
1.下载
2.编译安装
2.1安装lame
tar -zxf lame-3.100.tar.gzcd lame-3.100./configuremakemake install
2.2安装yasm
tar -zxf yasm-1.3.0.tar.gzcd yasm-1.3.0sed -i 's#) ytasm.*#)#' Makefile.in./configuremakemake install
2.3安装ffmpeg
tar -jxf ffmpeg-3.4.tar.bz2cd ffmpeg-3.4./configure --enable-shared --enable-libmp3lamemakemake install
3.配置调整
执行: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
参考: