brave / brave-browser

Brave browser for Android, iOS, Linux, macOS, Windows.
https://brave.com
Mozilla Public License 2.0
17.54k stars 2.27k forks source link

how do u enable hardware accelerated video decoding on linux ? #17564

Open D0nnieD4rk0 opened 3 years ago

D0nnieD4rk0 commented 3 years ago

been looking through all the flags and everything and cant get anything other than software rendering

Canvas: Hardware accelerated Compositing: Hardware accelerated Multiple Raster Threads: Enabled Out-of-process Rasterization: Disabled OpenGL: Enabled Rasterization: Software only. Hardware acceleration disabled Skia Renderer: Enabled Video Decode: Software only. Hardware acceleration disabled Vulkan: Disabled WebGL: Hardware accelerated WebGL2: Hardware accelerated

any help ?

rebron commented 3 years ago

Does --enable-features=VaapiVideoDecoder work for you. We don't have this in brave://flags

D0nnieD4rk0 commented 3 years ago

-enable-features=VaapiVideoDecoder

tried everything at this point even enabling vulkan (which should take care of everything but doesnt) is this a manjaro thing ? i rly dont know what to do at this point thats why i came here to ask on github

Dark-Matter7232 commented 3 years ago

Here are the steps

1: sudo su 2: pacman -S lbva gstreamer libva-intel libva-utils 3: echo "export LIBVA_DRIVER_NAME=radeonsi" >> /etc/environment (if you are amd user) or echo "export LIBVA_DRIVER_NAME=i965" >> /etc/environment (if you are intel user) 4: rm -rf /usr/share/applications/brave-browser.desktop 5: cd /usr/share/applications/ 6: wget https://p.anuragcodes.me/3I197vuv -O brave-browser-vaapi.desktop 7: exit 8: go to brave://flags, enable Override software rendering list 9: Profit

Note

If you wish to launch brave from command line, add this alias alias brave="brave --use-gl=desktop --enable-features=VaapiVideoDecoder"

foodornt commented 2 years ago

what about poor nvidia users?

wooque commented 2 years ago

Since Chrome 98 and Brave 1.35 you have to pass --disable-features=UseChromeOSDirectVideoDecoder as well

sliddjur commented 2 years ago

Even though I successfully launch it with hardware enabled decode/encode according to about gpu, it does not offload youtube videos on gpu.

I watch this video https://www.youtube.com/watch?v=LXb3EKWsInQ at 4k and 60fps, and my CPU is hammered at 90% usage, while the GPU is almost unused according to nvtop.

My system info: Ubuntu 22.04, geforce 1080ti, intel i5-6600k, nvidia driver 510, x window server

linnabraham commented 1 month ago

Once you have vaapi setup properly just giving a single extra flag to Brave did the job for me. Exactly as mentioned here https://wiki.archlinux.org/title/Chromium#Hardware_video_acceleration

brave --enable-features=VaapiVideoDecodeLinuxGL