You are not logged in.

#651 2022-04-09 06:37:36

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

Re: chromium: hardware video acceleration with VA-API

Did anyone solved the issue for: Videos when paused turn black after a while?
@Inixi, do you still have the pausing problem with black screen as well?

Last edited by boban_dj (2022-04-12 07:00:17)

Offline

#652 2022-04-09 08:05:19

brunkel
Member
Registered: 2022-04-07
Posts: 3

Re: chromium: hardware video acceleration with VA-API

DAC324 wrote:

There is an interesting aspect about Youtube I just found out on Reddit (https://www.reddit.com/r/chrome/comment … &context=3).

YouTube is now using AV1 as a default, instead of VP9 formerly used. As the guy on Reddit has encountered, hardware acceleration for AV1 only works on the very latest graphics hardware. If your graphics card is older than a few weeks, AV1 hardware acceleration will not work in Chromium.

Only thing you can do about that is: Go to Youtube's settings, Playback and Performance, and select "prefer AV1 for SD". This enables VP9 again for all content better than 480p, and VP9 is hardware accelerated in Chromium even on ancient cards like my GeForce GTX 750 Ti.

Thanks for sharing it! I double checked the youtube codecs and even with the vp9 codec hardware accel is not being used. I think it has something todo with the libva error I'm getting but can't find anything usefull about it on the internet.

Offline

#653 2022-04-09 12:10:15

dimischiavone
Member
From: Turin
Registered: 2019-09-13
Posts: 20

Re: chromium: hardware video acceleration with VA-API

Hi everyone, is there any news on when will VAAPI (encoding and decoding) work with the ozone wayland backend? Currently only Firefox has working VAAPI hardware video decoding working with native wayland.
Latest chromum-wayland-vaapi on AUR is too outdated and as you can see in package comments it doens't work with newer versions so the package mantainer didn't bother.

Last edited by dimischiavone (2022-04-09 12:11:40)

Offline

#654 2022-04-13 19:07:19

mindbreaker
Member
Registered: 2006-01-23
Posts: 20

Re: chromium: hardware video acceleration with VA-API

Hello,

it seems latest chromium-100.0.4896.88-1-x86_64.pkg.tar update broke the VAAPI acceleration for me again.
Going back one version to chromium-100.0.4896.75-1-x86_64.pkg.tar brings back the acceleration hmm

Laptop: i5-7200U
Kernel: 5.16.14
vainfo: VA-API version: 1.13 (libva 2.13.0)
vainfo: Driver version: Intel iHD driver for Intel(R) Gen Graphics - 22.2.2 ()

start parameter: --use-gl=desktop --enable-zero-copy --enable-accelerated-video-decode --enable-features=VaapiVideoDecoder --disable-features=UseChromeOSDirectVideoDecoder --disable-remote-fonts

Can someone confirm or knows how to fix it?
Thank you for your help.

Offline

#655 2022-04-15 23:35:40

nowy
Member
Registered: 2022-04-15
Posts: 12

Re: chromium: hardware video acceleration with VA-API

mindbreaker wrote:

Hello,

it seems latest chromium-100.0.4896.88-1-x86_64.pkg.tar update broke the VAAPI acceleration for me again.
Going back one version to chromium-100.0.4896.75-1-x86_64.pkg.tar brings back the acceleration hmm

Laptop: i5-7200U
Kernel: 5.16.14
vainfo: VA-API version: 1.13 (libva 2.13.0)
vainfo: Driver version: Intel iHD driver for Intel(R) Gen Graphics - 22.2.2 ()

start parameter: --use-gl=desktop --enable-zero-copy --enable-accelerated-video-decode --enable-features=VaapiVideoDecoder --disable-features=UseChromeOSDirectVideoDecoder --disable-remote-fonts

Can someone confirm or knows how to fix it?
Thank you for your help.

Vaapi work with vulkan and --enable-features=VaapiVideoDecoder flag.
But vulkan can cause a crash with some sites.

Offline

#656 2022-04-15 23:45:01

yochananmarqos
Member
Registered: 2020-02-05
Posts: 194

Re: chromium: hardware video acceleration with VA-API

@nowy: Don't enable Vulkan. This is what I'm using on GNOME (Xorg) with NVIDIA:

--ignore-gpu-blocklist
--enable-gpu-rasterization
--enable-zero-copy
--enable-features=VaapiVideoEncoder,VaapiVideoDecoder,CanvasOopRasterization
--disable-gpu-driver-bug-workarounds
--disable-features=UseSkiaRenderer,UseChromeOSDirectVideoDecoder
--canvas-oop-rasterization
--use-gl=desktop

EDIT: Oops there's two oop's. Bah, someone already quoted it, no point in changing it now.

Last edited by yochananmarqos (2022-04-16 01:43:08)

Offline

#657 2022-04-16 01:20:27

nowy
Member
Registered: 2022-04-15
Posts: 12

Re: chromium: hardware video acceleration with VA-API

yochananmarqos wrote:

@nowy: Don't enable Vulkan. This is what I'm using on GNOME (Xorg) with NVIDIA:

--ignore-gpu-blocklist
--enable-gpu-rasterization
--enable-zero-copy
--enable-features=VaapiVideoEncoder,VaapiVideoDecoder,CanvasOopRasterization
--disable-gpu-driver-bug-workarounds
--disable-features=UseSkiaRenderer,UseChromeOSDirectVideoDecoder
--canvas-oop-rasterization
--use-gl=desktop

On intel graphics, vaapi is not working with these flags on lastest chromium, but working on old version chromium.

EDIT: vaapi suddenly works! with just two flags. (Using intel-media-driver)

--enable-features=VaapiVideoDecoder
--disable-features=UseChromeOSDirectVideoDecoder

I have no idea how it work again.

Last edited by nowy (2022-04-16 19:32:45)

Offline

#658 2022-04-26 07:39:01

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

Re: chromium: hardware video acceleration with VA-API

For those wondering... The recent issue of things breaking without an obvious reason.. It was caused by the intel-media-driver, and has since been fixed.

See https://bbs.archlinux.org/viewtopic.php?id=275331

Offline

#659 2022-04-28 07:14:02

mindbreaker
Member
Registered: 2006-01-23
Posts: 20

Re: chromium: hardware video acceleration with VA-API

vdwijngaert wrote:

For those wondering... The recent issue of things breaking without an obvious reason.. It was caused by the intel-media-driver, and has since been fixed.

See https://bbs.archlinux.org/viewtopic.php?id=275331

Thanks for sharing.
I can confirm. Acceleration is working again with latest chromium 101, latest intel-media-driver and the unchanged flags I used before.

Have a nice day.

Last edited by mindbreaker (2022-04-28 07:14:30)

Offline

#660 2022-05-03 07:01:42

brunkel
Member
Registered: 2022-04-07
Posts: 3

Re: chromium: hardware video acceleration with VA-API

brunkel wrote:

Hi

I followed the wiki pages to get the hardware acceleration working in brave but can't seem to get it working.
brave://gpu shows that I have "Video Decode: Hardware accelerated" but when I take a look at the media dev tools the "video decode -> hardware decoder" still displays false.

The packages I installed:
- libva-vdpau-driver-vp9-git
- nvidia-utils

lspci -k | grep -A 2 -E "(VGA|3D)"

01:00.0 VGA compatible controller: NVIDIA Corporation GP107 [GeForce GTX 1050] (rev a1)
        Subsystem: Micro-Star International Co., Ltd. [MSI] Device 3354
        Kernel driver in use: nvidia
vainfo

vainfo: VA-API version: 1.13 (libva 2.14.0)
vainfo: Driver version: Splitted-Desktop Systems VDPAU backend for VA-API - 0.7.4
vainfo: Supported profile and entrypoints
      VAProfileMPEG2Simple            : VAEntrypointVLD
      VAProfileMPEG2Main              : VAEntrypointVLD
      VAProfileMPEG4Simple            : VAEntrypointVLD
      VAProfileMPEG4AdvancedSimple    : VAEntrypointVLD
      VAProfileH264ConstrainedBaseline: VAEntrypointVLD
      VAProfileH264Main               : VAEntrypointVLD
      VAProfileH264High               : VAEntrypointVLD
      VAProfileVC1Simple              : VAEntrypointVLD
      VAProfileVC1Main                : VAEntrypointVLD
      VAProfileVC1Advanced            : VAEntrypointVLD
      VAProfileVP9Profile0            : VAEntrypointVLD
tail -n2 ~/.zprofile

export LIBVA_DRIVER_NAME="vdpau"
export VDPAU_DRIVER="nvidia"
cat ~/.config/brave-flags.conf

--ignore-gpu-blocklist
--enable-gpu-rasterization
--enable-zero-copy

--enable-features=VaapiVideoDecoder
--use-gl=egl
--disable-features=UseChromeOSDirectVideoDecoder

--force-dark-mode

This is the output I'm getting with the --use-gl=egl flag when I tried --use-gl=desktop the libva error is gone but then brave crashes when playing videos.

brave

libva error: /usr/lib/dri/vdpau_drv_video.so init failed
[78197:78197:0100/000000.256393:ERROR:gpu_init.cc(446)] Passthrough is not supported, GL is egl, ANGLE is

Hi guys, me again. Still haven't got the hardware acceleration working on my system.. Does anyone got it to work with a nvidia gtx 1050 gpu?

Offline

#661 2022-05-11 10:39:19

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

Re: chromium: hardware video acceleration with VA-API

brunkel wrote:

even with the vp9 codec hardware accel is not being used

Apparently, 103.0.5053.2 broke it again. Even though I get VP9 on YouTube, Chromium again reverts to VpxVideoDecoder (which means software decoding).

To verify that I am using the right flags, I checked a bit and found that 101.0.4951.54 works as expected, with VDAVideoDecoder chosen.

Last edited by DAC324 (2022-05-11 12:19:22)

Offline

#662 2022-05-12 01:10:34

raisedintheusa
Member
Registered: 2022-02-18
Posts: 10

Re: chromium: hardware video acceleration with VA-API

I have found that using the flags "--disable-features=SidePanel" and "--disable-features=GlobalMediaControls" breaks hardware decoding.

Offline

#663 2022-05-12 07:29:54

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

Re: chromium: hardware video acceleration with VA-API

Important information for all those compiling Chromium by themselves:

Make sure that in the GN configuration, the following flag is set as below:

'disable_fieldtrial_testing_config=false'

Details here: https://bugs.chromium.org/p/chromium/is … 236697#c35

Offline

#664 2022-05-12 08:21:21

ovear
Member
Registered: 2016-08-18
Posts: 6

Re: chromium: hardware video acceleration with VA-API

boban_dj wrote:

Did anyone solved the issue for: Videos when paused turn black after a while?
@Inixi, do you still have the pausing problem with black screen as well?

Same here
After examined wiki page carefully, add "--use-gl=desktop" for x11, "--use-gl=egl" for wayland fix this problem.

Last edited by ovear (2022-05-12 08:26:06)

Offline

#665 2022-05-12 08:30:43

ovear
Member
Registered: 2016-08-18
Posts: 6

Re: chromium: hardware video acceleration with VA-API

The "--use-gl=egl" must be added with wayland session to enable vaapi, but it's extremely bad performencan in my system(whether or not vaapi is enabled).  Only get 3-5 fps...

But actually it enabled vaapi successfully according to intel_gpu_top, this problem may related to https://bugs.chromium.org/p/chromium/is … id=1041228

I am not sure if there are any workaround to fix this, any ideas?

Last edited by ovear (2022-05-12 08:35:33)

Offline

#666 2022-05-12 12:14:27

agm28011997
Member
Registered: 2015-05-26
Posts: 79

Re: chromium: hardware video acceleration with VA-API

ovear wrote:

The "--use-gl=egl" must be added with wayland session to enable vaapi, but it's extremely bad performencan in my system(whether or not vaapi is enabled).  Only get 3-5 fps...

But actually it enabled vaapi successfully according to intel_gpu_top, this problem may related to https://bugs.chromium.org/p/chromium/is … id=1041228

I am not sure if there are any workaround to fix this, any ideas?

i have not to use this command line in wayland..
#--ignore-gpu-blacklist
--force-dark-mode
#--use-gl=egl
#--enable-gpu-rasterization
#--enable-native-gpu-memory-buffers
#--enable-zero-copy
#--disable-gpu-driver-bug-workarounds
#--ozone-platform=wayland
--disable-features=UseChromeOSDirectVideoDecoder
--enable-features=VaapiVideoEncoder,VaapiVideoDecoder,WebUIDarkMode,UseOzonePlatform
#--enable-webrtc-hw-decoding --enable-webrtc-hw-encoding



I use this chromium-flags file and vaapi is working without chopiness in a wayland session with ozone on x11(xwayland)

Versión 101.0.4951.54 (Build oficial) Manjaro Linux (64 bits)

Offline

#667 2022-05-12 19:00:39

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

Re: chromium: hardware video acceleration with VA-API

ovear wrote:

I am not sure if there are any workaround to fix this, any ideas?

Yes, there is a workaround by patching MESA. In the same Chromium bug you mentioned, there is a link down there to the MESA issue that has the patch.
You can also cast your vote at https://bugs.archlinux.org/task/67035 to include the patch to make ArchLinux the best modern Linux distro for Wayland.
Hopefully with enough popularity, the maintainer will take the heed.

Offline

#668 2022-05-12 20:19:42

raisedintheusa
Member
Registered: 2022-02-18
Posts: 10

Re: chromium: hardware video acceleration with VA-API

More weirdness...
I've found that while using "--disable-features=SidePanel" in the config file breaks hardware acceleration, disabling the side panel in chrome://flags does not.
Also enabling vulkan in chrome://flags breaks it again, it must be included in the config file as "--use-vulkan."

Last edited by raisedintheusa (2022-05-12 21:05:28)

Offline

#669 2022-05-12 21:57:02

agm28011997
Member
Registered: 2015-05-26
Posts: 79

Re: chromium: hardware video acceleration with VA-API

liewkj wrote:
ovear wrote:

I am not sure if there are any workaround to fix this, any ideas?

Yes, there is a workaround by patching MESA. In the same Chromium bug you mentioned, there is a link down there to the MESA issue that has the patch.
You can also cast your vote at https://bugs.archlinux.org/task/67035 to include the patch to make ArchLinux the best modern Linux distro for Wayland.
Hopefully with enough popularity, the maintainer will take the heed.

the mantainers doesn't want to pull nothing that is not going to go upstream.. so don't have any hopes.

Nevermind, i have not that flag in wayland session with xwayland and vaapi is working

Offline

#670 2022-05-12 23:29:38

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

Re: chromium: hardware video acceleration with VA-API

agm28011997 wrote:

Nevermind, i have not that flag in wayland session with xwayland and vaapi is working

I can never get VAAPI working on GNOME/Wayland with Chromium without `--use-gl=egl`. It has never worked for Intel while used to work for AMD with LIBVA_DRIVER_NAME env override. Nowadays, both Intel and AMD are consistent and failed without `--use-gl=egl` in similar fashion regardless.

$ LIBVA_DRIVER_NAME=radeonsi chromium
[ERROR:vaapi_wrapper.cc(2516)] vaPutSurface failed, VA error: invalid VADisplay
[ERROR:vaapi_video_decode_accelerator.cc(288)] Failed putting surface into pixmap

So I would be glad to be enlightened how it is working for you.

agm28011997 wrote:

the maintainers doesn't want to pull nothing that is not going to go upstream.. so don't have any hopes.

I really hope the maintainers would exercise certain level of discretion. The MESA patch is more than for VAAPI and I believe both Chromium & Firefox are benefiting from it for predictable V-SYNC timing on EGL interface.

Offline

#671 2022-05-13 09:23:37

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

Re: chromium: hardware video acceleration with VA-API

raisedintheusa wrote:

More weirdness...
Also enabling vulkan in chrome://flags breaks it again, it must be included in the config file as "--use-vulkan."

I can confirm. There seem to be at least three different ways to enable Vulkan:

1. Enabling via chrome://flags
2. commandline flag --enable-features=Vulkan
3. commandline flag --use-vulkan

While all of these result in Vulkan being shown as "Enabled" in chrome://gpu, only option 3. (commandline flag --use-vulkan) seems to not break hardware acceleration.

If you enable Vulkan via chrome://flags or --enable-features=Vulkan, there will be no hardware accelerated video playback anymore as Chromium falls back to FFMpegVideoDecoder which means software decoding.

The reason for that behavior:

--use-vulkan seems to be there for backwards compatibility. It causes Chromium to load VDAVideoDecoder which does not seem to be as sensible to the hardware used, as VAAPIVideoDecoder.

The other two options (chrome://flags and --enable-features=Vulkan) cause Chromium to try initializing VAAPIVideoDecoder which fails in most cases, leaving Chromium with the FFMpegVideoDecoder software decoder as a fallback.
See also https://bugs.chromium.org/p/chromium/is … id=1236697 for a discussion about that.

Last edited by DAC324 (2022-05-13 10:14:25)

Offline

#672 2022-05-15 14:50:14

raisedintheusa
Member
Registered: 2022-02-18
Posts: 10

Re: chromium: hardware video acceleration with VA-API

Why does h.264 playback on YouTube look like garbage?

Offline

#673 2022-05-22 08:02:33

pc00per
Member
Registered: 2022-05-22
Posts: 14

Re: chromium: hardware video acceleration with VA-API

Currently I don't have `enable-accelerated-video-decode` flag at all. Installed `extra/chromium` pacakge. Comments under the package forum said I need to install `aur/chromium-vaapi` package, but it's flagged outdated & doesn't compile at all. What am I missing?

Last edited by pc00per (2022-05-22 08:03:52)

Offline

#674 2022-05-25 00:49:44

viggy96
Member
Registered: 2020-06-14
Posts: 10

Re: chromium: hardware video acceleration with VA-API

Is it possible to use VAAPI on Wayland on regular Google Chrome?

Offline

#675 2022-05-25 12:16:06

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

Re: chromium: hardware video acceleration with VA-API

Hardware accelerated video decoding / video playback in Chromium seems to be broken (again?).

If I am not entirely mistaken, it used to work in version 101.0.4951.64 for both h.264 and vp9 but now, with 102.0.5005.61, vp9 videos are played using software decoding (VpxVideoDecoder) only.

As downgrading chromium to 101.0.4951.64 did not help, I am assuming that this might be connected to the graphics driver (which is nvidia-dkms 515.43.04 on my system), or this libva-vdpau-driver-vp9 package from AUR (is this still needed anyway?).

Offline

Board footer

Powered by FluxBB