You are not logged in.

#601 2021-11-20 11:41:24

moturhead
Member
Registered: 2021-10-31
Posts: 14

Re: chromium: hardware video acceleration with VA-API

hogehoge wrote:

After setting "Enable software compositing window manager" on
It enabled to VDAVideoDecoder youtube
But, screen is black. what's wrong?

Are you using the unstable version 97? you should revert to stable version 96, and enable the flags that I mentioned above. VDAVideoDecoder is working fine on it.

Offline

#602 2021-11-21 08:41:48

boban_dj
Member
Registered: 2015-03-17
Posts: 150

Re: chromium: hardware video acceleration with VA-API

Inixi wrote:

My current system specs:

thanks Inix.

I have my specs also working now:

Graphics:  Device-1: NVIDIA GM204GL [Quadro M5000]  driver: nvidia v: 495.44   Display: server: X.Org 1.21.1.1
Kernel: 5.10.80-1-lts x86_64 bits: 64 Distro: Arch Linux
Google-chrome stable (AUR) Version : 96.0.4664.45-1

- Enabled extension

enhanced-h264ify enabled https://chrome.google.com/webstore/deta … ated?hl=en

- Flags: /home/boban/.config/chrome-flags.conf

--use-gl=desktop
--use-cmd-decoder=validating
--disable-software-rasterizer
--disable-font-subpixel-positioning
--disable-gpu-driver-bug-workarounds
--disable-gpu-driver-workarounds
--disable-gpu-vsync
--enable-accelerated-video-decode
--enable-accelerated-mjpeg-decode
--enable-features=VaapiVideoDecoder,CanvasOopRasterization
--enable-gpu-compositing
--enable-gpu-rasterization
--enable-native-gpu-memory-buffers
--enable-oop-rasterization
--canvas-oop-rasterization
--enable-raw-draw
--use-vulkan
--enable-zero-copy
--ignore-gpu-blocklist
--check-for-update-interval=604800

- Result chrome://gpu


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



- Check in chrome with youtube video:

chrome-harware-decoder-check.png

Last edited by boban_dj (2022-01-21 07:47:10)

Offline

#603 2021-11-23 11:43:24

Inixi
Member
Registered: 2016-10-15
Posts: 54

Re: chromium: hardware video acceleration with VA-API

boban_dj wrote:
Inixi wrote:

My current system specs:

thanks Inix.

I have my specs also working now:

Graphics:  Device-1: NVIDIA GM204GL [Quadro M5000]  driver: nvidia v: 495.44   Display: server: X.Org 1.21.1.1
Kernel: 5.10.80-1-lts x86_64 bits: 64 Distro: Arch Linux
Google-chrome stable (AUR) Version : 96.0.4664.45-1

- Enabled extension

enhanced-h264ify enabled https://chrome.google.com/webstore/deta … ated?hl=en

Well, hardware accelerated youtube should also work without the extension. On youtube I like to have the extension disabled because some "premiere" videos without the extension have possibility to run in FHD while with extension sometimes 480p is only available option for long time.


2020 ASUS Zephyrus G14

Offline

#604 2021-11-27 07:21:38

boban_dj
Member
Registered: 2015-03-17
Posts: 150

Re: chromium: hardware video acceleration with VA-API

@Inixi, strange because in my case hardware accelerated works only with the extension enhanced-h264ify enabled. this with all youtube video's you linked in previous post.
Is there something I missed? or how to check it

Offline

#605 2021-11-28 00:01:10

liewkj
Member
Registered: 2019-07-08
Posts: 210

Re: chromium: hardware video acceleration with VA-API

Chromium 96.0.4664.45 now supports VA-API on Wayland perfectly with `--use-gl=egl` and no LIBVA_DRIVER_NAME env override. The only missing link now is MESA ANGLE sync control to provide predictable VSYNC for EGL application.

This is not just for Chromium, I think Firefox VA-API backend on Wayland also benefits from predictable VSYNC from EGL interface.

I hope ArchLinux MESA package maintainers will take the patch from MESA pending MR. Please cast your vote to have the voices in solidarity.
https://bugs.archlinux.org/task/67035

Offline

#606 2021-11-29 08:02:13

hedgepigdaniel
Member
Registered: 2014-01-07
Posts: 42

Re: chromium: hardware video acceleration with VA-API

liewkj wrote:

Chromium 96.0.4664.45 now supports VA-API on Wayland perfectly with `--use-gl=egl` and no LIBVA_DRIVER_NAME env override.

When you say "on Wayland" - do you mean that you are using the Wayland backend for Ozone (i.e. `--enable-features=UseOzonePlatform --ozone-platform=wayland`)

If so that's news to me, and not what the wiki sais. What flags are you running exactly? I could not get VAAPI to work with the Wayland backend.

Offline

#607 2021-11-29 08:20:24

digitalone
Member
Registered: 2011-08-19
Posts: 350

Re: chromium: hardware video acceleration with VA-API

hedgepigdaniel wrote:
liewkj wrote:

Chromium 96.0.4664.45 now supports VA-API on Wayland perfectly with `--use-gl=egl` and no LIBVA_DRIVER_NAME env override.

When you say "on Wayland" - do you mean that you are using the Wayland backend for Ozone (i.e. `--enable-features=UseOzonePlatform --ozone-platform=wayland`)

If so that's news to me, and not what the wiki sais. What flags are you running exactly? I could not get VAAPI to work with the Wayland backend.

No, with use-gl=egl Ozone is on X11, so XWayland. Nothing has changed.

Offline

#608 2021-11-29 08:43:58

digitalone
Member
Registered: 2011-08-19
Posts: 350

Re: chromium: hardware video acceleration with VA-API

I confirm, cpu decoding on AMDGPU with

--ozone-platform=wayland

flag under Wayland.

Last edited by digitalone (2021-11-29 21:45:22)

Offline

#609 2021-11-30 01:43:18

liewkj
Member
Registered: 2019-07-08
Posts: 210

Re: chromium: hardware video acceleration with VA-API

In chromium-flags.conf

--disable-gpu-driver-bug-workarounds
--enable-oop-rasterization
--use-gl=egl

From chrome://gpu Command Line

/usr/lib/chromium/chromium --disable-gpu-driver-bug-workarounds --enable-oop-rasterization --use-gl=egl --enable-crashpad --flag-switches-begin --enable-gpu-rasterization --enable-zero-copy --ignore-gpu-blocklist --enable-features=CanvasOopRasterization,VaapiVideoDecoder --flag-switches-end --origin-trial-disabled-features=CaptureHandle

Options around --flag-switches-begin/end are selected through chrome://flags. They will be saved by Chromium.

There is really nothing to mess with ozone what so ever. It has always been XWayland for Chromium and how Chromium VA-API on Wayland session has worked in the past before it was broken. In fact, EGL window system binding can be considered native for Wayland.

I have tested that it works on both Intel and AMD for both H.264 and VP9. For Intel, the H.264/VP9 video decode uses Intel i965/hybrid VA driver.

Core i3-4010U Haswell GT2
Core m3 6Y30 Skylake GT2
Ryzen 2500U Vega Graphics

The wiki isn't up-to-date. For VA-API discussion, it is crucial to include details of GPU and XDG_SESSION_TYPE. It is great to see another improvement in Wayland, the future of Linux desktop.

Offline

#610 2021-11-30 06:10:19

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

Re: chromium: hardware video acceleration with VA-API

I'm curious if anyone else notices similar behavior to what I'm seeing, as it is a trifle annoying and I'm flummoxed on how (if it's even possible) to fix it. Background is that I'm using an Intel GPU and have VAAPI working, hardware acceleration, yada yada. Using fully branded Chrome.

Now, my specific issue is that when I leave a video paused for a short time, the paused video goes black. It sounds less annoying than it is, particularly when I pause a video intentionally because I want to read something in it (I do a lot of online classes, for example).

Anyone else seen this?

Offline

#611 2021-11-30 08:17:40

digitalone
Member
Registered: 2011-08-19
Posts: 350

Re: chromium: hardware video acceleration with VA-API

liewkj wrote:

There is really nothing to mess with ozone what so ever. It has always been XWayland for Chromium and how Chromium VA-API on Wayland session has worked in the past before it was broken. In fact, EGL window system binding can be considered native for Wayland.

On Wayland compositors Ozone will default to Wayland rather than X11 in the future to avoid XWayland, so vaapi support is likely to be broken again in the next versions.

Offline

#612 2021-11-30 18:46:38

moturhead
Member
Registered: 2021-10-31
Posts: 14

Re: chromium: hardware video acceleration with VA-API

I have two systems, one running X11, and another runs Wayland. Chromium on X11 works fine with just enabling necessary flags. On Wayland though, I have to add --use-gl=egl to enable VDAVideoDecoder. However, after playing any video for a few minutes, whole of the system starts to lag, and then I have to no other option but to force shut down the system. Anyone else facing similar problem?

Offline

#613 2021-12-04 19:10:43

alexey_metelev
Member
Registered: 2021-12-03
Posts: 1

Re: chromium: hardware video acceleration with VA-API

Hi everyone,

I've managed to make HW decoding work but encoding seem to be not working. Could you please help me to make it work?

I have a very high CPU load when I share my screen via Slack (70%-80%) and I hope to make it lower.

Hardware: Thinkpad X1 Carbon Gen6 with Intel(R) UHD Graphics 620.

I'm using these chrome flags:
--ignore-gpu-blocklist
--enable-gpu-rasterization
--enable-zero-copy
--disable-gpu-driver-bug-workarounds
--disable-features=UseSkiaRenderer
--enable-features=VaapiVideoDecoder
--use-vulkan

and this package:
intel-media-driver

Here is my vainfo output:
vainfo: VA-API version: 1.13 (libva 2.13.0)
vainfo: Driver version: Intel iHD driver for Intel(R) Gen Graphics - 21.4.3 ()
vainfo: Supported profile and entrypoints
      VAProfileNone                   :    VAEntrypointVideoProc
      VAProfileNone                   :    VAEntrypointStats
      VAProfileMPEG2Simple            :    VAEntrypointVLD
      VAProfileMPEG2Simple            :    VAEntrypointEncSlice
      VAProfileMPEG2Main              :    VAEntrypointVLD
      VAProfileMPEG2Main              :    VAEntrypointEncSlice
      VAProfileH264Main               :    VAEntrypointVLD
      VAProfileH264Main               :    VAEntrypointEncSlice
      VAProfileH264Main               :    VAEntrypointFEI
      VAProfileH264Main               :    VAEntrypointEncSliceLP
      VAProfileH264High               :    VAEntrypointVLD
      VAProfileH264High               :    VAEntrypointEncSlice
      VAProfileH264High               :    VAEntrypointFEI
      VAProfileH264High               :    VAEntrypointEncSliceLP
      VAProfileVC1Simple              :    VAEntrypointVLD
      VAProfileVC1Main                :    VAEntrypointVLD
      VAProfileVC1Advanced            :    VAEntrypointVLD
      VAProfileJPEGBaseline           :    VAEntrypointVLD
      VAProfileJPEGBaseline           :    VAEntrypointEncPicture
      VAProfileH264ConstrainedBaseline:    VAEntrypointVLD
      VAProfileH264ConstrainedBaseline:    VAEntrypointEncSlice
      VAProfileH264ConstrainedBaseline:    VAEntrypointFEI
      VAProfileH264ConstrainedBaseline:    VAEntrypointEncSliceLP
      VAProfileVP8Version0_3          :    VAEntrypointVLD
      VAProfileVP8Version0_3          :    VAEntrypointEncSlice
      VAProfileHEVCMain               :    VAEntrypointVLD
      VAProfileHEVCMain               :    VAEntrypointEncSlice
      VAProfileHEVCMain               :    VAEntrypointFEI
      VAProfileHEVCMain10             :    VAEntrypointVLD
      VAProfileHEVCMain10             :    VAEntrypointEncSlice
      VAProfileVP9Profile0            :    VAEntrypointVLD
      VAProfileVP9Profile2            :    VAEntrypointVLD

chrome://gpu "Video Acceleration Information" section:
Decoding (VideoDecoder)   
Decode h264 baseline    16x16 to 4096x4096 pixels
Decode h264 main    16x16 to 4096x4096 pixels
Decode h264 high    16x16 to 4096x4096 pixels
Decode vp8    16x16 to 4096x4096 pixels
Decode vp9 profile0    16x16 to 8192x8192 pixels
Decoding (Legacy VideoDecodeAccelerator)   
Decode h264 baseline    16x16 to 4096x4096 pixels
Decode h264 main    16x16 to 4096x4096 pixels
Decode h264 high    16x16 to 4096x4096 pixels
Decode vp8    16x16 to 4096x4096 pixels
Decode vp9 profile0    16x16 to 8192x8192 pixels
Encoding
(Nothing here)

Offline

#614 2021-12-05 01:56:28

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

Re: chromium: hardware video acceleration with VA-API

Hey friends, following up on my previous post where I asked if anyone had issues with paused videos going blank, I think I've stumbled on a fix. I've added the following to my chrome flags:

--use-gl=desktop

Hopefully this helps. Cheers.

Offline

#615 2021-12-09 13:13:10

moturhead
Member
Registered: 2021-10-31
Posts: 14

Re: chromium: hardware video acceleration with VA-API

Side note: the VDAVideoDecoder problem will persist if your browser uses Mesa driver version 21.2.4 or less. You should update it to at lease 21.2.5 or the latest 21.3.1.

Last edited by moturhead (2021-12-09 13:13:35)

Offline

#616 2021-12-14 12:48:03

Inixi
Member
Registered: 2016-10-15
Posts: 54

Re: chromium: hardware video acceleration with VA-API

boban_dj wrote:

@Inixi, strange because in my case hardware accelerated works only with the extension enhanced-h264ify enabled. this with all youtube video's you linked in previous post.
Is there something I missed? or how to check it

There are few clarifications needed:
1. In fact, not all videos on youtube are hardware accelerated without the extension, some of them are software rendered even with the flags I recently mentioned. Enhanced-h264ify makes all of them hardware accelerated on youtube. Why is that? I don't know, probably because proprietary support for x265 is still limited.
2. Following flags make chromium unstable, meaning that browser can freeze, reload, invoke core dump or hang the desktop manager. I'm still figuring out which of them can be applied safely.

--use-gl=desktop
--enable-features=VaapiVideoDecoder
--enable-zero-copy
--enable-accelerated-video-decode

2020 ASUS Zephyrus G14

Offline

#617 2021-12-28 11:53:57

temkyn
Member
Registered: 2021-12-16
Posts: 5

Re: chromium: hardware video acceleration with VA-API

Inixi wrote:

1. In fact, not all videos on youtube are hardware accelerated without the extension, some of them are software rendered even with the flags I recently mentioned. Enhanced-h264ify makes all of them hardware accelerated on youtube. Why is that?

My guess is that those are served in AV1 codec, which your card doesn't support according to the table on the wiki page.

In one of your previous posts you mentioned this "strange" YT video 8K Sample Video | Alpha 1 | Sony | α. If we RMB click on the video and choose "Stats for nerds", we can see what codec is being served. For this video 8k and 1080p are served in AV1, and are not accelerated, but 4k and 1440p --- in VP9 --- are. This is consistent with what the above table tells about codec support. So no HW accel for AV1 if you have NVIDIA card lower than the current gen GTX 30** series.

Offline

#618 2022-01-04 09:40:50

Inixi
Member
Registered: 2016-10-15
Posts: 54

Re: chromium: hardware video acceleration with VA-API

Thanks @temkyn !
I recently played with ffmpeg encoding and I just realized that not all codecs can be hardware decoded by nvidia cards, but I did not know how to check youtube.


2020 ASUS Zephyrus G14

Offline

#619 2022-01-05 08:59:15

once
Member
From: Taiwan
Registered: 2006-09-12
Posts: 267

Re: chromium: hardware video acceleration with VA-API

does 97 improve  --enable-features=UseOzonePlatform --ozone-platform=wayland?

Offline

#620 2022-01-06 22:52:35

once
Member
From: Taiwan
Registered: 2006-09-12
Posts: 267

Re: chromium: hardware video acceleration with VA-API

once wrote:

does 97 improve  --enable-features=UseOzonePlatform --ozone-platform=wayland?

there is 'Preferred Ozone platform' flag, so no longer necessary set --enable, btw.

Offline

#621 2022-01-13 11:29:30

Inixi
Member
Registered: 2016-10-15
Posts: 54

Re: chromium: hardware video acceleration with VA-API

I have new data on 97.0.4692.71-2 version
GPU: RTX 2060 Max-Q
desktop: Gnome on Xorg
nvidia drivers: 495.46-7
kernel: 5.15.10-xanmod1-rog-1

My current flags:

--use-vulkan
--use-gl=desktop
--enable-zero-copy
--enable-hardware-overlays
--enable-features=VaapiVideoDecoder,CanvasOopRasterization
--disable-features=UseSkiaRenderer
--ignore-gpu-blocklist

Which gives me:

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

All of my videos in browser except AV1 are hardware accelerated, but that comes with some caveats:

  • My monitor has 120Hz refresh rate and using --use-gl=desktop makes possible to use only 60fps. When I don't use this option then all my accelerated videos are black.

  • Enabling --use-gl=desktop makes chromium unstable even when not using --disable-gpu-driver-bug-workarounds or --ignore-gpu-blocklist switches. When chromium is unstable it can freeze and then the only way is to SIGKILL whole browser or it can restart itself generating segfault error 4 in libnvidia-glcore.so.495.46..

  • libva-vdpau-driver-vp9-git enables encoding not only h264 videos, but also VP9 videos as well.

  • --enable-gpu-rasterization is only available when you want to use with Skia renderer. If you disable Skia renderer and enable GPU rasterization then you will be having a lot of errors regarding Skia renderer failing to compile. In practice this can lead to make Rasterization status in chrome:///gpu green but you won't feel any difference. This means that Skia renderer is still incompatible with Hardware Video Decode.

  • --ignore-gpu-blocklist makes browser even more unstable, but in exchange you cna watch 4K VP9 videos on nvidia (probably other video cards as well).

Last edited by Inixi (2022-01-14 02:27:23)


2020 ASUS Zephyrus G14

Offline

#622 2022-01-18 16:47:30

vdwijngaert
Member
Registered: 2022-01-18
Posts: 3

Re: chromium: hardware video acceleration with VA-API

So... it's broken again in version 98. They have a new item in the list at chrome://gpu:

Direct Rendering Display Compositor: Disabled

Maybe that has something to do with it...

Offline

#623 2022-01-20 12:35:10

sephiroth986
Member
Registered: 2022-01-18
Posts: 22

Re: chromium: hardware video acceleration with VA-API

this is my vainfo output:

vainfo: VA-API version: 1.13 (libva 2.13.0)
vainfo: Driver version: Intel i965 driver for Intel(R) Broadwell - 2.4.1
vainfo: Supported profile and entrypoints
      VAProfileMPEG2Simple            : VAEntrypointVLD
      VAProfileMPEG2Simple            : VAEntrypointEncSlice
      VAProfileMPEG2Main              : VAEntrypointVLD
      VAProfileMPEG2Main              : VAEntrypointEncSlice
      VAProfileH264ConstrainedBaseline: VAEntrypointVLD
      VAProfileH264ConstrainedBaseline: VAEntrypointEncSlice
      VAProfileH264Main               : VAEntrypointVLD
      VAProfileH264Main               : VAEntrypointEncSlice
      VAProfileH264High               : VAEntrypointVLD
      VAProfileH264High               : VAEntrypointEncSlice
      VAProfileH264MultiviewHigh      : VAEntrypointVLD
      VAProfileH264MultiviewHigh      : VAEntrypointEncSlice
      VAProfileH264StereoHigh         : VAEntrypointVLD
      VAProfileH264StereoHigh         : VAEntrypointEncSlice
      VAProfileVC1Simple              : VAEntrypointVLD
      VAProfileVC1Main                : VAEntrypointVLD
      VAProfileVC1Advanced            : VAEntrypointVLD
      VAProfileNone                   : VAEntrypointVideoProc
      VAProfileJPEGBaseline           : VAEntrypointVLD
      VAProfileVP8Version0_3          : VAEntrypointVLD

in my chromium (from extra repo), there are this gpu config:

Graphics Feature Status
Canvas: Hardware accelerated
Canvas out-of-process rasterization: Enabled
Compositing: Hardware accelerated
Multiple Raster Threads: Enabled
Out-of-process Rasterization: Hardware accelerated
OpenGL: Enabled
Rasterization: Hardware accelerated on all pages
Raw Draw: Enabled
Skia Renderer: Enabled
Video Decode: Hardware accelerated
Video Encode: Software only. Hardware acceleration disabled
Vulkan: Enabled
WebGL: Hardware accelerated
WebGL2: Hardware accelerated

i used only 3 flags in config file:

--enable-gpu-rasterization
--ignore-gpu-backlist
--disable-gpu-driver-workarounds

i have activated any flags in the browser for enable all gpu option...i don't find option for enable video encode...so..intel_gpu_top give me always 0% on video

i have installed the plugin for h264 codec, but nothing...: https://imgbb.com/tMQf6Ld

Last edited by sephiroth986 (2022-01-20 13:07:57)

Offline

#624 2022-01-20 12:54:31

seth
Member
Registered: 2012-09-03
Posts: 59,073

Re: chromium: hardware video acceleration with VA-API

Please use code tags, don't crosspost and reply to https://bbs.archlinux.org/viewtopic.php … 9#p2016819 about what video you're actually being handed by youtube - the screenshot you keep posting isn't helpful.

Offline

#625 2022-01-21 07:16:48

babam
Member
Registered: 2022-01-21
Posts: 4

Re: chromium: hardware video acceleration with VA-API

Can hardware acceleration work on Youtube without NotYetAV1 or enhanced-h264ify extension?

Thanks.

Offline

Board footer

Powered by FluxBB