Skip to content

Instantly share code, notes, and snippets.

@teocci
Last active March 24, 2022 06:51
Show Gist options
  • Save teocci/4e4b4528c492e787bc97462cfa43e3f5 to your computer and use it in GitHub Desktop.
Save teocci/4e4b4528c492e787bc97462cfa43e3f5 to your computer and use it in GitHub Desktop.

How To Install FFmpeg on CentOS 7 / RHEL 7

The RPM Fusion repository depends on the EPEL software repository. If the EPEL is not enabled on your system, enable it by typing:

## RHEL 7
subscription-manager repos --enable rhel-*-optional-rpms \
                           --enable rhel-*-extras-rpms \
                           --enable rhel-ha-for-rhel-*-server-rpms
yum install https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
## CentOS 7
yum install epel-release

Next, enable the RPM Fusion repository by installing the rpm package :

sudo yum localinstall --nogpgcheck https://download1.rpmfusion.org/free/el/rpmfusion-free-release-7.noarch.rpm

Once the repository is enabled, install FFmpeg:

sudo yum install ffmpeg ffmpeg-devel

Verify the FFmpeg installation by checking its version:

ffmpeg -version

How To Install FFmpeg on CentOS 8 / RHEL 8

First you enable the EPEL on RHEL

sudo dnf -y install https://download.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm
sudo yum-config-manager --enable powertools

## CentOS Stream 8
dnf config-manager --set-enabled powertools
dnf install epel-release epel-next-release

## RHEL 8
subscription-manager repos --enable codeready-builder-for-rhel-8-$(arch)-rpms
dnf install https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm

Then you enable the RPM Fusion for EL

sudo dnf localinstall --nogpgcheck https://download1.rpmfusion.org/free/el/rpmfusion-free-release-8.noarch.rpm
sudo dnf install --nogpgcheck https://download1.rpmfusion.org/nonfree/el/rpmfusion-nonfree-release-8.noarch.rpm

Finally you can install:

sudo dnf -y install ffmpeg ffmpeg-devel

RHEL or compatible like CentOS

sudo dnf install --nogpgcheck https://dl.fedoraproject.org/pub/epel/epel-release-latest-$(rpm -E %rhel).noarch.rpm
sudo dnf install --nogpgcheck https://mirrors.rpmfusion.org/free/el/rpmfusion-free-release-$(rpm -E %rhel).noarch.rpm https://mirrors.rpmfusion.org/nonfree/el/rpmfusion-nonfree-release-$(rpm -E %rhel).noarch.rpm

CentOS Steam 8 requires an additional step

sudo dnf config-manager --enable powertools

CentOS 8 (older version) used a case sensitive name for the PowerTools repository

sudo dnf config-manager --enable PowerTools

RHEL 8 requires an additional step

sudo subscription-manager repos --enable "codeready-builder-for-rhel-8-$(uname -m)-rpms"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment