下载源码包:http://ffmpeg.org/releases/ffmpeg-3.2.2.tar.bz2
解压并安装
tar -jxvf ffmpeg-3.2.2.tar.bz2
进入目录并执行./configure --enable-shared --prefix=/usr/local/ffmpeg
yasm/nasm not found or too old. Use --disable-yasm for a crippled build.
If you think configure made a mistake,make sure you are using the latest
version from Git. If the latest version fails,report the problem to the
ffmpeg-user@ffmpeg.org mailing list or IRC #ffmpeg on irc.freenode.net.
Include the log file "config.log" produced by configure as this will help
solve the problem.
按照提示需要安装yasm
sudo yum install yasm
make
make install
ffmpeg: error while loading shared libraries: libavdevice.so.57: cannot open shared object file: No such file or directory
vi /etc/ld.so.conf
添加一行 /usr/local/ffmpeg/lib
执行ldconfig
export PATH=/usr/local/ffmpeg/bin:$PATH
ffmpeg -version
ffmpeg version N-82785-g6b95da9 Copyright (c) 2000-2016 the FFmpeg developers built with gcc 4.8 (Ubuntu 4.8.4-2ubuntu1~14.04.1) configuration: --enable-shared --prefix=/usr/local/ffmpeg libavutil 55. 41.101 / 55. 41.101 libavcodec 57. 66.109 / 57. 66.109 libavformat 57. 58.101 / 57. 58.101 libavdevice 57. 2.100 / 57. 2.100 libavfilter 6. 68.100 / 6. 68.100 libswscale 4. 3.101 / 4. 3.101 libswresample 2. 4.100 / 2. 4.100