Guides 11792 Published by

The guide explains how to obtain the latest FFmpeg binaries on CentOS 9 Stream by adding RPM‑Fusion and enabling the required repositories, eliminating the need for compiling from source. It begins with a reminder that root or sudo privileges are necessary because the package manager writes to system directories, then walks through installing EPEL, turning on CRB, and creating the rpmfusion repo file with a single cat command. Once those repos are enabled you run dnf install -y ffmpeg ffmpeg-libs for basic use, adding the optional non‑free packages if H.264 or other proprietary codecs are required; after installation a quick ffmpeg –version check confirms the build flags and compiler used. The article also lists common pitfalls—such as missing CRB leading to “Package not found,” stale EPEL metadata needing a clean cache, and encoder errors that resolve by installing the non‑free libs—before concluding that FFmpeg is now ready for conversion or streaming tasks.



Install FFmpeg on CentOS 9 Stream in Minutes

You’ll learn how to pull the latest FFmpeg binaries straight from RPM‑Fusion and have them ready for video conversion or streaming without wrestling with build scripts. No more “I get a compile error because of missing headers” headaches.

Prerequisites: Root Access is a Must

You need either root or sudo privileges. If you’re running as a normal user, prepend every command with `sudo`.

Why? The package manager touches system directories; without elevation it will just refuse.

sudo -i
Enable EPEL and the CRB Repository

CentOS 9 Stream ships with an “AppStream” section but hides many developer tools behind the CRB (CodeReady Builder) repo.

Without enabling these, FFmpeg’s dependencies will be missing.

dnf install -y epel-release
dnf config-manager --set-enabled crb

I’ve seen users get stuck at “No matching package” for libx264 unless CRB is active.

Add the RPM‑Fusion Repository

RPM‑Fusion hosts the official FFmpeg build for CentOS.

Add the repo file manually – it’s a single line that tells dnf where to look.

cat <<'EOF' | sudo tee /etc/yum.repos.d/rpmfusion-free.repo
[rpmfusion-free]
name=RHEL $releasever - RPM Fusion Free
baseurl=https://download1.rpmfusion.org/free/el/$releasever/os/\$basearch/
enabled=1
gpgcheck=0
EOF

If you’re on a 64‑bit machine, that `$basearch` expands to `x86_64`; otherwise adjust accordingly.

Install FFmpeg and Optional Extras

Now the real work: install FFmpeg plus the most common codecs.

dnf install -y ffmpeg ffmpeg-libs

Why the libs?

`ffmpeg` pulls the executable, `ffmpeg-libs` brings the shared libraries that many media tools rely on (like VLC or GStreamer). Without them you’ll get “missing library” errors.

If you plan to encode H.264/5 or use audio codecs beyond AAC, you might want the non‑free components:

dnf install -y ffmpeg-nonfree ffmpeg-nonfree-libs
Verify the Installation

A quick version check confirms everything worked.

ffmpeg -version

You should see something like:

ffmpeg version Copyright (c) 2000-2022 ...
built with gcc ...
configuration: --enable-gpl --enable-nonfree ...
...

If the command returns a help screen, you’re golden.

Common Pitfalls and Quick Fixes

* Missing `crb` – If you get “Package ffmpeg not found,” re‑run the CRB enable step.

* EPEL stale metadata – Occasionally the EPEL cache lags; run `dnf clean all && dnf makecache`.

* Non‑free codec errors – Trying to encode with libx264 without installing the non‑free libs throws an “Unknown encoder” error. Install the nonfree packages.

That’s it—FFmpeg on CentOS 9 Stream is now ready for converting, streaming, or whatever media magic you have in mind.