The missing codec problem
You plug in a drive full of video files, run a conversion script, and FFmpeg refuses to process the stream. The terminal prints a hard failure about missing decoders. Or you try to install the tool on a fresh Fedora Workstation and dnf tells you the package is unavailable. The base system deliberately leaves patent-encumbered codecs out of the default repositories. You need to bridge that gap before the command line will cooperate.
What the package manager is actually happening
Fedora enforces a strict software licensing policy. The official repositories contain only freely licensed software. FFmpeg itself is free and open source, but the hardware acceleration drivers and common media formats like H.264, AAC, and MP3 fall under patent restrictions. Fedora maintainers removed those libraries from the base repos to avoid legal friction. That means the ffmpeg package exists in the upstream build system, but it compiles without the external libraries that actually make it useful for everyday media work.
RPM Fusion fills this gap. It is a community-maintained repository that provides the missing codecs, multimedia frameworks, and proprietary drivers without modifying core Fedora packages. The repository splits into two tracks. The free track contains open source software that depends on patent-encumbered libraries. The non-free track contains closed source drivers and firmware. FFmpeg lives in the free track. Enabling it adds a .repo file to /etc/yum.repos.d/ and tells dnf where to fetch the missing dependencies.
Trust the package manager. Manual file edits drift, snapshots stay.
Enable the repository and install
The repository setup is a one-time step. You fetch the official release package, install it, and refresh the local metadata cache. The package uses a shell substitution to match your exact Fedora release number, so the command works across versions without manual URL editing.
Here is how to add the RPM Fusion free repository and update the package cache.
# Download the RPM Fusion free repository configuration package
# The $(rpm -E %fedora) substitution ensures the URL matches your exact release
sudo dnf install https://mirrors.rpmfusion.org/free/fedora/rpmfusion-free-release-$(rpm -E %fedora).noarch.rpm
# Refresh the local metadata cache so dnf recognizes the new package sources
sudo dnf upgrade --refresh
Once the repository is active, dnf can resolve the full dependency tree. The core package pulls in the runtime libraries, the binary, and the man pages. You can optionally install the development headers if you plan to compile custom filters or language bindings later.
Here is how to install FFmpeg and its optional development files.
# Install the core FFmpeg binary and its runtime dependencies
sudo dnf install ffmpeg
# Install the development headers if you plan to compile custom filters or bindings
sudo dnf install ffmpeg-devel
Run the installation from a terminal with standard user privileges. sudo handles the authentication prompt. Do not force the transaction with --skip-broken if dnf reports a conflict. The conflict usually means your metadata cache is stale or a third-party repo is interfering. Clear the cache and run the refresh command again.
Verify the build configuration
A successful installation does not guarantee codec support. FFmpeg compiles against whatever libraries are present at build time. You need to confirm that the RPM Fusion build included the encoders and decoders you actually need.
Here is how to check the installed version and verify codec availability.
# Print the build configuration and linked library versions
ffmpeg -version
# Verify that H.264 and AAC are compiled in as both encoders and decoders
ffmpeg -codecs | grep -E "h264|aac"
The version output shows the compiler flags and the external libraries linked at build time. Look for --enable-libx264 and --enable-libfdk-aac in the configuration line. The codec list output shows a matrix of supported formats. You want to see D for decode and E for encode next to h264 and aac. If you only see D or E, the build is missing the corresponding library. Reinstall the package with sudo dnf reinstall ffmpeg and check your repository priorities.
Run ffmpeg -codecs before you start a batch conversion. Half the time the symptom is a missing encoder, not a broken script.
Common errors and how to resolve them
The installation process fails in predictable ways. Each error points to a specific misconfiguration. Read the exact wording before guessing.
The dnf install ffmpeg command will refuse to proceed and print Error: Nothing provides libavcodec.so.60()(64bit) needed by ffmpeg-1:6.x. The missing shared library means RPM Fusion is not enabled or the metadata cache is empty. Run the repository installation command again and refresh the cache.
If you see Could not find encoder for codec libx264 during a conversion, the FFmpeg binary was built without the H.264 library. This happens when the free repository is disabled or when a higher-priority repo provides a stripped-down build. Check your repository priorities with dnf repolist and ensure rpmfusion-free is active.
SELinux denials appear when you run FFmpeg as a background service or inside a container. The audit log prints avc: denied { execute } for pid=1234 comm="ffmpeg". Read the one-line summary in journalctl -t setroubleshoot before disabling the security module. The denial usually points to a missing file context label or a misconfigured systemd unit. Fix the label with restorecon -v /path/to/script or adjust the service sandbox settings.
Never edit files in /usr/lib/. Those paths ship with the package and get overwritten on the next update. Place custom configurations or wrapper scripts in /etc/ or your home directory.
Check the actual error message before modifying system files. Guessing breaks recovery.
Choose the right installation method
Different workflows require different package sources. Pick the approach that matches your stability and isolation needs.
Use RPM Fusion when you want a stable, package-managed FFmpeg that updates automatically with system upgrades. Use the Flatpak version when you need a completely sandboxed environment that ignores host libraries and works across distributions. Compile from source when you require experimental filters or hardware acceleration patches that have not yet reached the stable repository. Stick to the base repository version when you only need lossless formats like VP8 or FLAC and want to avoid third-party repos.
Run dnf upgrade --refresh weekly to keep the repository metadata current. Future-you will thank you.