Skip to content

Get h264 playback on immutable Fedora

📅 Created: Apr 18, 2025

The Problem ​

On immutable Fedora distributions, some websites have issues playing back media and the system itself cannot open most MP4 files with the built-in player, the reason for this is that it lacks the software to read the old but still very common AVC codec, better known as h264.

But why? ​

Fedora ships with the noopenh264 package, which is a placeholder that can be linked against and essentially fakes openh264 while being a dummy that cannot do anything. This is done because Fedora cannot ship regular openh264 with its images due to licensing. However, Cisco already owns a license and makes openh264 available to distros like Fedora in order to support the WebRTC standard, which means the distros have to download openh264 from Cisco's repo when they can, which apparently happens during the first update of the system.

I am not too familiar with the usual procedure of how this works or why it has to be this way, but on the immutable versions of Fedora like Silverblue or Kinoite, which utilize a read-only root filesystem with rpm-ostree, instead of a regular mutable system managed by rpm/dnf, this replacing does not happen and apparently no way of fixing this automatically has been found yet, but we can do this manually:

Installing openh264 ​

In order to fix h264 playback, simply tell rpm-ostree to replace the placeholder with the actual package like so:

bash
$ rpm-ostree override remove noopenh264 --install openh264 --install mozilla-openh264

See https://github.com/fedora-silverblue/issue-tracker/issues/536#issuecomment-1974780009 for more details.