ffmpeg 4 源码编译

cd /opt/
wget https://mirrors.aliyun.com/repoforge/redhat/el7/en/x86_64/dag/RPMS/rpmforge-release-0.5.3-1.el7.rf.x86_64.rpm
#wget https://mirrors.aliyun.com/repoforge/redhat/el6/en/x86_64/dag/RPMS/rpmforge-release-0.5.3-1.el6.rf.x86_64.rpm
rpm -Uhv ./rpmforge-release-0.5.3-1.el7.rf.x86_64.rpm
 
yum -y install cmake gcc bzip2
yum remove x264 x264-deve
yum install yasm yasm-devel gnutls gnutls-devel lame lame-devel faac faac-devel snappy snappy-devel libtheora libtheora-devel lzma-devel -y
yum install libvorbis libvorbis-devel -y
 
 
cd /opt/
wget -c ftp://ftp.videolan.org/pub/x264/snapshots/x264-snapshot-20120718-2245-stable.tar.bz2
tar jxvf x264-snapshot-20120718-2245-stable.tar.bz2
cd ./x264-snapshot-20120718-2245-stable
./configure --enable-shared --enable-static
make
make install
cd /opt/
wget http://ftp.videolan.org/pub/videolan/x265/x265_2.9.tar.gz
tar -xvf ./x265_2.9.tar.gz
cd /opt/x265_2.9/build/linux
./make-Makefiles.bash
make
make install
 
cd /opt/
wget https://downloads.xvid.com/downloads/xvidcore-1.3.5.tar.gz
tar -xvf ./xvidcore-1.3.5.tar.gz
cd /opt/xvidcore/build/generic
./configure
make
make install
export PKG_CONFIG_PATH=$PKG_CONFIG_PATH:/usr/local/lib/pkgconfig
 
wget https://github.com/webmproject/libvpx/archive/v1.7.0.tar.gz
tar -xvf ./v1.7.0.tar.gz
cd ./libvpx-1.7.0/
./configure
make
make install
 
cd /opt/
wget https://archive.mozilla.org/pub/opus/opus-1.3.tar.gz
tar -xvf ./opus-1.3.tar.gz
cd /opt/opus-1.3/
./configure
make
make install
 
cd /opt/
wget http://libsdl.org/release/SDL2-2.0.9.zip
yum -y install unzip
unzip ./SDL2-2.0.9.zip
cd ./SDL2-2.0.9
./configure
make
make install
 
cd /opt/
wget http://www.libsdl.org/release/SDL-1.2.15.zip
unzip ./SDL-1.2.15.zip
cd ./SDL-1.2.15
./configure
make
make install
 
cd /opt/
wget https://ffmpeg.org/releases/ffmpeg-4.1.tar.bz2
tar -jxvf ./ffmpeg-4.1.tar.bz2
cd ./ffmpeg-4.1
./configure --prefix=/usr/local/ffmpeg --enable-shared --enable-pthreads --enable-version3 --enable-hardcoded-tables --enable-ffplay --enable-gpl --enable-libmp3lame --enable-libsnappy --enable-libtheora --enable-libvorbis --enable-libx264 --enable-libx265 --enable-libxvid --enable-x86asm --enable-avresample --enable-small --enable-avfilter --enable-libopus --enable-libvpx --enable-sdl
make
make install
 
echo '/usr/local/ffmpeg/lib
/usr/local/lib
' >> /etc/ld.so.conf
 
echo 'export FFMPEG=/usr/local/ffmpeg
export PATH=$FFMPEG_HOME/bin:$PATH
' >> /etc/profile
ldconfig
source /etc/profile
ffmpeg -version
 

已有 0 条评论

    欢迎您,新朋友,感谢参与互动!