使用 yum 在 CentOS 上安装 ffmpeg

ffmpeg 是一款免费、开源的音视频转换工具,我们在使用 youtube-dl 下载视频的时候,也会用到该工具,如果没有安装 ffmpeg,我们在下载视频的时候就不能正常合并。

FFmpeg 是一个开放源代码的自由软件,可以转换多种音、视频格式,它是由法国天才程序员 Fabrice Bellard 发起的。FFmpeg 中的“FF”代表的是“Fast Forward”(快速前进),凭借其强大的功能,FFmpeg 已经成为视频处理领域最常用的开源软件,被包括 YouTube、iTunes 在内的视频网站和商业软件都在广泛使用。

对于 CentOS 用户来说,习惯使用 yum 安装,默认的 yum 源没有包含 ffmpeg,我们给系统增加一个源,在增加源之前需要安装 epel-release:

yum install -y epel-release
yum -y update

安装 yum 源

对于使用 CentOS 7 的用户,使用下面的命令:

rpm --import http://li.nux.ro/download/nux/RPM-GPG-KEY-nux.ro
rpm -Uvh http://li.nux.ro/download/nux/dextop/el7/x86_64/nux-dextop-release-0-5.el7.nux.noarch.rpm

使用 CentOS 6 的用户,使用下面的命令:

rpm --import http://li.nux.ro/download/nux/RPM-GPG-KEY-nux.ro
rpm -Uvh http://li.nux.ro/download/nux/dextop/el6/x86_64/nux-dextop-release-0-2.el6.nux.noarch.rpm

安装 ffmpeg

安装好 yum 源之后,安装 ffmpeg 就非常简单了:

yum install -y ffmpeg ffmpeg-devel

安装完之后,就可以使用 # ffmpeg -version 检查是否安装成功。

ffmpeg -version

ffmpeg -version 命令查看安装是否成功

发表回复

您的电子邮箱地址不会被公开。 必填项已用 * 标注

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>