安装步骤

1. 安装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 --prefix=/usr/local
make
make install

2. 安装ffmpeg

wget http://ffmpeg.org/releases/ffmpeg-3.4.1.tar.bz2
tar -xjvf ffmpeg-3.4.1.tar.bz2
cd ffmpeg-3.4.1
./configure --enable-shared --enable-gpl --prefix=/usr/local/ffmpeg
make 
make install

echo "/usr/local/ffmpeg/lib" >> /etc/ld.so.conf
ldconfig

说明:
- –enable-gpl,如果不想使用delogo等滤镜,可以不加。
- 为方便使用,可以将/usr/local/ffmpeg/bin加入环境变量PATH中

检查安装

ffmpeg -version

得到类似如下输出

ffmpeg version 3.4.1 Copyright (c) 2000-2017 the FFmpeg developers
built with gcc 4.4.7 (GCC) 20120313 (Red Hat 4.4.7-11)
configuration: --enable-shared --enable-gpl --prefix=/usr/local/ffmpeg
libavutil      55. 78.100 / 55. 78.100
libavcodec     57.107.100 / 57.107.100
libavformat    57. 83.100 / 57. 83.100
libavdevice    57. 10.100 / 57. 10.100
libavfilter     6.107.100 /  6.107.100
libswscale      4.  8.100 /  4.  8.100
libswresample   2.  9.100 /  2.  9.100
libpostproc    54.  7.100 / 54.  7.100
Logo

更多推荐