How to fix video playback on Firefox or Chromium?

I’m new to Fedora and confused why video playback doesn’t work (only loading icon or black screen) on streaming sites with Firefox or Chromium (flatpak). I’ve tested the same sites with Ubuntu and Arch Linux and there’s no problem with either distro.

Installing the flathub flatpak instead of the fedora flatpak (in Software there should be a drop down menu under the install/uninstall button to select the source, you might have to activation flathub repo in Software repository setting) should give you video playback, if you are using the rpm version of firefox you need to add the rpm fusion repository and install the codecs from the repo.

You need to install all the codecs from RPM Fusion.

Easy instructions are at

1 Like

I managed to activate the flathub repo and install Firefox from there but unfortunately didn’t fix the video playback issue.

I couldn’t get it to work on atomic version of Fedora.

On Fedora Atomic, using the rpm version of Firefox, running this command:

sudo rpm-ostree override remove noopenh264 --install mozilla-openh264

should give you basic video playback, you might still need to install rpm-fusion codecs for better support.

See this to add rpm fusion to Fedora Atomic: Making sure you're not a bot!

3 Likes

Thanks for helping me. I couldn’t figure out which codec I’m missing. What is the difference between mozilla-openh264 and openh264? I’ve tried both and neither of them fixes the issue.
Does normal Fedora have easier way of installing the codecs or is it the same with every flavor?

I’m not sure, but on my install of Fedora Silverblue I have mozilla-openh264 installed and it gives me video playback.

Just to be sure this is for the rpm version of Firefox, also after running the command you need to reboot for the change to take effect.

There are two ways of installing Fedora codecs. One way (for regular Fedora) is the tutorial from RPM Fusion I linked.

The other way (for Atomic Fedora) is detailed in the DOcs page Alexandre linked.

It will not be the rpm version of Fedora, as Oh Yeah is on Atomic Fedora.

They will have to install the RPM Fusion repo in the docs article you linked and then it should work. The relevvant command to install RPMFusion on Atomic is

$ sudo rpm-ostree install
https://mirrors.rpmfusion.org/free/fedora/rpmfusion-free-release-$(rpm -E %fedora).noarch.rpm
Making sure you're not a bot!(rpm -E %fedora).noarch.rpm
$ reboot

AFTER you have installed RPM Fusion - they will need to install the actual codecs (which maybe someone on Atomic can say how to do that.

If following those instructions don’t work, then there is a bug. A bug I can’t help with as I am on Regular Fedora.

Hello @yeah2056 and welcome to :fedora: !

Every single “Firefox can’t play videos” topic is essentially the same:

  • Make sure Fedora’s Firefox Flatpak is removed
  • Set up Flathub and install Firefox from Flathub
  • Mask the default Firefox installation that comes with the image by following the instructions in the documentation

Are you sure you followed the instructions above?

1 Like

By default, the installed version of Firefox on Atomic Fedora is the rpm version. In my case layering mozilla-openh264 on my Silverblue install gave me playback.

For the flathub flatpak version of Firefox, maybe you need to install the Codecs Extra Extension or OpenH264 Extension for the Freedesktop Platform. In Software, in the installed tab look for the Freedesktop Platform entry, click on it and you should see a list of extensions that you can install.

1 Like

Please post the output of:

$ flatpak list | grep -E "firefox|ffmpeg"

It was:

Firefox org.mozilla.firefox 147.0.3 stable flathub system

I mistakenly assumed that flatpak would pull this codec as a dependency. :melting_face: :flushed_face:
Manually installing org.freedesktop.Platform.ffmpeg-full (24.08) fixed the issue for me. Thank you! :purple_heart:

1 Like

I installed RPMfusion but didn’t know how to solve this dependency issue:

error: Could not depsolve transaction; 1 problem detected:
Problem: package ffmpeg-7.1.2-7.fc43.x86_64 from rpmfusion-free conflicts with ffmpeg-free provided by ffmpeg-free-7.1.2-4.fc43.x86_64 from @System - conflicting requests

It might have been done so in the past, but now it doesn’t. See the no-autodownload=true flag in the app’s metadata:

$ flatpak remote-info flathub org.mozilla.firefox -m
[Application]
name=org.mozilla.firefox
runtime=org.freedesktop.Platform/x86_64/24.08
sdk=org.freedesktop.Sdk/x86_64/24.08
base=app/org.mozilla.firefox.BaseApp/x86_64/24.08
command=firefox
required-flatpak=0.11.1

[...]

[Extension org.freedesktop.Platform.ffmpeg-full]
directory=lib/ffmpeg
add-ld-path=.
no-autodownload=true
version=24.08

[...]

This should work for the Firefox RPM app from the base image:

rpm-ostree install libavcodec-freeworld

When a package is conflicting with one in the base image on Atomic Fedora, you need to first overide remove the package and then install the new package, it can be done in one operation like this:

sudo rpm-ostree override remove ffmpeg-free --install ffmpeg