编译环境:
CentOS 7.0
废话不多少,下面是具体的编译步骤
先安装yasm-1.2.0.tar.gz
tar zxvf yasm-1.2.0.tar.gz cd yasm-1.2.0 ./configure --prefix=/usr/local/bin/yasm PATH=$PATH:/usr/local/bin/yasm/bin make && make install
--------------------------------------
SDL2-2.0.8.tar.gz
tar -zxvf SDL2-2.0.8.tar.gz ./configure --prefix=/usr/local --enable-shared make && make install
--------------------------------------
安装解码器
lame-3.99.5.tar.gz
tar zxvf lame-3.99.5.tar.gz cd lame-3.99.5 ./configure --enable-shared --prefix=/usr/local make && make install--------------------------------------
libogg-1.1.3.tar.gz
tar zxvf libogg-1.1.3.tar.gz cd libogg-1.1.3 ./configure --prefix=/usr/local make && make install--------------------------------------
libvorbis-1.3.6.tar.xz
tar -xvJf libvorbis-1.3.6.tar.xz cd libvorbis-1.3.6 ./configure --prefix=/usr/local make && make install--------------------------------------
xvidcore-1.1.3.tar.gz
tar zxvf xvidcore-1.1.3.tar.gz cd xvidcore-1.1.3/build/generic ./configure --prefix=/usr/local make && make install--------------------------------------
last_x264.tar.bz2
tar jxvf last_x264.tar.bz2 cd x264-snapshot-20141105-2245 ./configure --prefix=/usr/local --enable-shared --disable-asm make && make install--------------------------------------
libdca-0.0.2.tar.gz
tar zxvf libdca-0.0.2.tar.gz cd libdts-0.0.2 ./configure --prefix=/usr/local make && make install--------------------------------------
a52dec-0.7.4.tar.gz
tar zxvf a52dec-0.7.4.tar.gz cd a52dec-0.7.4 ./configure --prefix=/usr/local make && make install
--------------------------------------
faad2-2.7.tar.gz
tar zxvf faad2-2.7.tar.gz cd faad2-2.7 autoreconf -vif ./configure --prefix=/usr/local --with-mp4v2 --enable-shared make && make install
--------------------------------------
faac-1.28.tar.gz
tar zxvf faac-1.28.tar.gz cd faac-1.28 ./bootstrap ./configure --prefix=/usr/local make && make install--------------------------------------
amrnb-11.0.0.0.tar.bz2
tar jxvf amrnb-11.0.0.0.tar.bz2 cd amrnb-11.0.0.0 ./configure --prefix=/usr/local --enable-shared make && make install
--------------------------------------
amrwb-11.0.0.0.tar.bz2
tar jxvf amrwb-11.0.0.0.tar.bz2 cd amrwb-11.0.0.0 ./configure --prefix=/usr/local make && make install
--------------------------------------
opencore-amr-0.1.3.tar.gz
tar zxvf opencore-amr-0.1.3.tar.gz cd opencore-amr-0.1.3 ./configure --prefix=/usr/local make && make install
--------------------------------------
ffmpeg-4.0.2.tar.gz
tar -jxvf ffmpeg-4.0.2.tar.bz2 cd ffmpeg-4.0.2 export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig ./configure --prefix=/usr/local/ffmpeg-4.0.2 --enable-ffplay --enable-ffmpeg --enable-ffprobe --enable-gpl --enable-shared --enable-libmp3lame --enable-libvorbis --enable-libopencore-amrnb --enable-libopencore-amrwb --disable-yasm --enable-version3 --enable-nonfree --enable-libx264 --extra-ldflags=-ldl make make install
编译完毕后,可以看看编译信息的最上面,是否有 ffmpeg, ffplay, ffprobe这三个文件,如果少某一个,可能是依赖包有问题,请自行查找,一般如果缺少ffplay的话,是缺少SDL2导致的,因此configure执行前,要先安装SDL2。
最后make时,可能会有很多的警告信息,只要不是错误信息,其他的忽略即可。
Good Luck !!!
相关的全部包,请到下面地址去下载:
https://download.csdn.net/download/laoshanbizu/10600214