目 录CONTENT

文章目录

Linux 安装 FFmpeg

ABin
2025-01-24 / 0 评论 / 0 点赞 / 50 阅读 / 0 字

Rocky Linux 9

1. 启用 EPEL 和 RPM Fusion 仓库

  • ffmpeg 通常在默认的 Rocky Linux 官方仓库中不可用,因此需要启用额外的软件源,比如 EPELRPM Fusion

安装 EPEL(Extra Packages for Enterprise Linux):

sudo dnf install epel-release -y

安装 RPM Fusion 仓库:

  • 启用免费和非免费 RPM Fusion 仓库

sudo dnf install https://mirrors.rpmfusion.org/free/el/rpmfusion-free-release-$(rpm -E %rhel).noarch.rpm
sudo dnf install https://mirrors.rpmfusion.org/nonfree/el/rpmfusion-nonfree-release-$(rpm -E %rhel).noarch.rpm

2. 安装 FFmpeg

  • 启用仓库后,直接通过 dnf 安装:

sudo dnf install ffmpeg ffmpeg-devel -y
......
依赖关系解决。
====================================================================================================
 软件包               架构      版本                                仓库                       大小
====================================================================================================
安装:
 ffmpeg               x86_64    5.1.6-2.el9                         rpmfusion-free-updates    1.7 M
 ffmpeg-devel          x86_64          5.1.6-2.el9            rpmfusion-free-updates          801 k
安装依赖关系:
......

3. 验证安装

  • 安装完成后,运行以下命令验证:

ffmpeg -version
  • 输出类似以下内容,表示安装成功:

ffmpeg version 5.1.6 Copyright (c) 2000-2024 the FFmpeg developers
built with gcc 11 (GCC)
......

0

评论区