Firefox Video decoding hardware acceleration not working by default in Kinoite 38

I have seen the news that Firefox has enabled video decoding for Firefox 115 by default for intel.
But it’s not working in Fedora kinoite 38. I am using firefox that comes by default with the system.

I have tested that Firefox from flathub indeed works and has video decoding. But I can’t switch to it. Because many extensions doesn’t work.

What could be the reason that video decoding not working by default on Fedora kinoite?
I am using wayland. Firefox version 115.0.

❯ rpm-ostree status
State: idle
Deployments:
● fedora:fedora/38/x86_64/kinoite
                  Version: 38.20230716.0 (2023-07-16T00:47:27Z)
               BaseCommit: bf25e09822c4c1f174a4e734b469512da399f371a37b10c8c9878da6e2dad563
             GPGSignature: Valid signature by 6A51BBABBA3D5467B6171221809A8D7CEB10B464
          LayeredPackages: akmod-nvidia distrobox libavcodec-freeworld neovim pipx
                           rpmfusion-free-release rpmfusion-nonfree-release
                           xorg-x11-drv-nvidia-cuda zsh

1 Like

It’s not the drivers from my understanding, but rather the missing codecs. These codecs are not present in the firefox rpm due to legal issues.

To fix this in the rpm, you needs to layer the requisite codecs, I personally would install mpv or vlc (they are video players) and that will install anything that is missing. Installing ffmpeg should also work if you don’t want a video player.

Another solution you could do is install these packages in a distrobox, since you have already layered on that package. It will reduce the number of layered packages, so it might speed up reboot times. If you’re using a fedora image, you will have to install firefox, install the rpm fusion repos, update repos, and then install ffmpeg. Note that this guide will help you install the codecs only if you don’t want to install ffmpeg. I don’t know how to translate it to rpm-ostree though.
https://docs.fedoraproject.org/en-US/quick-docs/assembly_installing-plugins-for-playing-movies-and-music/

Also just for my knowledge, what extensions don’t work in the flathub? I’ve never encountered extensions that don’t work so I’m curious. No pressure on answering though.

Could you please verify if the environment variable is set up correctly according to the guidelines for Firefox Hardware Acceleration? You might also try to install ffmpeg-free to solve the issue.
For instance, Plasma integration doesn’t seem to work with Firefox from Flathub.

keepassxc, open with mpv and other native messaging extensions doesn’t work with flatpak firefox.

I don’t know about kinoite, but ffmpeg-free is installed by default with the Workstation edition. Ffmpeg-free does not contain all the needed codecs which is why ffmpeg from rpmfusion was recommended above.

Thank you for the suggestions. My primary use cases involve Fedora Kinoite and Silverblue, and I haven’t used Fedora Workstation for quite some time. The situation on Kinoite and Silverblue is somewhat different. Fedora 38 Kinoite and Silverblue users will encounter conflict request error between libavcodec-free and ffmpeg-libs when attempting to install ffmpeg. In my experience, resolving this conflict can be quite challenging.

Moreover, unlike Fedora Workstation, both Kinoite and Silverblue do not include ffmpeg-free by default. As suggested in the Fedora Docs, installing ffmpeg-free and libavcodec-freeworld (which should provide the necessary codecs for ffmpeg-free) tends to be much more straightforward, as no conflicts will arise. And libavcodec-freeworld has already been installed as layered packages in this case.

Also, there are some inaccuracies in the current rpmfusion documentation. An update to the documentation would be much beneficial for new users.

As far as this info goes yes, there are conflicts, but most can be handled by either using the --allowerasing option to dnf (on Workstation) or just by removing the conflicting package and then the install of ffmpeg will pull in what is needed.

I do not have anything to do with rpmfusion docs or packaging so cannot assist there. I believe most of those docs are aimed at support for Workstation (and other dnf based editions) since those are still the most used editions. To have rpmfusion update the docs one should contact them directly.

There are some differences in the ostree system. At present, ostree system lacks the --allowerasing option, which results in an error message that says “Non-local replacement overrides not implemented yet.” Removing conflicting packages on the base image isn’t in line with the philosophy of an immutable system. It might seem like an obvious solution, but it’s easier said than done given the complex dependencies. Most importantly, there isn’t a necessity to delve into these complex steps because a viable alternative exists. The libavcodec-freeworld package provides the missing codecs required for many multimedia formats. Keep things simple and just run the following command:

rpm-ostree install ffmpeg-free libavcodec-freeworld

This offers a straightforward solution.

2 Likes

thanks for the suggestions.
It’s finally working. No environment variable needed for working with wayland. I had to install intel driver manually. And firefox extension enhanced-h264ify. I don’t know why intel driver not installed by default.

rpm-ostree install ffmpeg-free libavcodec-freeworld libva-intel-driver

Could you file an issue on the Silverblue or Kinoite issue tracker? Issues · fedora-silverblue/issue-tracker · GitHub or Issues - fedora-kde/SIG - Pagure.io

It looks like those packages should be installed by default.

I have opened an issue Issue #375: Include ffmpeg-free, intel-media-driver & libva-intel-driver in base image to support hardware acceleration on firefox - SIG - Pagure.io