How to Enable H.264 on Chromium on Silverblue

Hello! We need H.264 on YouTube either on live streaming shows or on freshly uploaded videos, before Google re-encode them on VP8/9, or for playing videos on other socials like Twitter

my installed packages

H.264 On Chromium

Adding H.264 on Chromium on Silverblue is exactly the same procedure as in normal Fedora

First to install Chromium, since it is on Fedora repos

$ rpm-ostree install chromium

I’m gonna use RPM-Fusion, because Negativo17 doesn’t support Fedora 29 yet which is what I’m running here. I suppose you already know how RPM-Fusion works, so I will keep this guide minimal

First we create a repo file:

$ sudo vi /etc/yum.repos.d/rpmfusion-free.repo

And we add:

name=RPM Fusion for Fedora $releasever - Free
#baseurl=http://download1.rpmfusion.org/free/fedora/releases/$releasever/Everything/$basearch/os/
metalink=https://mirrors.rpmfusion.org/metalink?repo=free-fedora-$releasever&arch=$basearch
enabled=1
#metadata_expire=14d
type=rpm-md
gpgcheck=0
repo_gpgcheck=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-rpmfusion-free-fedora-$releasever

Then we install chromium-libs-media-freeworld

$ rpm-ostree install chromium-libs-media-freeworld

We restart to apply the changes, and then we can check that everything works as expected

So we can use RPM-Fusion for codecs similar to Fedora. And don’t copy that code. I even have disabled the GPG. Go to RPM-Fusion to properly add the repos

H.264 On Firefox

I don’t use Firefox, and the bellow method won’t work, but I will refer it anyway. Besides you can use RPM-Fusion for Firefox too I guess

First we enable the Cisco repo that is pre-installed but disabled, on Silverblue

$ sudo vi /etc/yum.repos.d/fedora-cisco-openh264.repo
[fedora-cisco-openh264]
name=Fedora $releasever openh264 (From Cisco) - $basearch
baseurl=https://codecs.fedoraproject.org/openh264/$releasever/$basearch/
type=rpm
enabled=1
enabled_metadata=1
metadata_expire=14d
repo_gpgcheck=1
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora-$releasever-$basearch
skip_if_unavailable=False

Then we install mozilla-openh264 that by the name *I assumed* that adds H.264 capabilities to Firefox HTML5 player

$ rpm-ostree install mozilla-openh264

Then we restart to apply the changes, and when we try it we see that it doesn’t work!.. at least not for YouTube

But I guess you can make it work with RPM Fusion and H.264 instead of OpenH264

Bye!

That was pretty quick, and I only did because someone asked me on Twitter! See ya!