You are not logged in.

#526 2021-07-30 15:46:28

rep_movsd
Member
Registered: 2013-08-24
Posts: 142

Re: chromium: hardware video acceleration with VA-API

I changed flags and then it works, after disabling vulkan and the skia renderer

--enable-features=VaapiVideoDecoder
--high-dpi-support=1
--use-cmd-decoder=validating
--use-gl=desktop
--enable-gpu-rasterization
--enable-zero-copy
--ignore-gpu-blocklist
--new-canvas-2d-api
--enable-hardware-overlays


Graphics Feature Status
Canvas: Hardware accelerated
Compositing: Hardware accelerated
Multiple Raster Threads: Enabled
Out-of-process Rasterization: Hardware accelerated
OpenGL: Enabled
Rasterization: Hardware accelerated on all pages
Skia Renderer: Disabled
Video Decode: Hardware accelerated
Vulkan: Disabled
WebGL: Hardware accelerated
WebGL2: Hardware accelerated

Offline

#527 2021-08-12 09:28:40

doomslayer666
Member
Registered: 2021-08-12
Posts: 1

Re: chromium: hardware video acceleration with VA-API

Here's my updated Guide on how to get hardware acceleration working on Chrome and chromium based browsers.

VA-API

Va-api installation depending on the GPU generation you have, so I recommend you to follow this Arch linux wiki guide,

https://wiki.archlinux.org/title/Hardwa … celeration

Once you download the package, verify it using vainfo or vdpauinfo depending upon your GPU. Then you are good to go.

Browser

You can use any chromium based browser like Brave and Vivaldi, but for this guide I will be using chrome-stable. I will be also using x11 for this guide, so few steps might vary for wayland.

Version

Unfortunately chrome 92 update broke hardware acceleration on linux, so we will be using Chrome 91. Google might "fix" it in future, but no can guarantee it.

Installation

91.0.4472.164-1 is the last version where Hardware acceleration works perfectly fine

For Arch Linux, use this link to get tar file (https://aur.archlinux.org/cgit/aur.git/ … 177.tar.gz)

Unzip it in a folder and open the folder in terminal. Then enter this command

makepkg -scri

The script would automatically download and install this specific version of chrome.

Enable these Flags under chrome://flags

1. Temporarily unexpire M90 flags.
2. Override software rendering list
3. GPU rasterization
4. Hardware-accelerated video decode
5. Zero-copy rasterizer

Launch configeration

Go to Your home library in a file manager, then select "Show hidden files" under three dot menu. Then select ".config" folder. Now check if a file named chrome-flags.conf exists. If it doesn't, create one. Open it with any text editor and enter these commands

--enable-features=VaapiVideoDecoder
--use-gl=desktop 
Check if Your GPU supports VP8/VP9 (For youtube)

You can check it through this table. Most newer hardware support it, but if you are on older hardware, your GPU would most likely no support it. (https://wiki.archlinux.org/title/Hardwa … son_tables)

H.264ify

If you GPU doesn't support VP9 decoding, you can install this extension to make sure youtube videos run in H264 format instead of VP8/9/AV1

(https://chrome.google.com/webstore/deta … kgal?hl=en)

Keep in mind your resolution would be limited to 1080p (Youtube offers maximum of 1080p only for H264 decodes) and there might slight reduction in details or difference in color reproduction.

Verify if Hardware acceleration is working

Hop on to chrome://GPU If your report looks something like this below, you are good to go

Graphics Feature Status
Canvas: Hardware accelerated
Compositing: Hardware accelerated
Multiple Raster Threads: Disabled (Shows disabled for me because my CPU doesn't support hyperthreading, if your's does, this should be shown as enabled)
Out-of-process Rasterization: Hardware accelerated
OpenGL: Enabled
Rasterization: Hardware accelerated on all pages
Skia Renderer: Enabled
Video Decode: Hardware accelerated
Vulkan: Disabled
WebGL: Hardware accelerated
WebGL2: Hardware accelerated

Then Hop on to any Video on Youtube and Press Ctrl+shift+I or F12

1. Then select Three dot menu beside cross option
2. Select More Tools
3. Then select Media
4. Click on Arrow beside Elements and console and select media
5. Play the video and manually select a resolution. Keep in mind chrome only hardware accelerates videos above 720p.
6. Under video decoder column, make sure it says "VDAVideoDecoder" under decoder name
7. Check if "Hardware Decoder" column is shown as True
8. If Everything goes right, you should be done and YouTube videos should be hardware accelerated.

Bonus

If you are using an Intel GPU, there's a package "intel-gpu-tools", download it through terminal or package manager.

You can then enter a command

sudo intel_gpu_top

Play a video on youtube or twitch and make sure GPU utilization is above 0 under "Video" column specifically. If it's any digit above 0, it's 100% sure you are making use of your GPU for hardware decode and everything is working as expected.

Last edited by doomslayer666 (2021-08-12 09:31:19)

Offline

#528 2021-08-13 08:45:33

johnpiers
Member
From: Somerset West, Cape Town
Registered: 2012-07-22
Posts: 37

Re: chromium: hardware video acceleration with VA-API

Thank you. I'm using Chrome Version 92.0.4515.131 (Official Build) (64-bit) and followed this guide and have got everything (I think) working, to the best of my knowledge:

Graphics Feature Status:
Canvas: Hardware accelerated
Compositing: Hardware accelerated
Multiple Raster Threads: Enabled
Out-of-process Rasterization: Hardware accelerated
OpenGL: Enabled
Rasterization: Hardware accelerated on all pages
Skia Renderer: Enabled
Video Decode: Hardware accelerated
Vulkan: Disabled
WebGL: Hardware accelerated
WebGL2: Hardware accelerated

If anyone is missioning with this issue I'd recommend following this guide. i'm using Chrome-stable. I am also using x11

Thanks.

Offline

#529 2021-08-27 13:56:56

koshikas
Member
Registered: 2021-08-27
Posts: 4

Re: chromium: hardware video acceleration with VA-API

got it working again!

so post chrome 88 i had my vid acceleration working with --enable-features=VaapiVideoDecoder switch and everything was working fine. However inbetween chrome 90-92, video acceleration has cease to function again.

after advise from a forum user to uninstall and reinstall with fresh config to fix the issue, i found vid. accel. works only the first time you invoke chrome after clearing the config. every subsequent invocation results in vid. accel. being disabled. then after comparing GPU settings in chrome:///gpu page, i found that ozone platform is loaded only successive chrome invokes. disabling ozone (via flag), gets video acceleration back.

ozone could be disabled by CLI switch --disable-features=UseOzonePlatform or flag #use-ozone-platform.

i’m on X11 with intel i915/965 driver with VAAPI enabled. and still cant makeout whether ozone is meant to help X11 or xwayland users. with G deciding that ozone to be enabled by default, there can be a performance penalty if it is disabled. however it seems it is the only way to get hw v. acceleration back.

Offline

#530 2021-08-30 19:43:30

DAC324
Member
Registered: 2020-03-12
Posts: 80

Re: chromium: hardware video acceleration with VA-API

According to https://chromium.googlesource.com/chrom … verview.md , Ozone is designated to be used on X11 alternatives, such as Wayland or Mir.

Offline

#531 2021-08-31 02:32:01

koshikas
Member
Registered: 2021-08-27
Posts: 4

Re: chromium: hardware video acceleration with VA-API

DAC324 wrote:

According to https://chromium.googlesource.com/chrom … verview.md , Ozone is designated to be used on X11 alternatives, such as Wayland or Mir.

it is actually meant to be common platform on all three X11, wayland, etc. and they are planning to remove legacy X11 parts. https://www.phoronix.com/scan.php?page= … X11-Future

i've already logged a bug for this though. ; https://bugs.chromium.org/p/chromium/is … id=1244470

Offline

#532 2021-08-31 11:57:59

DAC324
Member
Registered: 2020-03-12
Posts: 80

Re: chromium: hardware video acceleration with VA-API

On https://chromium.googlesource.com/chrom … verview.md, this sounds a bit different:

Ozone is a platform abstraction layer beneath the Aura window system that is used for low level input and graphics. Once complete, the abstraction will support underlying systems ranging from embedded SoC targets to new X11-alternative window systems on Linux such as Wayland or Mir to bring up Aura Chromium by providing an implementation of the platform interface.

According to the Phoronix article, there should be Ozone/X11 as well as Ozone/Wayland, and the corresponding flag in chrome is indeed labelled accordingly (I am using X11 here):

Use ozone.
Use the Ozone/X11 platform implementation on X11. – Linux

#use-ozone-platform

By the way, when I enable this flag, Chromium does not even start here.

[19386:19386:0831/135935.142793:ERROR:viz_main_impl.cc(161)] Exiting GPU process due to errors during initialization

I am on the nVidia proprietary driver 390.144, on kernel 5.14-rc6.

Chromium version: 95.0.4621.4 (built from sources downloaded at https://gsdview.appspot.com/chromium-br … a.tar.x%40 )

With this version, I get hardware acceleration when playing videos, at least on YouTube, with enhanced-h264ify installed. Unfortunately, there is no such thing as enhanced-h264ify for Facebook, so Facebook videos are played without acceleration.

Flags I am currently using:

--disable-software-rasterizer
--disable-gpu-driver-bug-workarounds
--disable-gpu-driver-workarounds
--disable-gpu-vsync
--enable-accelerated-video-decode
--enable-features=VaapiVideoDecoder,CanvasOopRasterization
--enable-gpu-compositing
--enable-gpu-rasterization
--enable-native-gpu-memory-buffers
--enable-oop-rasterization
--use-vulkan
--enable-zero-copy
--ignore-gpu-blocklist
--use-gl=desktop

In addition, I enabled overlay-scrollbars in chrome://flags.

Last edited by DAC324 (2021-08-31 14:57:43)

Offline

#533 2021-09-01 09:33:18

guiodic
Member
Registered: 2018-02-22
Posts: 24

Re: chromium: hardware video acceleration with VA-API

I can confirm it works

Google Chrome 92.0.4515.159

--disable-features=UseOzonePlatform --enable-features=VaapiVideoDecoder --use-gl=desktop

in Intel Tiger Lake.

This is the minimum set of flags required.

Offline

#534 2021-09-01 10:05:45

guiodic
Member
Registered: 2018-02-22
Posts: 24

Re: chromium: hardware video acceleration with VA-API

I just updated to Chrome/93.0.4577.63 the same configuration works fine.

Offline

#535 2021-09-02 14:10:53

guiodic
Member
Registered: 2018-02-22
Posts: 24

Re: chromium: hardware video acceleration with VA-API

Another way is to set LIBVA_DRIVER_NAME=iHD and you can omit --use-gl=desktop

Offline

#536 2021-09-03 18:05:36

guiodic
Member
Registered: 2018-02-22
Posts: 24

Re: chromium: hardware video acceleration with VA-API

Do anyone know how to activate HW decoder for encrypted videos (Netflix, etc.)?

Offline

#537 2021-09-07 14:56:27

FPSUsername
Member
Registered: 2021-09-03
Posts: 17

Re: chromium: hardware video acceleration with VA-API

Not sure if this link has been shared before, but here is how it's done for chromium based browsers such as Vivaldi and I can confirm that it all looks like it should.

Offline

#538 2021-09-19 17:02:34

GrzegorzKozub
Member
Registered: 2021-09-19
Posts: 6

Re: chromium: hardware video acceleration with VA-API

For the record, adding CanvasOopRasterization to --enable-features=... solved a Google Sheets rendering issue where I couldn't see text in the spreadsheet cells on recent Chrome and Brave (Chromium-based). Here's a screenshot of the issue: https://i.imgur.com/RmaR3qQ.png.

Offline

#539 2021-09-27 10:33:05

musicat
Member
Registered: 2021-09-27
Posts: 2

Re: chromium: hardware video acceleration with VA-API

Look like Ozone is permanent since Chrome 95 beta and --disable-features=UseOzonePlatform does not work anymore.
Anyone has a new workaround?

Offline

#540 2021-10-01 15:09:15

insilications
Member
Registered: 2020-02-12
Posts: 3

Re: chromium: hardware video acceleration with VA-API

musicat wrote:

Look like Ozone is permanent since Chrome 95 beta and --disable-features=UseOzonePlatform does not work anymore.
Anyone has a new workaround?


AFAIK, no. Ozone is enabled by default now and it currently doesn't support VA-API. Just google things

https://bugs.chromium.org/p/chromium/is … zone&can=1
https://bugs.chromium.org/p/chromium/is … zone&can=1

Offline

#541 2021-10-02 22:01:20

DAC324
Member
Registered: 2020-03-12
Posts: 80

Re: chromium: hardware video acceleration with VA-API

insilications wrote:
musicat wrote:

Look like Ozone is permanent since Chrome 95 beta and --disable-features=UseOzonePlatform does not work anymore.

AFAIK, no. Ozone is enabled by default now and it currently doesn't support VA-API. Just google things

https://bugs.chromium.org/p/chromium/is … zone&can=1
https://bugs.chromium.org/p/chromium/is … zone&can=1

In your second link, the bug is set to "fixed". This, in my understanding, should mean that Ozone under X11 now supports VA-API.

Offline

#542 2021-10-08 02:50:57

musicat
Member
Registered: 2021-09-27
Posts: 2

Re: chromium: hardware video acceleration with VA-API

DAC324 wrote:

In your second link, the bug is set to "fixed". This, in my understanding, should mean that Ozone under X11 now supports VA-API.

Oh yeah, fixed in Chrome 96 unstable

Last edited by musicat (2021-10-08 02:51:43)

Offline

#543 2021-10-09 18:20:34

moi_eric11
Member
Registered: 2021-10-09
Posts: 1

Re: chromium: hardware video acceleration with VA-API

I have Kepler GTX 760 with NVIDIA Proprietary Drivers 470.74

Chromium and Google-Chrome hardware acceleration works with h264 in YouTube in 94.0.4606.81 with only these flags


--enable-gpu-rasterization
--enable-zero-copy
--enable-features=VaapiVideoDecoder
--disable-features=UseOzonePlatform
--use-gl=desktop

It seems that acceleration is broken in Chrome 91 because of the Ozone platform, but when it is disabled, everything is fine.

Offline

#544 2021-10-19 21:23:54

coxackie
Member
Registered: 2019-11-10
Posts: 8

Re: chromium: hardware video acceleration with VA-API

... and, with chromium 95.0.4638.54 just out, vaapi hardware acceleration has stopped working. everything was ok up to 94. No change in the flags, and have tried a lot of combinations, but to no avail...   sad

AMD CPU/GPU, and X11 of course, if it is of any importance.

Last edited by coxackie (2021-10-19 22:20:16)

Offline

#545 2021-10-20 00:39:18

cloverskull
Member
Registered: 2018-09-30
Posts: 206

Re: chromium: hardware video acceleration with VA-API

Can confirm, Chrome Version 95.0.4638.54 (Official Build) (64-bit) is no longer using hardware acceleration no matter what I do, and up until it upgraded from 94.x the VAAPI functionality worked. Frustrating.

Intel GPU and X11, if it matters.

Edit - the following

~/.config/chrome.flags

enables VAAPI for me:

--enable-gpu-rasterization
--enable-oop-rasterization
--enable-gpu-compositing
--enable-zero-copy
--enable-features=VaapiVideoDecoder
--use-gl=desktop
--disable-features=UseOzonePlatform
--enable-accelerated-2d-canvas
--process-per-site

Last edited by cloverskull (2021-10-20 03:55:41)

Offline

#546 2021-10-20 09:47:01

koshikas
Member
Registered: 2021-08-27
Posts: 4

Re: chromium: hardware video acceleration with VA-API

cloverskull wrote:

Can confirm, Chrome Version 95.0.4638.54 (Official Build) (64-bit) is no longer using hardware acceleration no matter what I do, and up until it upgraded from 94.x the VAAPI functionality worked. Frustrating.

Intel GPU and X11, if it matters.

Edit - the following

~/.config/chrome.flags

enables VAAPI for me:

--enable-gpu-rasterization
--enable-oop-rasterization
--enable-gpu-compositing
--enable-zero-copy
--enable-features=VaapiVideoDecoder
--use-gl=desktop
--disable-features=UseOzonePlatform
--enable-accelerated-2d-canvas
--process-per-site

and @cloverskull

seems you cannot disable ozone-platform anymore since chrome 95, hence no video acceleration atleast on X11/VA-API

Offline

#547 2021-10-20 15:22:38

cloverskull
Member
Registered: 2018-09-30
Posts: 206

Re: chromium: hardware video acceleration with VA-API

Yep, that was a false positive, sorry. Looks like I'm not using hardware decoding. Sad.

Offline

#548 2021-10-22 08:04:58

koshikas
Member
Registered: 2021-08-27
Posts: 4

Re: chromium: hardware video acceleration with VA-API

cloverskull wrote:

Yep, that was a false positive, sorry. Looks like I'm not using hardware decoding. Sad.

did bit of digging up on the bug i reported and the final bug that it was merged into. apparently their fix will only available in chrome 96. so happy waiting

https://chromiumdash.appspot.com/commit … dca244c26c

Offline

#549 2021-10-23 13:54:26

Scimmia
Fellow
Registered: 2012-09-01
Posts: 12,081

Re: chromium: hardware video acceleration with VA-API

koshikas wrote:
cloverskull wrote:

Yep, that was a false positive, sorry. Looks like I'm not using hardware decoding. Sad.

did bit of digging up on the bug i reported and the final bug that it was merged into. apparently their fix will only available in chrome 96. so happy waiting

https://chromiumdash.appspot.com/commit … dca244c26c

Arch backported this.

Online

#550 2021-10-29 02:21:52

thwalker3
Member
Registered: 2021-10-25
Posts: 4

Re: chromium: hardware video acceleration with VA-API

Scimmia wrote:
koshikas wrote:
cloverskull wrote:

Yep, that was a false positive, sorry. Looks like I'm not using hardware decoding. Sad.

did bit of digging up on the bug i reported and the final bug that it was merged into. apparently their fix will only available in chrome 96. so happy waiting

https://chromiumdash.appspot.com/commit … dca244c26c

Arch backported this.

Curious whether anyone has actually gotten VA-API hardware video decode working with Chrome or Chromium 96 with some combination of flags?  Trying the former (96.0.4664.27), on a system where Chrome 94 works, chrome://media-internals suggests that VDADecoder is in use, but I get a nice blank spot where the video should be.  Scrubbing back and forth (which presumably doesn't use hw decode) works, but as soon as you start playing again, nothing.

Offline

Board footer

Powered by FluxBB