HEVC support and CPU load in brave or vivaldi browser

Hi,

I am currently testing brave and vivaldi browser to eventually replace firefox in the future. But neither brave nor vivaldi play HEVC encoded videos.

Example video:

ffprobe Big_Buck_Bunny_1080_10s_1MB.mp4
Stream #0:0[0x1](und): Video: hevc (Main) (hev1 / 0x31766568), yuv420p(tv, progressive), 1920x1080 [SAR 1:1 DAR 16:9], 834 kb/s, 30 fps, 30 tbr, 15360 tbn (default)

This video plays fine in firefox, but is not playing in brave or vivaldi. Is that a misconfiguration on my side or is this a real problem in both browsers?

And other than that I realize a huge CPU load with vivaldi and brave when playing youtube videos fullscreen.

Example:

approx. CPU load over all browser processes:

brave   35 %
vivaldi 25 %
firefox 10 %

Is that correct? Does somebody see the same differences? Watching videos is one of my main use cases in a browser. This would be quite a push back for me using brave or vivaldi.

1 Like

Video 1 - is the link correct? Just seeing a black rectangle.

Video 2 - Plays fine.

Vivaldi browser. Let me try Firefox. BRB.

Video 1 - plays OK in firefox. Weird. Not noticing any CPU spikes though.

The link to video #1 is correct. It just does not work with vivaldi or brave.

The CPU load is about playing the video #2 in full screen, which in my case is: 2560x1440
CPU load monitored with “top”

It appears it is not possible (at least for vivaldi), it is turned off - licensing issue? Who knows!

Don’t have Brave, but seeing 25% and around 8% for firefox.

From what I have read so far it seems to be a limitation of all chromium based browsers. And it seems to be a license issue from google.

1 Like

And that is not a license issue. It seems vivaldi and brave are not as good in hardware acceleration as firefox.

And the performance differences are even more severe then I thought.

When watching video #2 with youtube I can select max quality “2160p60 (4K)”. If I do so brave and vivaldi have a CPU load of 230-280 % while firefox stays below 50 %. Thats significant and a total surprise for me.

First video doesn’t play in google-chrome either!!

You have to figure out hardware video acceleration for these browsers. That’s the reason why the first isn’t playing (no browser software decoding on Linux) or that they require a lot of CPU (software decoding).

Launch your Chromium based browser from the command line with this added argument (sourced from here):

--enable-features=DefaultANGLEVulkan,VaapiIgnoreDriverChecks,Vulkan,VulkanFromANGLE

The HEVC video should play now. I’m not sure how to make that permanent, but that’s a start at least.

Yes, that works for Chromium. You can make it permanent by putting it into ~/.config/chromium-flags.conf. But no clue about vivaldi or brave.

It doesn’t seem to work for Vivaldi :frowning:

I assume a working answer is on the Arch wiki page: https://wiki.archlinux.org/title/Vivaldi


OK, f it, quick test, puting it into ~/.config/vivaldi-stable.conf and everthing works fine.

I can confirm, it works for Brave.

it does not work for me. Neither in
~/.config/chromium-flags.conf
nor
~/.config/brave-flags.conf
nor directly on the commandline
brave --enable-features=DefaultANGLEVulkan,VaapiIgnoreDriverChecks,Vulkan,VulkanFromANGLE

video #1 does not play and video #2 consumes 250 % CPU

EDIT:

It works. I had manually tweaked some brave flags which I had to put back to default before it works. I have it now in ~/.config/brave-flags.conf.

video #1 is playing and video #2 has now less than 50 % CPU, similar to firefox.

Thanks a lot, @Bink . I will mark your post as the solution.

1 Like

This might turn out being important info for many that try alternative browsers. Thanks all for finding out!

1 Like

I have learned one more thing during this whole investigation that I want to share:

You can check the hardware acceleration status in vivaldi and brave by using the internal browser url: vivaldi://gpu or brave://gpu. This displays the GPU internals. At the bottom of the page you see “Video Acceleration Information”.

In my case this is:

Without the settings in ~/.config/brave-flags.conf this section is empty

For Chromium, this is under chrome://gpu.

For Firefox, go to about:support and scroll far down, to the Media section:

(Yes, this is an old laptop from 2017, only H.264… And I didn’t know we could have audio hardware acceleration… Hm… :thinking:)

For Chromium, as an example, It indeed pays reading https://wiki.archlinux.org/title/Chromium#Hardware_video_acceleration.

Didn’t know Chromium-based browsers came with an “acceleration disabled” default (as opposed to Firefox). Making my Chromium work at least with H.264 on my i915 graphics, I had to put this into my ~/.config/chromium-flags.conf:

--enable-features=AcceleratedVideoDecodeLinuxGL,AcceleratedVideoDecodeLinuxZeroCopyGL,AcceleratedVideoEncoder

1 Like