Centos 7.3 Install ffmpeg 3.1

下载
wget -c ftp://195.220.108.108/linux/dag/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.el6.rf.x86_64.rpm

依赖
yum install automake autoconf make gcc gcc-c++ libtool zlib zlib-devel curl curl-devel alsa-lib alsa-lib-devel gettext gettext-devel expat expat-devel nasm pkgconfig bzip2 -y

安装 yasm,gnutls, lame,faac
yum install yasm yasm-devel gnutls gnutls-devel  lame lame-devel faac faac-devel -y


卸载系统自带的,如果不卸载,可能在安装ffmpeg时会出现版本问
yum remove x264 x264-deve


安装最新的x264
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


wget http://www.ffmpeg.org/releases/ffmpeg-3.1.tar.gz

tar -zxvf ffmpeg-3.1.tar.gz

cd ffmpeg-3.1

./configure --prefix=/usr/local/ --enable-gpl --enable-version3 --enable-nonfree --enable-shared --enable-zlib --enable-bzlib --enable-libmp3lame --enable-libx264 --enable-pic --enable-libfaac
make
make install


vi/etc/ld.so.conf
include ld.so.conf.d/*.conf
/usr/local/lib/

ldconfig


配置ffmpeg全局变量
vi /etc/profile
export    FFMPEG=/usr/local/ffmpeg


检查安装是否安装OK
ffmpeg -version

你可能感兴趣的:(Centos,ffmpeg,技术交流)