linux ffmpeg安装h264库压缩转码


#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


#264安装
wget https://code.videolan.org/videolan/x264/-/archive/master/x264-master.zip

cd x264-master/

./configure --enable-shared --enable-static --disable-asm

make

make install
#路径在:/usr/local/x264/


#ffmpeg
git clone https://github.com/FFmpeg/FFmpeg.git

./configure --enable-gpl --enable-libx264

make

make install 

#安装目录
/usr/local/bin/ffmpeg -version

#
vi /etc/profile
#最后一行添加上
export PATH=$PATH:/usr/local/bin/ffmpeg/bin

source /etc/profile
#执行
ffmpeg -version