UPDATE: Firefox 115 enables VA-API hardware video decoding for Intel GPUs on Linux by default now.
I am not using Firefox anymore since they removed PWA support, which I use exclusively (even when I use Windows), in the browser, see Bugzilla Bug 1682593 and Bugzilla Bug 1407202. It seems many users also want this feature back in the browser as shown in their Mozilla Connect page as the #2 most popular idea. Unfortunately, Mozilla is not an organization that would usually listen to users' feedback. I doubt this will be changed in the future.
However, this is not today's topic. Then, why would you use Firefox? Currently, it's the only browser that fully supports video hardware acceleration on Linux. Chrome/Chromium on the other hand is still working on this and expects to push this out in v114 with --enable-features=VaapiVideoDecodeLinuxGL
flag, see Chromium Issue 1325824.
And the worst part regarding Linux hardware video decode in Chrome/Chromium is that most of the fixes are only for X11, not Wayland. For Wayland, it seems to be no progress at all, see issue 1326754, or issue 1434896 which specifically says nobody available to fix and is labeled as helpwanted 🥲
Currently, there are many ways to install Firefox on Linux, installing from your distro's repo is the recommended method. But the repo's version is usually not updated quickly. That's why I would recommend the Flatpak version which's officially maintaining by Mozilla. But this version doesn't enable VA-API video decoding and also doesn't run on Wayland by default. Let's see how to enable them.
Enable VA-API video decoding in Firefox
Open Firefox, and enter
about:config
in the address bar to go to Firefox's config page.-
Search for
vaapi
and changemedia.ffmpeg.vaapi.enabled
totrue
, as shown in the screenshot below: Restart the browser. Now, video hardware acceleration through VA-API should work.
It's important to note that you should know your GPU well. If you're not using a very recent GPU, there's a high chance that your GPU won't support all the codecs on the web. For instance, my GPU is not supported AV1 that YouTube uses by default (it saves a lot of bandwidth). Therefore, I use enhanced-h264ify to filter out unsupported codecs.
Enable Wayland mode in Firefox
Download Flatseal. It's the most important tool to manage Flatpak apps permission using GUI.
-
Disable X11 windowing system for Firefox, as shown in the screenshot below:
It's done!
I hope this helps, bye 💨
Cover Photo by Joel Holland on Unsplash
Fixing 1 Photo by Shane Aldendorff on Unsplash
Fixing 2 Photo by Alexander Andrews on Unsplash
Top comments (0)