在 CentOS 7 上安装 ffmpeg | Install ffmpeg on CentOS 7
更新于 20/04/2018
来源:https://blog.csdn.net/qq_34627459/article/details/74956569
- 安装 EPEL Release,因为安装需要使用其他的 repo 源。
yum install -y epel-release
如果出现缺少 Code 提示,可以:
sudo rpm –import /etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-7
安装完成之后,通过下列命令查看是否成功
yum repolist
2. 安装 Nux-Dextop 源
导入一个 Code
sudo rpm –import http://li.nux.ro/download/nux/RPM-GPG-KEY-nux.ro
安装nux-dextop 源
sudo rpm -Uvh http://li.nux.ro/download/nux/dextop/el7/x86_64/nux-dextop-release-0-1.el7.nux.noarch.rpm
查看 repo 源是否安装成功
yum repolist
3. yum 安装 ffmpeg
yum install -y ffmpeg
例如:把 mp3 转换成 ogg 可以运行下面的命令行:
wget https://example.com/mpthreetest.mp3
ffmpeg -i mpthreetest.mp3 -c:a libvorbis -q:a 4 mpthreetest.ogg
访问项目网站获得更多信息。
Updated on 20/04/2018
Source: https://blog.csdn.net/qq_34627459/article/details/74956569
- Install EPEL Release because of the denpendence on other repositories.
If it comes with warning -"lacks Code", you can do
sudo rpm –import /etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-7
After installation, you can input following code to see if that works.
yum repolist
2. Install Nux-Dextop repositories.
Import a code:
sudo rpm –import http://li.nux.ro/download/nux/RPM-GPG-KEY-nux.ro
Install nux-dextop repositories.
sudo rpm -Uvh http://li.nux.ro/download/nux/dextop/el7/x86_64/nux-dextop-release-0-1.el7.nux.noarch.rpm
Make sure if that works.
yum repolist
3. Use yum to install ffmpeg.
yum install -y ffmpeg
eg. You can use following code to convert mp3 files into ogg format.
wget https://example.com/mpthreetest.mp3
ffmpeg -i mpthreetest.mp3 -c:a libvorbis -q:a 4 mpthreetest.ogg
Visit project site for more information.