Most codecs contain pieces of software which are not free or cannot be included in Fedora repositories, adding rpm-fusion’s repositories is required to for many codecs to work, we show methods on how to get codecs working in Fedora.

Enabling rpm-fusion repositories

  • Fedora (22 and later):
sudo dnf install https://download1.rpmfusion.org/free/fedora/rpmfusion-free-release-$(rpm -E %fedora).noarch.rpm https://download1.rpmfusion.org/nonfree/fedora/rpmfusion-nonfree-release-$(rpm -E %fedora).noarch.rpm
  • Silverblue (29 and later):
sudo rpm-ostree install https://download1.rpmfusion.org/free/fedora/rpmfusion-free-release-$(rpm -E %fedora).noarch.rpm https://download1.rpmfusion.org/nonfree/fedora/rpmfusion-nonfree-release-$(rpm -E %fedora).noarch.rpm

See rpmfusion.org/Configuration.

Option A: Minimal setup

A minimal setup to run Firefox consists of

  • Fedora: sudo dnf install ffmpeg-libs
  • Silverblue: sudo rpm-ostree install ffmpeg-libs

This is enough to view YouTube and to browse Reddit, see Youtube’s HTML5 test.

Option B: Alternative Minimal setup

Alternatively one can use the packages ffmpeg and Cisco’s h264 codecs mozilla-openh264, gstreamer1-plugin-openh264, the later are in the fedora-cisco-openh264 repository which can be enabled via

  • Fedora: sudo dnf config-manager --set-enabled fedora-cisco-openh264
  • Silverblue: edit the file /etc/yum.repos.d/fedora-cisco-openh264.repo and set enabled’s value to 1

Option C: Complete suite of codecs

To install the complete suite of multimedia codecs:

  • Fedora: sudo dnf groupupdate Multimedia

This won’t do anything if rpm-fusion’s repositories are not enabled.

VLC and GNOME Videos

While the previous method is perfectly fine for running VLC, it is more advisable to install VLC via Flatpak. This Flatpak comes bundled with all necessary codecs and dependencies by default.

First add Flathub repository:

flatpak remote-add --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo

Then install VLC via:

flatpak install flathub org.videolan.VLC

Alternatively, you can install GNOME Videos:

flatpak install flathub org.gnome.Totem

Firefox flatpak

If you are using the official Firefox Flatpak, which can be installed via

flatpak install flathub org.mozilla.firefox

then you don’t need any additional codecs. If you rather use ffmpeg codecs instead of openh264, install the ffmpeg Flatpak extension version:

flatpak install org.freedesktop.Platform.ffmpeg-full

which matches the runtime of org.mozilla.firefox, which is usually the latest.