参考
- https://www.jianshu.com/p/94a1759ceb34 centos7
- https://www.cnblogs.com/javabianhua/p/13256281.html centos8
- https://blog.csdn.net/martinking1997/article/details/103339686/ centos 8
- https://www.cnblogs.com/architectforest/p/12807683.html centos8
Ubuntu
sudo apt install ffmpeg apt包
sudo snap install ffmpeg snap包
ffmpeg -version
Centos8
安装sdl软件包
SDL(Simple DirectMedia Layer)是一个自由的跨平台的多媒体开发包,
适用于 游戏、游戏SDK、演示软件、模拟器、MPEG播放器和其他应用软件
没有sdl包的情况下安装ffmpeg时,dnf会提示缺少libSDL2-2.0.so.0()
https://mirrors.aliyun.com/centos/8/PowerTools/x86_64/os/Packages/SDL2-2.0.10-2.el8.x86_64.rpm
安装rpmfusion仓库
dnf install https://download1.rpmfusion.org/free/el/rpmfusion-free-release-8.noarch.rpm
如果没有rpmfusion这个仓库,安装ffmpeg时dnf会提示找不到匹配
dnf包管理工具安装ffmpeg
dnf install ffmpeg
ffmpeg -version
Centos7
RPM Fusion存储库
参考 How to Install and Use FFmpeg on CentOS 7
#依赖epel存储库,安装epel存储库
sudo yum install epel-release -y
sudo yum update -y
#安装启用RPM Fusion
sudo yum localinstall --nogpgcheck https://download1.rpmfusion.org/free/el/rpmfusion-free-release-7.noarch.rpm
#安装ffmpeg
sudo yum install ffmpeg ffmpeg-devel
#查看版本
ffmpeg -version
ffmpeg version 3.4.8 Copyright (c) 2000-2019 the FFmpeg developers
经测试这个仓库速度很慢
Nux Dextop YUM 存储库
参考 How to Install FFmpeg on CentOS
#依赖epel存储库,安装epel存储库
sudo yum install epel-release -y
sudo yum update -y
#安装Nux Dextop存储库
sudo rpm --import http://li.nux.ro/download/nux/RPM-GPG-KEY-nux.ro
sudo rpm -Uvh http://li.nux.ro/download/nux/dextop/el7/x86_64/nux-dextop-release-0-5.el7.nux.noarch.rpm
#安装ffmpeg
sudo yum install ffmpeg ffmpeg-devel -y
#查看版本
ffmpeg -version
ffmpeg version 2.8.15 Copyright (c) 2000-2018 the FFmpeg developers
经测试这个仓库速度有时候也很慢
源码编译安装ffmpeg