安装
# 创建目录
$ mkdir /www/server/ffmpeg
# 进入目录
$ cd /www/server/ffmpeg
# 下载安装包
$ wget https://johnvansickle.com/ffmpeg/release-source/ffmpeg-4.1.tar.xz
# 解压
$ tar -Jxvf ffmpeg-4.1.tar.xz
# 进入解压后目录
$ cd ffmpeg-4.1/
# 配置,开启openssl,因为我要用来解析远程URL视频
$ ./configure --enable-openssl
# 编译&安装
$ make & make install
# 查看当前目录,ffmpeg为可执行文件,可以将其加入环境变量
$ pwd && ls
/www/server/ffmpeg/ffmpeg-4.1
Changelog COPYING.GPLv2 ffbuild INSTALL.md libavutil Makefile tools
compat COPYING.GPLv3 ffmpeg libavcodec libpostproc presets VERSION
config.asm COPYING.LGPLv2.1 ffmpeg_g libavdevice libswresample README.md
config.h COPYING.LGPLv3 ffprobe libavfilter libswscale RELEASE
configure CREDITS ffprobe_g libavformat LICENSE.md RELEASE_NOTES
CONTRIBUTING.md doc fftools libavresample MAINTAINERS tests
测试
# 进入可执行文件的目录,我没有加入环境变量
$ cd /www/server/ffmpeg/ffmpeg-4.1
$ ./ffmpeg -version
ffmpeg version 4.1 Copyright (c) 2000-2018 the FFmpeg developers
built with gcc 4.8.5 (GCC) 20150623 (Red Hat 4.8.5-44)
configuration: --enable-openssl
libavutil 56. 22.100 / 56. 22.100
libavcodec 58. 35.100 / 58. 35.100
libavformat 58. 20.100 / 58. 20.100
libavdevice 58. 5.100 / 58. 5.100
libavfilter 7. 40.101 / 7. 40.101
libswscale 5. 3.100 / 5. 3.100
libswresample 3. 3.100 / 3. 3.100
如果 ./configure 报错请安装 yasm
$ yum install yasm