CentOS7编译ffmpeg

下载安装nasm(1.3以上)

mkdir 编译目录
cd 编译目录
wget https://www.nasm.us/pub/nasm/releasebuilds/2.14/nasm-2.14.tar.gz
tar -zxvf nasm-2.14.tar.gz
cd nasm-2.14
./configure
make
make install

下载安装yasm

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

下载安装faad2

wget https://jaist.dl.sourceforge.net/project/faac/faad2-src/faad2-2.8/faad2-2.8.8.tar.gz
tar -zxvf faad2-2.8.8.tar.gz
cd faad2-2.8
./configuure
make
make install	

下载安装faac

wget https://jaist.dl.sourceforge.net/project/faac/faac-src/faac-1.29/faac-1.29.9.2.tar.gz
tar -zxvf faac-1.29.9.2.tar.gz
cd faac-1.29
(bug, comment strcasestr in mpeg4ip.h(1.27版本))
./configuure
make
make install		

下载安装mp3lame

wget https://jaist.dl.sourceforge.net/project/lame/lame/3.99/lame-3.99.5.tar.gz
cd lame-3.99.5
./configure
make
make install

下载安装x264

git clone git://git.videolan.org/x264.git
cd x264
./configure --enable-shared
make
make install
ldconfig

下载安装x265

yum install mercurial
hg clone http://hg.videolan.org/x265
cd x265
cd build/linux
./make-Makefilefiles.bash
make
make install

编译安装ffmpeg

git clone https://git.ffmpeg.org/ffmpeg.git ffmpeg
export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig #for x265
./configure --prefix=/usr/local/ --enable-gpl --enable-version3 --enable-nonfree --enable-shared --enable-zlib --enable-bzlib --enable-libmp3lame --enable-libx264 --enable-pic --enable-libx265
make
make install

猜你喜欢

转载自blog.csdn.net/qq_28076275/article/details/84890095