zhmg23

我们是如此的不同
资深运维工程师互荐群: 102123162

Linux下编译安装ffmpeg支持音频转码

#yasm:汇编器,新版本的ffmpeg增加了汇编代码

wget http://www.tortall.net/projects/yasm/releases/yasm-1.3.0.tar.gz

tar zxvf yasm-1.3.0.tar.gz

cd yasm-1.3.0

./configure

make && make install


#lame:Mp3音频解码

wget http://jaist.dl.sourceforge.net/project/lame/lame/3.99/lame-3.99.5.tar.gz

tar zxvf lame-3.99.5.tar.gz

cd lame-3.99.5

./configure

make && make install


#amr支持 (选择性安装,我本次未安装)

wget http://downloads.sourceforge.net/project/opencore-amr/opencore-amr/opencore-amr-0.1.3.tar.gz

tar -xzvf opencore-amr-0.1.3.tar.gz

cd opencore-amr-0.1.3

./configure

make

make install


#amrnb支持 (选择性安装,我本次未安装)

wget http://www.penguin.cz/~utx/ftp/amr/amrnb-11.0.0.0.tar.bz2

tar -xjvf amrnb-11.0.0.0.tar.bz2

cd amrnb-11.0.0.0

./configure

make

make install


#amrwb支持 (选择性安装,我本次未安装)

wget http://www.penguin.cz/~utx/ftp/amr/amrwb-11.0.0.0.tar.bz2

tar -xjvf amrwb-11.0.0.0.tar.bz2

cd amrwb-11.0.0.0

./configure

make

make install


wget http://ffmpeg.org/releases/ffmpeg-2.8.13.tar.bz2

tar jxvf ffmpeg-2.8.13.tar.bz2

cd ffmpeg-2.8.13

./configure --enable-libmp3lame --disable-yasm   

make  (这里时间比较长,请耐心等待)

make install


# ffmpeg

ffmpeg: error while loading shared libraries: libmp3lame.so.0: cannot open shared object file: No such file or directory


# whereis libmp3lame.so.0

libmp3lame.so: /usr/local/lib/libmp3lame.so.0 /usr/local/lib/libmp3lame.so

添加软链接

# ln -s /usr/local/lib/libmp3lame.so.0  /usr/lib64/libmp3lame.so.0



至此,编译完成 ffmpeg环境 

评论