Install FFmpeg on Fedora 36 – No More “Missing Codec” Headaches
If you’ve ever tried converting a video or ripping an audio track only to get the dreaded “unsupported codec” message, this guide will get your FFmpeg installed and working in minutes.
Why the Official Repos Aren’t Enough
The stock Fedora repositories stop at a very conservative set of media tools. If you’ve seen a “File format not recognized” error when trying to play an MKV file on Fedora, it’s usually because the official ffmpeg build is missing libx264 or libx265. I once spent an afternoon chasing a broken dependency error after pulling `ffmpeg` from the default repo – that’s why we hit RPM Fusion next.
Enable RPM Fusion: The Fast‑Track Path
RPM Fusion provides a fully fledged FFmpeg build with all the codecs you’ll need. Run these commands as root or prefix them with `sudo`.
dnf install epel-release dnf install https://download1.rpmfusion.org/free/fedora/rpmfusion-free-release-$(rpm -E %fedora).noarch.rpm
The first line pulls the Extra Packages for Enterprise Linux set – it’s a prerequisite for many RPM Fusion packages. The second downloads the free branch of RPM Fusion that includes FFmpeg.
Install FFmpeg (and its handy companion, ffprobe)
dnf install ffmpeg ffmpeg-devel ffprobe
The `ffmpeg-devel` package is optional but useful if you plan on compiling your own wrappers or plugins. `ffprobe` gives you a quick way to inspect media files without opening them in a GUI.
Verify the Installation
ffmpeg -version
You should see output that lists the libx264, libx265, and other codecs bundled with the RPM Fusion build. If anything is missing, double‑check the repository list with `dnf repolist` – sometimes the nonfree branch gets skipped by accident.
When You Need a Custom Build (Rare but Useful)
If you’re building FFmpeg for a niche codec or want to tweak optimization flags, compile from source:
dnf group install "Development Tools"
dnf install yasm pkgconfig libtool nasm
git clone https://github.com/FFmpeg/FFmpeg.git
cd FFmpeg
./configure --enable-gpl --enable-nonfree \
--enable-libx264 --enable-libx265 \
--extra-cflags="-I/usr/include" \
--extra-ldflags="-L/usr/lib"
make -j$(nproc)
sudo make install
The `--enable-gpl` flag unlocks many popular codecs, but it also means the binary is GPL‑licensed. Be sure you’re comfortable with that before distributing.
Common Pitfalls & Quick Fixes
- Missing libx264 – Usually solved by installing the free RPM Fusion repo; if you still can’t find it, try `dnf install ffmpeg-libs`.
- “ffmpeg: command not found” after install – The binary is in `/usr/bin`. If it’s missing, run `sudo dnf reinstall ffmpeg` and make sure your `$PATH` includes `/usr/bin`.
- Audio not playing back on some players – Install `pulseaudio-utils` or ensure that the codec pack (`ffmpeg-gpl`) was used.
Alternatives if You’re Not a Fedora Fan
If you switch to Ubuntu or Arch, the steps differ: use `apt install ffmpeg` on Debian‑based systems or `pacman -S ffmpeg` on Arch. The key takeaway remains: always pull FFmpeg from a repository that bundles all the codecs you need.
That’s it—FFmpeg should now be ready for whatever video gymnastics you throw its way.