StaZhu / enable-chromium-hevc-hardware-decoding

A guide that teach you enable hardware HEVC decoding & encoding for Chrome / Edge, or build a custom version of Chromium / Electron that supports hardware & software HEVC decoding and hardware HEVC encoding.
MIT License
1.24k stars 60 forks source link

Linux HW decode NOT work #48

Open wx5391805 opened 1 year ago

wx5391805 commented 1 year ago

Linux arm64 fails, vaapi_video_decoder.cc should now only serve ChromeOS. vaapi_video_video_decode_accelerator.cc is the Linux path now. Have you tried it on Linux? Chromium 110 is somewhat different from the previous version on Linux hardware acceleration. Thank you very much.

wx5391805 commented 1 year ago

Well, I have to correct it, it’s really bad under Linux, there are two decoders, VdaVideoDecoder and VaapiVideoDecoder, HEVC code is in the latter, the choice of decoder is limited by several switches such as UseChromeOSDirectVideoDecoder, Vulkan, etc., and it has something to do with the version.

StaZhu commented 1 year ago

I think chromium media has a plan to completely remove the use of VDAVideoDecoder and finally switch to VaapiVideoDecoder, however since vaapi isn’t supported well on intel iGPU devices on chrome for now and not to mention that amd and nvidia GPUs doesnt officially support vaapi at all, and Linux arm64 devices dont use vaapi as well. So i think i can’t help to solve this for now since the infrastructure on linux chrome is really bad and the ROI is too low.

wx5391805 commented 1 year ago

Yeah I agree with you. The fact is that I do use vaapi on my Linux arm64 now. It works on Chromium 102. It's just that linux users with NV GPUs can't use VaapiVideoDecoder because of the drive. Unfortunately, VdaVideoDecoder also doesn't work since 110, which prevents me from upgrading.

StaZhu commented 1 year ago

NVIDIA and AMD have now focused on VulkanVideo, unfortunately the Chrome Media team has no intention of implementing Vulkan decoding. But the situation may change in the future, as many Android OEM/IHV seem to be very interested in VulkanVideo

Can you fire a new crbug issue and ask chromium folks if they have a plan to implement vulkan video support? The decision completely depends on chrome media team i think.

joewood9364 commented 6 months ago

I downloaded the deb and finally i can watch hevc in a browser thanks. My only question is how can i set this up to work in brave which is my main browser?

StaZhu commented 6 months ago

I downloaded the deb and finally i can watch hevc in a browser thanks. My only question is how can i set this up to work in brave which is my main browser?

You can’t, to integrate SW decoding, browser needs to cherry pick the SW commit, and I don’t think brave want to do that.

joewood9364 commented 6 months ago

https://github.com/brave/brave-browser/issues/37963 I made a feature request (amongst thousands of issues lol). Brave did recently enable a flag for auto-scrolling on Linux which upstream chromium hasn't done so they might integrate your SW commits?