Fedora

Enable RPM Fusion and Install Multimedia Codecs on Fedora 45 / 44 / 43

Open an HEVC MKV or a High-profile H.264 MP4 on a clean Fedora install and you get a “missing decoder” prompt, or sound with no picture. That is by design: Fedora cannot ship H.264, HEVC and the other patent-encumbered codecs, so the stock ffmpeg-free build has them compiled out. RPM Fusion fills the gap, and on Fedora 45, 44 and 43 the fix takes about five commands once you know which ones changed with dnf5.

Original content from computingforgeeks.com - post 167681

This guide enables RPM Fusion free and nonfree, swaps in the full ffmpeg, installs the multimedia codec group, turns on OpenH264, and sets up VA-API hardware decoding for Intel, AMD and NVIDIA. It also covers the two traps I hit on Fedora 45: a plain rpm -Uvh of the release package now fails, and the popular dnf update @multimedia one-liner errors out on any install that is not Workstation or KDE. I ran the whole flow on Fedora 45 and before that on Fedora 44, and checked the Fedora 43 packages against the live RPM Fusion repos.

What ships where on Fedora 45, 44 and 43

The commands are identical on all three releases because every URL and repo file keys off $(rpm -E %fedora) and $releasever. What differs is the FFmpeg major version each release gets from RPM Fusion. These are the builds the repos served when I queried them:

PackageFedora 45Fedora 44Fedora 43Repo
ffmpeg (full)9.0.28.1.37.1.5rpmfusion-free
intel-media-driver26.2.426.1.526.1.5rpmfusion-nonfree
mesa-va-drivers-freeworld26.2.326.2.325.3.6rpmfusion-free
libva-nvidia-driver0.0.180.0.180.0.18Fedora
lame4.03.1003.100Fedora
OpenH264 repoenabledenabledenabledfedora-cisco-openh264

Two things in that table surprise people. LAME and the NVIDIA VA-API bridge now live in Fedora’s own repos, so you no longer pull them from RPM Fusion. And the Cisco OpenH264 repo is enabled by default in the fedora-repos package on 43, 44 and 45, so the old “enable fedora-cisco-openh264” step is only needed if someone switched it off.

1. Bring the system up to date

Start from a fully updated system. The RPM Fusion builds track Fedora’s library versions closely, and a half-updated box is the usual cause of “conflicting requests” errors during the ffmpeg swap:

sudo dnf upgrade --refresh

Reboot if a new kernel landed:

sudo systemctl reboot

2. Enable RPM Fusion free and nonfree

RPM Fusion ships two release packages that drop the repo files and signing keys onto the system. Install both straight from the mirror with dnf. The $(rpm -E %fedora) part expands to your release number, so the same line works on 43, 44 and 45:

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

dnf5 installs both from @commandline and prints a warning that it skipped the OpenPGP check. That is expected: the key that signs these two packages is inside them, so there is nothing to check against yet.

Enable RPM Fusion free and nonfree repositories on Fedora 45 with dnf5

The gotcha here is Fedora 45’s stricter rpm. Downloading the release package and running sudo rpm -Uvh on it, which a lot of older guides still show, now stops with a NOKEY verification failure. Fedora 43 and 44 already ship rpm 6, but with signature enforcement backed out; Fedora 45 turns enforcement on by default as a planned Fedora Change. Use dnf install as above. The exact error and the workaround are in the troubleshooting section.

Confirm the repos are registered:

dnf repo list | grep -i rpmfusion

On our Fedora 45 machine the release package enabled the updates-testing repos. Fedora 44 and 43 get rpmfusion-free-updates and rpmfusion-nonfree-updates in place of the testing entries, and Fedora 45 switches to them once RPM Fusion ships updated rpmfusion-free-release and rpmfusion-nonfree-release packages for 45. This is what Fedora 45 showed:

rpmfusion-free                    RPM Fusion for Fedora 45 - Free
rpmfusion-free-updates-testing    RPM Fusion for Fedora 45 - Free - Test Updates
rpmfusion-nonfree                 RPM Fusion for Fedora 45 - Nonfree
rpmfusion-nonfree-updates-testing RPM Fusion for Fedora 45 - Nonfree - Test Updates

One more Fedora 45 detail: the stock Fedora repo files moved to /usr/share/dnf5/repos.d/ and /etc/yum.repos.d/ ships empty. Third-party repos like RPM Fusion still write their files to /etc/yum.repos.d/, and their keys go to /etc/pki/rpm-gpg/, so that is where to look when you audit what is enabled.

3. Install the AppStream metadata and accept the keys

GNOME Software and KDE Discover only list RPM Fusion apps (Steam, HandBrake, Discord) when the AppStream metadata is installed. This is also the first package pulled from the new repos, so it is where dnf asks you to trust the RPM Fusion keys:

sudo dnf install rpmfusion-free-appstream-data rpmfusion-nonfree-appstream-data

Check the fingerprints against the RPM Fusion keys page before you answer yes. These are the two it imported on the lab machine:

Importing OpenPGP key 0xD651FF2E:
 UserID     : "RPM Fusion free repository for Fedora (2020) <[email protected]>"
 Fingerprint: E9A491A3DE247814E7E067EAE06F8ECDD651FF2E
 From       : file:///etc/pki/rpm-gpg/RPM-GPG-KEY-rpmfusion-free-fedora-45
The key was successfully imported.
Importing OpenPGP key 0x94843C65:
 UserID     : "RPM Fusion nonfree repository for Fedora (2020) <[email protected]>"
 Fingerprint: 79BDB88F9BBF73910FD4095B6A2AF96194843C65
 From       : file:///etc/pki/rpm-gpg/RPM-GPG-KEY-rpmfusion-nonfree-fedora-45
The key was successfully imported.

4. Swap ffmpeg-free for the full ffmpeg

This is the swap that actually fixes playback. Fedora’s ffmpeg-free has no native H.264 or HEVC decoder; on the Fedora 45 lab the only H.264 entry it listed was the Cisco libopenh264 wrapper. RPM Fusion’s ffmpeg is built with x264, x265 and the rest. --allowerasing lets dnf remove the -free libraries in the same transaction:

sudo dnf swap ffmpeg-free ffmpeg --allowerasing

dnf removes eight -free packages and installs eight in their place: ffmpeg, ffmpeg-libs, libavdevice, x264-libs, x265-libs and vvenc-libs from rpmfusion-free, plus ocl-icd and vmaf-models from Fedora. The screenshot trims the transaction to the key lines:

dnf swap ffmpeg-free ffmpeg on Fedora 45 showing libx264 and libx265 encoders

Verify the encoders are there now:

ffmpeg -hide_banner -encoders 2>/dev/null | grep -E 'libx264|libx265|aac'

You should see libx264, libx265 and both AAC encoders:

 V....D libx264              libx264 H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10 (codec h264)
 V....D libx264rgb           libx264 H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10 RGB (codec h264)
 V....D libx265              libx265 H.265 / HEVC (codec hevc)
 A....D aac                  AAC (Advanced Audio Coding)
 A....D libfdk_aac           Fraunhofer FDK AAC (codec aac)

The decoder side changes the same way. Before the swap, ffmpeg -decoders had no plain h264 or hevc line at all; after it, both show up as native decoders. If you only need the ffmpeg command line tool and nothing else from this guide, the dedicated FFmpeg install guide for Fedora goes further into build options and usage.

5. Install the multimedia codec group

The ffmpeg swap covers apps that link libavcodec directly (mpv, VLC, OBS). GStreamer apps (GNOME Videos, Rhythmbox, the GNOME thumbnailer) need the freeworld GStreamer plugins, which come from Fedora’s hidden multimedia group once RPM Fusion is enabled. Use install, which is what RPM Fusion’s own multimedia howto now shows:

sudo dnf install @multimedia --setopt="install_weak_deps=False" --exclude=PackageKit-gstreamer-plugin

Skip this distinction and you can burn ten minutes on it. The older form, sudo dnf update @multimedia, only works when the group is already installed. Workstation and the KDE Plasma edition include multimedia as a required group, so it works there. On Server, Cloud, or a minimal install dnf5 refuses with “No match for argument: multimedia”. The install form works everywhere, and on a desktop that already has the group it simply pulls the missing freeworld packages:

dnf update @multimedia fails on Fedora 45 while dnf install @multimedia installs the RPM Fusion codecs

The RPM Fusion side of that transaction is what matters: gstreamer1-plugins-bad-freeworld, gstreamer1-plugins-ugly, libheif-freeworld (HEIC photos from iPhones) and pipewire-codec-aptx for aptX Bluetooth headphones. The two flags keep the transaction small and stop PackageKit’s codec installer from being pulled back in.

You may have seen dnf group install sound-and-video in older guides. On Fedora 44 and 45 that group has no mandatory or default packages, only optional ones, so installing it adds nothing. Install the apps you want by name instead. LAME for MP3 encoding is a normal Fedora package now:

sudo dnf install lame

6. Check OpenH264 for Firefox and WebRTC

Firefox plays normal web video through the system ffmpeg libraries, so step 4 already covers YouTube and friends. WebRTC calls are the exception: Firefox handles H.264 there through Cisco’s OpenH264 plugin, which comes from Fedora’s own fedora-cisco-openh264 repo because Cisco pays the H.264 royalty per download. Install the codec, the GStreamer plugin and the Mozilla plugin:

sudo dnf install openh264 gstreamer1-plugin-openh264 mozilla-openh264

mozilla-openh264 comes from the Cisco repo. This capture was taken before step 5; after the multimedia group, gstreamer1-plugin-openh264 is already present, so expect only the Mozilla plugin and its dependency:

Package                     Arch   Version         Repository                 Size
Installing:
 mozilla-openh264           x86_64 0:2.6.0-3.fc45  fedora-cisco-openh264   1.1 MiB
Installing dependencies:
 mozilla-filesystem         x86_64 0:1.9-39.fc45   fedora                  0.0   B

If dnf says it cannot find mozilla-openh264, the Cisco repo was disabled at some point. Turn it back on with the dnf5 config-manager syntax, which writes an override to /etc/dnf/repos.override.d/99-config_manager.repo rather than editing the repo file. On a minimal install, config-manager needs the dnf5-plugins package first:

sudo dnf install dnf5-plugins
sudo dnf config-manager setopt fedora-cisco-openh264.enabled=1

7. Turn on hardware video decoding (VA-API)

Software decoding works after step 5, but a 4K HEVC file will still pin a laptop CPU. VA-API hands decode to the GPU. The package depends on the vendor. Install libva-utils first so you have vainfo to check the result:

sudo dnf install libva-utils

Intel (Broadwell and newer)

Fedora ships libva-intel-media-driver, a build with some codecs stripped. RPM Fusion nonfree has the full intel-media-driver. Run the swap after step 5, because the multimedia group pulls the Fedora build back in if it is missing:

sudo dnf swap libva-intel-media-driver intel-media-driver --allowerasing

The RPM Fusion build declares that it provides libva-intel-media-driver, so later dnf upgrade runs keep it in place instead of flipping back. RPM Fusion’s own howto simply runs sudo dnf install intel-media-driver; the swap does the same job and removes the Fedora build in one step. For pre-Broadwell chips, install libva-intel-driver from rpmfusion-free instead.

AMD Radeon

Fedora’s Mesa has the H.264 and HEVC VA-API entry points disabled. The freeworld build restores them. On Fedora 44 and 45 the old mesa-va-drivers package is folded into mesa-dri-drivers (Fedora 43 still ships it separately), and mesa-va-drivers-freeworld installs alongside it with no swap needed:

sudo dnf install mesa-va-drivers-freeworld

RPM Fusion also recommends the freeworld Vulkan driver for Vulkan Video decode (used by recent mpv and some browsers):

sudo dnf swap mesa-vulkan-drivers mesa-vulkan-drivers-freeworld

If you run Steam or other 32-bit apps, repeat both with the .i686 suffix.

NVIDIA

The proprietary NVIDIA driver has no native VA-API support. libva-nvidia-driver bridges VA-API to NVDEC, and it is in the main Fedora repos on all three releases. It only works with the proprietary akmod-nvidia driver from RPM Fusion nonfree loaded, not with nouveau:

sudo dnf install libva-nvidia-driver

Check the driver with vainfo

Run vainfo from a desktop session on the real machine:

vainfo | grep -E 'Driver version|VAProfileH264|VAProfileHEVC'

A working setup names the driver (iHD for Intel, Mesa Gallium for AMD, NVDEC for NVIDIA) and lists VAProfileH264 and VAProfileHEVC entries. My Fedora 45 lab was a GPU-less VM, so it could only confirm the packages install cleanly. vainfo there printed “failed to initialize display” because there is no /dev/dri device, which is the same message you get on real hardware when the kernel driver did not load.

8. DVD playback and extra firmware (tainted repos)

Encrypted DVDs need libdvdcss, which lives in RPM Fusion’s separate “tainted” repos because its legal status varies by country. Enable them and install it:

sudo dnf install rpmfusion-free-release-tainted rpmfusion-nonfree-release-tainted
sudo dnf install libdvdcss

The nonfree tainted repo also carries firmware without a clear redistribution license. Only pull it if a device on your machine actually needs it:

sudo dnf --repo=rpmfusion-nonfree-tainted install "*-firmware"

9. Prove it with a test clip

The Big Buck Bunny download link that most codec guides use (including the earlier version of this one) now returns a 404 page, which ffmpeg then reports as “moov atom not found”. Generate your own H.264 clip instead, then transcode it to HEVC. This exercises the encoders and decoders you just installed with no download at all:

ffmpeg -y -hide_banner -v error -f lavfi -i testsrc2=size=1280x720:rate=30 -f lavfi -i sine=frequency=440 -t 10 -c:v libx264 -pix_fmt yuv420p -c:a aac sample.mp4
ffmpeg -hide_banner -v error -i sample.mp4 -c:v libx265 -preset ultrafast -c:a copy sample-hevc.mkv
ffprobe -hide_banner sample-hevc.mkv 2>&1 | grep Stream

ffprobe should report an HEVC video stream and an AAC audio stream:

  Stream #0:0: Video: hevc (Main), yuv420p(tv, progressive), 1280x720 [SAR 1:1 DAR 16:9], 30 fps, 30 tbr, 1k tbn (default)
  Stream #0:1: Audio: aac (LC), 44100 Hz, mono, fltp (default)

To check the GStreamer side (what GNOME Videos uses), push the HEVC file through a decode pipeline. On the lab machine it exited with status 0 and no warnings; a missing decoder makes it print an error and exit non-zero:

gst-launch-1.0 -q filesrc location=sample-hevc.mkv ! decodebin ! fakesink; echo "exit: $?"

After that, ffplay sample.mp4, mpv or VLC on Fedora all play the files without prompts. Kodi picks up the same libraries, so the Kodi media center setup works straight after this guide.

Troubleshooting the errors I actually hit

Error: “No match for argument: multimedia”

You ran dnf update @multimedia (or dnf upgrade @multimedia) on a system where the group was never installed, which is every Server, Cloud and minimal install. dnf5 only upgrades groups that are already installed. Run sudo dnf install @multimedia with the same flags instead. The group is hidden, so dnf group list does not show it; dnf group list --hidden does.

Error: “package rpmfusion-free-release-45-0.2.noarch does not verify: … NOKEY”

This is Fedora 45’s rpm refusing a package whose signing key is not in the keyring yet. It appears when you install the downloaded release package with rpm directly:

Verifying...                          ########################################
warning: rpmfusion-free-release-45.noarch.rpm: Header OpenPGP V4 RSA/SHA256 signature, key ID e06f8ecdd651ff2e: NOKEY
Preparing...                          ########################################
	package rpmfusion-free-release-45-0.2.noarch does not verify: Header OpenPGP V4 RSA/SHA256 signature, key ID e06f8ecdd651ff2e: NOKEY

Fedora 44 installs the same file with only a warning because its rpm does not enforce signatures. The clean fix on every release is to install with dnf install ./rpmfusion-free-release-*.noarch.rpm (or the URL form from step 2), which accepts local packages and then imports the key on the first repo transaction. rpm -Uvh --nosignature also works but skips the check you actually want.

Error: “moov atom not found” / “Invalid data found when processing input”

The file is not a video. In my case curl -L -o sample.mp4 saved a 146 byte 404 page from the dead Blender mirror. Check with ls -la and file sample.mp4 before blaming the codecs, or generate a local clip as in step 9.

Do I still need libavcodec-freeworld?

No, not after the ffmpeg swap. libavcodec-freeworld exists only to add the missing codecs on top of ffmpeg-free. The multimedia group lists it as a conditional package that installs only when libavcodec-free is present, so once step 4 removes that library it stays out of the way.

Browser video still stutters or uses the CPU

Codecs and hardware decode are separate problems. If playback works but CPU usage is high, run the vainfo check from step 7 first. No profiles listed means the VA-API driver is wrong or missing for your GPU; profiles listed but high CPU means the browser is not using VA-API, which is a browser setting and not a codec issue.

With codecs sorted, the rest of a new desktop setup is in things to do after installing Fedora Workstation, and apps that are not packaged as RPMs come from Flathub on Fedora. Flatpak apps bundle their own codec runtimes, so nothing in this guide affects them. If you are still on an older release, install Fedora 45 fresh or read what changed in Fedora 45 first, then run the steps above; the dnf5 cheat sheet covers the swap, group and config-manager syntax used throughout.

Keep reading

Harden Fedora 44 / 43 / 42 for Desktop and Server: Complete Guide Fedora Harden Fedora 44 / 43 / 42 for Desktop and Server: Complete Guide Things to Do After Installing Fedora 44 Workstation Fedora Things to Do After Installing Fedora 44 Workstation How to Install KVM on Fedora 45 / 44 with virt-manager Fedora How to Install KVM on Fedora 45 / 44 with virt-manager Fedora Silverblue vs Workstation 45: Which One to Install Fedora Fedora Silverblue vs Workstation 45: Which One to Install Install JetBrains Toolbox, IntelliJ IDEA and PyCharm on Fedora Fedora Install JetBrains Toolbox, IntelliJ IDEA and PyCharm on Fedora Configure GNOME Tweaks and Extensions on Fedora 45 / 44 Fedora Configure GNOME Tweaks and Extensions on Fedora 45 / 44

3 thoughts on “Enable RPM Fusion and Install Multimedia Codecs on Fedora 45 / 44 / 43”

    • Glad it helped. RPM Fusion plus the codec swap is the one step a fresh Fedora install always needs and never ships with by default.

      Reply
  1. Fedora is really hypocritical on this. They defend not shipping patented codecs because of their US jurisdiction and “copyright” yet they happily accept copyright violating GenAI slop code into the project.

    Reply

Leave a Comment

Press ESC to close