安装git
yum -y install git*
1、安装Yasm工具:
下载地址: http://www.tortall.net/projects/yasm/releases/
最新版本:http://www.tortall.net/projects/yasm/releases/yasm-1.3.0.tar.gz
cd /home/mycentos7/tools/ffmpeg
wget http://www.tortall.net/projects/yasm/releases/yasm-1.3.0.tar.gz
tar xzvf yasm-1.3.0.tar.gz
cd yasm-1.3.0
./configure
make
sudo make install (或使用root安装: make install)
cd ..
2、安装FAAC:
官网: http://www.audiocoding.com/
cd /home/mycentos7/tools/ffmpeg
wget http://downloads.sourceforge.net/project/faac/faac-src/faac-1.28/faac-1.28.tar.gz
tar zxvf faac-1.28.tar.gz
cd faac-1.28
直接编译会报错,处理方式有以下三种,任意一种都可以:
(1)sed -i 's@^char \*strcasestr@//char *strcasestr@' ./common/mp4v2/mpeg4ip.h
(2) sed -i '124 s@extern "C"@extern"C++"@' ./common/mp4v2/mpeg4ip.h
sed -i '126 s@^char \*strcasestr@const char *strcasestr@'./common/mp4v2/mpeg4ip.h
(3)参见附录二的处理
./configure
make
sudo makeinstall (或使用root安装: make install)
cd ..
3、安装LAME:
cd /home/mycentos7/tools/ffmpeg
wget http://downloads.sourceforge.net/project/lame/lame/3.99/lame-3.99.5.tar.gz
tar xzvflame-3.99.5.tar.gz
cd lame-3.99.5
./configure--enable-nasm
make
sudo make install (或使用root安装: make install)
cd ..