You installed Fedora and the video player shows a black screen
You just finished a fresh install of Fedora Workstation. The desktop looks great. You open a video file from your phone, and the player shows a black screen with a spinning icon. You try to install a game from Steam, and the dependency resolver complains about missing libraries. You check the terminal and see GStreamer errors or ffmpeg is not found. Fedora ships with a clean, open-source base. It does not include proprietary codecs or closed-source drivers by default. You need to add a third-party repository to get this functionality.
What is actually happening
Fedora adheres to strict packaging guidelines. The Fedora Project includes only software that is free and open-source. This means the code must be available for anyone to inspect, modify, and redistribute. It also means the software cannot be restricted by patents or proprietary licenses. Many multimedia codecs, like H.264 or AAC, are encumbered by patents. Including them in the official repositories would violate Fedora's licensing policy. It does not mean these codecs are bad. It means they carry legal restrictions that Fedora cannot accept.
RPM Fusion exists to bridge this gap. It is a community-maintained repository that packages proprietary and patent-encumbered software for Fedora. It integrates seamlessly with dnf. You can install packages from RPM Fusion alongside official Fedora packages without breaking your system. RPM Fusion splits packages into two repositories. The free repository contains open-source software that is not included in Fedora for policy reasons, often because it depends on non-free components. The nonfree repository contains software with proprietary licenses or patent restrictions. Enabling both is standard practice. The free repo often provides the glue that makes the nonfree codecs work with system tools.
The licensing landscape for multimedia is complex. Codecs like H.264 and AAC are covered by patent pools. Distributing software that implements these codecs requires a license agreement. Fedora cannot accept these agreements for the base system. RPM Fusion handles the legal side and provides the packages. This separation allows Fedora to remain strictly open-source while giving users access to the full range of media formats. AV1 is different. It is a royalty-free codec developed by the Alliance for Open Media. Fedora includes AV1 support by default. If you can play AV1 content without issues, your system is working correctly. The missing pieces are almost always H.264, AAC, or HEVC.
Run dnf upgrade --refresh after adding repositories. Stale metadata causes phantom dependency errors.
Enable RPM Fusion and install codecs
Here is how to add the RPM Fusion repositories to your system. The command downloads the release packages for both repositories and installs them. This adds the repository definitions to /etc/yum.repos.d/ and imports the GPG keys automatically.
sudo dnf install https://mirrors.rpmfusion.org/free/fedora/rpmfusion-free-release-$(rpm -E %fedora).noarch.rpm https://mirrors.rpmfusion.org/nonfree/fedora/rpmfusion-nonfree-release-$(rpm -E %fedora).noarch.rpm
# WHY: This downloads the release packages for both the free and non-free repositories.
# WHY: The $(rpm -E %fedora) variable expands to your current Fedora release number automatically.
# WHY: Installing these packages adds the repository definitions to /etc/yum.repos.d/.
# WHY: dnf automatically imports the GPG keys to verify package integrity.
Once the repositories are active, install the multimedia packages. This command installs ffmpeg for command-line tools and the gstreamer1 plugins for desktop applications. The -nonfree variants contain the patent-encumbered codecs.
sudo dnf install ffmpeg gstreamer1-plugins-good gstreamer1-plugins-bad-free gstreamer1-plugins-ugly-free gstreamer1-plugins-bad-nonfree gstreamer1-plugins-ugly-nonfree
# WHY: ffmpeg provides command-line tools for encoding and decoding media.
# WHY: The gstreamer1-plugins packages provide libraries for desktop applications to play video and audio.
# WHY: The -nonfree variants contain patent-encumbered codecs like H.264 and AAC.
# WHY: Installing both free and nonfree gstreamer plugins ensures full compatibility with all formats.
If you have an NVIDIA GPU, the open-source nouveau driver may not provide hardware acceleration for video decoding. RPM Fusion offers the proprietary NVIDIA driver. Install it with akmod-nvidia. This package builds the kernel module for your running kernel.
sudo dnf install akmod-nvidia
# WHY: This installs the NVIDIA driver package and the kernel module builder.
# WHY: akmod compiles the driver against your current kernel automatically.
# WHY: A reboot is required to load the new kernel module and switch to the proprietary driver.
Do not install the NVIDIA driver if you are using a laptop with hybrid graphics unless you know how to configure prime-run. The default installation may cause boot issues on some hardware. Check the RPM Fusion wiki for Optimus instructions before proceeding.
Reboot after installing the NVIDIA driver. The kernel module must load before the desktop starts.
Verify the installation
Confirm the codecs are available to applications. Use ffprobe to check ffmpeg and gst-inspect-1.0 to check the GStreamer plugins. These commands print version information and list the configured decoders.
ffprobe -version
# WHY: This prints the ffmpeg version and lists the configured decoders and encoders.
# WHY: Look for h264 and aac in the output to confirm proprietary support is active.
# WHY: If these are missing, the installation did not complete or the package is corrupted.
gst-inspect-1.0 | grep -i h264
# WHY: This lists all GStreamer plugins that mention h264.
# WHY: A non-empty result means your desktop players can now decode H.264 streams.
# WHY: If the output is empty, run sudo gstreamer1.0-plugin-cache-update to refresh the cache.
Run ffprobe before you blame the player. The error is usually a missing decoder, not a broken file.
Common pitfalls and error messages
You may see GStreamer: Error: Could not initialize GStreamer when opening a video. This usually means the plugin cache is stale. Run sudo gstreamer1.0-plugin-cache-update to fix it. Another common issue involves Flatpak applications. Flatpak apps run in a sandbox and use their own runtimes. Installing native codecs on the host system does not automatically grant access to Flatpak apps. If you use Flatpak for media playback, ensure the Flatpak runtime includes the necessary codecs. Check the runtime version with flatpak info org.gnome.Platform. Newer runtimes include H.264 and AAC support.
DVD playback requires the libdvdcss package. This package is not in RPM Fusion by default due to legal complexity in some regions. You may need to enable the rpmfusion-free-updates-testing repository or install from a specific source depending on your region. If you see Error: GPG check FAILED when installing from RPM Fusion, the key might be expired or corrupted. Reinstall the release package to restore the keys.
sudo dnf reinstall rpmfusion-free-release rpmfusion-nonfree-release
# WHY: This re-downloads the release packages and re-imports the GPG keys.
# WHY: It fixes issues where the keyring became corrupted or keys expired.
# WHY: Run this before attempting to install packages again.
Check the Flatpak runtime. Native codecs do not leak into the sandbox.
When to use RPM Fusion versus alternatives
Use RPM Fusion when you need native integration with your system libraries and want packages managed by dnf. Use Flatpak when you want application isolation and automatic updates independent of the OS release cycle. Use a native build from source when the package is not available in any repository and you need specific compiler flags. Use a virtual machine when the software requires a Windows environment or has dependencies that conflict with Fedora's library versions. Stay on the default Fedora repositories when you are deploying servers or systems where open-source compliance is a strict requirement.
Trust the package manager. Manual file edits drift, snapshots stay.