lame--libmp3lame的安裝包,支持MP3編碼;yasm--NASM的重寫,用於編譯ffmpeg。
1.下載
ffmpeg下載鏈接:http://ffmpeg.org/download.html
yasm下載鏈接:http://www.linuxfromscratch.org/blfs/view/svn/general/yasm.html
lame下載接:https://sourceforge.net/projects/lame/files/lame/
2.編譯安裝
2.1安裝lame
tar -zxf lame-3.100.tar.gz cd lame-3.100 ./configure make make install
2.2安裝yasm
tar -zxf yasm-1.3.0.tar.gz cd yasm-1.3.0 sed -i 's#) ytasm.*#)#' Makefile.in ./configure make make install
2.3安裝ffmpeg
tar -jxf ffmpeg-3.4.tar.bz2 cd ffmpeg-3.4 ./configure --enable-shared --enable-libmp3lame make make 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
參考:
http://www.cnblogs.com/wanghetao/p/3386311.html
http://www.linuxfromscratch.org/blfs/view/svn/general/yasm.html