HEVC Hardware acceleration in Chrome/Brave/Chromium

I am new to Linux, please excuse me if I am missing important details.
Running EndeavourOS with 6.18.22-1-lts and Wayland I noticed that hardware accelerated hevc playback is not working for most chromium related programs:
Ive got a hevc file and a player only allowing direct play, no transcoding. Firefox plays the file fine, while Brave/Chromium/Chrome never start playing the file at all.
Also other electron apps have problems when loading a hevc file: “File is not natively supported.” is for example stated by the tool LoslessCut.

My GPU is “NVIDIA GeForce RTX 5060 Ti”

When I start playing the file and monitor with brave://media-internals/ I see the following interesting parts:

and

The whole log: https://paste.c-net.org/MorninFaded

The above output was produced with this launch args:

But I tried all other combinations I found in this thread.

My vainfo output is:

Ive got the following packages installed that could somehow be related to my problem:

also those env got defined by me:

The nvidia-smi output is:

brave://gpu/ outputs the following:

Can someone bring any light into my situation? I will definetly look on and post a solution should I find one but I am also open to any hint.

Thanks :slight_smile:

Edit:

Made some tests with AI assisting me. Here is the report, also generated by AI:

https://paste.c-net.org/SmashJafar

You probably don’t want this one installed.

Have you tried using a local video player that supports VAAPI to see if it is a system problem or a browser settings problem?

I read somewhere that it is required for vaapi, but it didnt cause any change at all. I just removed it again and tried all the different flags again with the same result as before.

Like mentioned above Firefox itself doesnt has any problem with hardware acceleration and also mpv aswell Haruna are doing fine :slight_smile:

Its really only on Electron/Chromium based projects.

To my knowledge HEVC or X.265 does not work on chromium based browser and Nvidia on linux (at least not hardware decoding). I’m presonnally following a couple of threads about this on other forums. The flags that once worked does not work anymore. it’s possible to make it work but you have to recompile the browsers with patches that Thorium browser made. I wouldn’t recommend Thorium as it’s infrequently updated.

PR that someone made for Brave Browser which is Chromium based (still waiting on the go from Brave because licences) :

Nvidia Request about vulkan and video decoding

Issue about Chrome not supporting hardware acceleration on linux

Nvidia has even offered to develop the chromium part that uses vulkan in order to decode video on hardware. Chromium as usual is sleeping at the steering wheel… Firefox works fine if you want HEVC as I use it to view my Unifi security camera.

You can try many flags that you see on the web but lately they don’t really seem to work.

Thanks a lot for writing down such a detailed answer! This combined with the note in the nvidia-vaapi-driver repo, “Chrome is currently unsupported, and will not function.”, convinced me to make the switch.
Dealing with all the flags and hoping that nothing breaks is kinda annoying compared to firefox working out of the box while chrome doesnt really offer any benefit over firefox for me.

This is by no means me saying you should use one or other (Chromium or Firefox).

I just thought I’d mention that while Firefox may seemingly have video decoding support, it is all-around an objectively much slower browser than Chromium. So you might have hardware video decoding, but that’s about the only performance advantage.

That said, use it if it’s what you like, or perhaps LibreWolf which doesn’t carry the telemetry baggage at least (but probably still no faster).