I’m trying to leverage hardware acceleration for video decoding inside firefox (e.g. on youtube). I just bought a second hand Radeon Pro WX 5100.
I first tried to play a video and noticed that every codec showed “Unsupported” inside the ff about:support tab “Codec Support Information” table. Nothig inside firefox logs using MOZ_LOG="FFmpegVideo:5" related to VA-API
Also on this page, I see the following line: HARDWARE_VIDEO_DECODING: runtime unavailable Force disabled by gfxInfo Blocklisted; failure code FEATURE_FAILURE_VIDEO_DECODING_TEST_FAILED
I followed the instructions given inside this wiki section, namely setting media.hardware-video-decoding.force-enabled and media.hardware-video-decoding.force-enabled to true.
I tried to run vainfo, and indeed all the codecs I expected to see there (according to this table) are missing:
pacman -Qs va-api
local/lib32-libva-mesa-driver 1:24.0.9-1
Open-source VA-API drivers - 32-bit
local/libva-mesa-driver 1:24.0.9-1
Open-source VA-API drivers
local/libva-utils 2.21.0-1
Intel VA-API Media Applications and Scripts for libva
It is my understanding following this arch wiki page that I might need to use the proprietary driver. Is that so ? I tried to install the mentioned packages from the AUR but this did not seem to change anything.
Is it possible (and not too risky) to switch to the unstable branch, install the needed packages from there, then switch back to stable and tell pacman to ignore the updates for those packages ? And then update them from time to time
No. You can’t mix and match. If you need those codecs on Stable branch then you’ll have to build the packages yourself (and keep them updated going forward).
Your other option is to use a non-commercial distro which doesn’t need to remove those codecs for legal reasons. Plain Arch Linux or EndeavourOS are two suggestions.
Mozilla will not support HEVC while it is encumbered by patents.
I can’t see any reason why your Firefox shows VP9 as unsupported for HW decoding though - unless your card doesn’t support VP9. Otherwise, did you build mesa correctly? It might be easier for you to switch to Testing branch (which is quite stable) & build either the mesa-git or the various amdonly-gaming mesa packages via the AUR (you may also have to replace directx-headers with directx-headers-git). I installed the amdonly-gaming packages on my Ryzen 5800H mini-PC (integrated Radeon GPU) & this is the result: