You are not logged in.

#1076 2024-08-25 21:15:43

EarendilGisthul
Member
Registered: 2024-08-09
Posts: 3

Re: chromium: hardware video acceleration with VA-API

Thank you!

Offline

#1077 2024-09-03 10:52:59

garch-p
Member
Registered: 2024-09-03
Posts: 1

Re: chromium: hardware video acceleration with VA-API

gothmog123 wrote:

sorry maybe off-topic, but is it possible to enable vaapi in electron apps like signal-desktop?

It used to work with Freetube.
So as long as you match the right flags/hardware/electron-release( so its chromium associated release) combination, it could work just as Chromium.

Offline

#1078 2024-09-06 15:47:20

matt3us
Member
Registered: 2023-10-19
Posts: 2

Re: chromium: hardware video acceleration with VA-API

Not a single problem after 120 release (ungoogled-chromium) on Intel. Dumping flags here, some of them are redundant at this point:

--disable-gpu-driver-bug-workarounds
--enable-features=VaapiVideoDecodeLinuxGL,UseChromeOSDirectVideoDecoder,CanvasOopRasterization,WebUIDarkMode
--enable-gpu-rasterization
--ignore-gpu-blocklist
--ozone-platform=wayland

Last edited by matt3us (2024-09-06 15:48:06)

Offline

#1079 2024-09-27 21:46:23

EarendilGisthul
Member
Registered: 2024-08-09
Posts: 3

Re: chromium: hardware video acceleration with VA-API

matt3us wrote:

Not a single problem after 120 release (ungoogled-chromium) on Intel. Dumping flags here, some of them are redundant at this point:

--disable-gpu-driver-bug-workarounds
--enable-features=VaapiVideoDecodeLinuxGL,UseChromeOSDirectVideoDecoder,CanvasOopRasterization,WebUIDarkMode
--enable-gpu-rasterization
--ignore-gpu-blocklist
--ozone-platform=wayland

I guess it's for newer intel generations. My ivy bridge doesn't manage.

Offline

#1080 2024-10-06 18:17:23

skajmer
Member
From: A literal shithole
Registered: 2024-10-06
Posts: 1

Re: chromium: hardware video acceleration with VA-API

On my HD 4000 (Ivy Bridge Mobile) (with some flags) in chrome://gpu everything seems alright. But when playing actual video in chrome://media-internals, I can see warnings about falling back and error:

VaapiVideoDecoder: failed initializing the frame pool

  Video acceleration itself works on my OS (I tested it with mpv). If somebody could get it working on ivy, please tell how.

Last edited by skajmer (2024-10-06 18:18:57)

Offline

#1081 2024-11-03 15:11:25

vbezhenar
Member
Registered: 2024-11-03
Posts: 1

Re: chromium: hardware video acceleration with VA-API

I enabled hardware accelerated video decoding on Chromium with the following configuration:

i7-1355U

Gnome, Wayland

Installed packages: intel-media-driver, vulkan-intel

~/.config/chromium-flags.conf:

--enable-features=Vulkan,DefaultANGLEVulkan,VulkanFromANGLE

I didn't explicitly enable video decoding, but it just works with Vulkan enabled. Seems like the most modern configuration to me. Didn't experience any issues so far from short usage.

I also use flag --ozone-platform=wayland but it is not necessary for video decoding.

EDIT: turned out this is not very stable for me. If I would turn display off for some time, browser becomes frozen and i takes around a minute for it to return back. It's not crashing itself, but according to the logs, GPU process or something like that is crashed and probably being restarted.

Last edited by vbezhenar (2024-11-06 00:58:53)

Offline

#1082 2024-11-14 15:33:17

xuanrui
Member
Registered: 2018-09-27
Posts: 52

Re: chromium: hardware video acceleration with VA-API

After update to 131, I got this regression (errors show up in chrome://gpu):

[6049:6049:1113/220408.223558:ERROR:gl_display.cc(497)] : EGL Driver message (Error) eglCreateContext: Requested version is not supported
[6049:6049:1113/220648.819176:ERROR:gl_display.cc(497)] : EGL Driver message (Error) eglCreateContext: Requested version is not supported

and of course I got no video acceleration. Anyone having similar problems?

Offline

#1083 2024-11-14 23:42:27

Bzzz_56
Member
Registered: 2021-05-14
Posts: 36

Re: chromium: hardware video acceleration with VA-API

xuanrui wrote:

After update to 131, I got this regression (errors show up in chrome://gpu):

[6049:6049:1113/220408.223558:ERROR:gl_display.cc(497)] : EGL Driver message (Error) eglCreateContext: Requested version is not supported
[6049:6049:1113/220648.819176:ERROR:gl_display.cc(497)] : EGL Driver message (Error) eglCreateContext: Requested version is not supported

and of course I got no video acceleration. Anyone having similar problems?

The same error log shows on my amdgpu setup, but vaapi is working normally. Besides, there is also the following error log

[4867:4867:1114/174017.770009:ERROR:wayland_surface_factory.cc(241)] : '--ozone-platform=wayland' is not compatible with Vulkan. Consider switching to '--ozone-platform=x11' or disabling Vulkan

while vulkan wayland seems also working fine..

Offline

#1084 2024-11-15 09:13:46

xuanrui
Member
Registered: 2018-09-27
Posts: 52

Re: chromium: hardware video acceleration with VA-API

Sorry, false alarm: apparently I just have to change "VaapiVideoDecode" to "AcceleratedVideoDecode". The old flag is no longer recognized

Offline

#1085 2024-11-15 09:46:08

xuanrui
Member
Registered: 2018-09-27
Posts: 52

Re: chromium: hardware video acceleration with VA-API

On a site note though, has anyone got Chrome running on Vulkan backend with NVIDIA drivers? 'cos I can't. Seems that only AMD GPUs work at the moment?

Offline

#1086 2024-11-15 12:12:50

0BADC0DE
Member
From: Regnum Utriusque Siciliae
Registered: 2018-02-21
Posts: 326

Re: chromium: hardware video acceleration with VA-API

xuanrui wrote:

Sorry, false alarm: apparently I just have to change "VaapiVideoDecode" to "AcceleratedVideoDecode". The old flag is no longer recognized

Sure?
How have you checked? I use " sudo intel_gpu_top" ( I use Intel Xe GPU).
Id doesn't work for me with neither "AcceleratedVideoDecode" nor "AcceleratedVideoDecoder" (trailing "r").
For me it simply doesn't work.
But it works with 130.
Have you also enabled any flag in chrome:flags?

Last edited by 0BADC0DE (2024-11-15 12:14:32)


Maybe Computers Will Never Become As Intelligent
As Humans. Surely They Won't Ever Become So Stupid.

Offline

#1087 2024-11-15 12:17:04

xuanrui
Member
Registered: 2018-09-27
Posts: 52

Re: chromium: hardware video acceleration with VA-API

0BADC0DE wrote:
xuanrui wrote:

Sorry, false alarm: apparently I just have to change "VaapiVideoDecode" to "AcceleratedVideoDecode". The old flag is no longer recognized

Sure?
How have you checked? I use " sudo intel_gpu_top" ( I use Intel Xe GPU).
Id doesn't work for me with neither "AcceleratedVideoDecode" nor "AcceleratedVideoDecoder" (trailing "r").
For me it simply doesn't work.
But it works with 130.
Have you also enabled any flag in chrome:flags?

Well, it used to be VaapiVideoDecodeLinuxGL,VaapiDecodeLinuxZeroCopyGL, now you just replace "Vaapi" with "Accelerated": AcceleratedVideoDecodeLinuxGL,AcceleratedVideoDecodeLinuxZeroCopyGL

Offline

#1088 2024-11-15 12:23:05

Bzzz_56
Member
Registered: 2021-05-14
Posts: 36

Re: chromium: hardware video acceleration with VA-API

0BADC0DE wrote:

Have you also enabled any flag in chrome:flags?

For reference, u can check the flag commands here.

By the way, i find

VaapiIgnoreDriverChecks

is also necessary on my amdgpu setup to make hw decode working.

Last edited by Bzzz_56 (2024-11-15 12:27:07)

Offline

#1089 2024-11-15 12:23:12

0BADC0DE
Member
From: Regnum Utriusque Siciliae
Registered: 2018-02-21
Posts: 326

Re: chromium: hardware video acceleration with VA-API

xuanrui wrote:
0BADC0DE wrote:
xuanrui wrote:

Sorry, false alarm: apparently I just have to change "VaapiVideoDecode" to "AcceleratedVideoDecode". The old flag is no longer recognized

Sure?
How have you checked? I use " sudo intel_gpu_top" ( I use Intel Xe GPU).
Id doesn't work for me with neither "AcceleratedVideoDecode" nor "AcceleratedVideoDecoder" (trailing "r").
For me it simply doesn't work.
But it works with 130.
Have you also enabled any flag in chrome:flags?

Well, it used to be VaapiVideoDecodeLinuxGL,VaapiDecodeLinuxZeroCopyGL, now you just replace "Vaapi" with "Accelerated": AcceleratedVideoDecodeLinuxGL,AcceleratedVideoDecodeLinuxZeroCopyGL

NOw it is ok. But "AcceleratedVideoDecodeLinuxZeroCopyGL" prevents you for using the "VideoEnhance" feature from the GPU.

Is there anything for accelerated video encode ?


Maybe Computers Will Never Become As Intelligent
As Humans. Surely They Won't Ever Become So Stupid.

Offline

#1090 2024-11-15 12:24:34

0BADC0DE
Member
From: Regnum Utriusque Siciliae
Registered: 2018-02-21
Posts: 326

Re: chromium: hardware video acceleration with VA-API

Bzzz_56 wrote:
0BADC0DE wrote:

Have you also enabled any flag in chrome:flags?

For reference, u can check the flag commands here.

Super!!! Thanks @Bzzz_56!


Maybe Computers Will Never Become As Intelligent
As Humans. Surely They Won't Ever Become So Stupid.

Offline

#1091 2024-11-20 15:58:40

chaos-dremel
Member
Registered: 2024-11-20
Posts: 2

Re: chromium: hardware video acceleration with VA-API

0BADC0DE wrote:
xuanrui wrote:
0BADC0DE wrote:

Sure?
How have you checked? I use " sudo intel_gpu_top" ( I use Intel Xe GPU).
Id doesn't work for me with neither "AcceleratedVideoDecode" nor "AcceleratedVideoDecoder" (trailing "r").
For me it simply doesn't work.
But it works with 130.
Have you also enabled any flag in chrome:flags?

Well, it used to be VaapiVideoDecodeLinuxGL,VaapiDecodeLinuxZeroCopyGL, now you just replace "Vaapi" with "Accelerated": AcceleratedVideoDecodeLinuxGL,AcceleratedVideoDecodeLinuxZeroCopyGL

NOw it is ok. But "AcceleratedVideoDecodeLinuxZeroCopyGL" prevents you for using the "VideoEnhance" feature from the GPU.

Is there anything for accelerated video encode ?

--enable-features=AcceleratedVideoEncoder

Offline

#1092 2024-11-20 16:19:46

chaos-dremel
Member
Registered: 2024-11-20
Posts: 2

Re: chromium: hardware video acceleration with VA-API

Full Vilkan support on native Wayland:
--ozone-platform=wayland --use-vulkan --enable-features=Vulkan,VulkanFromANGLE,DefaultANGLEVulkan

Optional hint for Vulkan:
--use-gl=angle --use-angle=vulkan
--enable-features=UseOzonePlatform

Optional Wayland hint:
--enable-features=WaylandWindowDecorations


VAAPI Decode (basic):
--enable-features=AcceleratedVideoDecodeLinuxGL

also zero copy variant:
--enable-features=AcceleratedVideoDecodeLinuxZeroCopyGL

VAAPI Decode (more options, not guarantee to work on new versions):
--enable-features=VaapiIgnoreDriverChecks,UseMultiPlaneFormatForHardwareVideo,PlatformHEVCDecoderSupport

VAAPI Encode:
--enable-features=AcceleratedVideoEncoder

also some other old options:
--enable-accelerated-mjpeg-decode --enable-global-vaapi-lock --use-gpu-scheduler-dfs --cast-streaming-hardware-h264


Other "performance" options
--enable-zero-copy --canvas-oop-rasterization --enable-gpu-rasterization
--enable-features=CanvasOopRasterization


Enabling Web GPU (only with unsafe option):
--enable-gpu --enable-unsafe-webgpu


Also a lot of workaround options like:
--disable-gpu-driver-bug-workarounds --ignore-gpu-blocklist
But they are for situations when "nothing helped"


!!! Do not try to enable Skia Graphite with Vulkan -- you will get neither Vulkan, nor Skia Graphite working !!!
!!! RawDraw with Vulkan "works" but you'll get content with all text disappeared !!!

Last edited by chaos-dremel (2024-11-20 16:36:36)

Offline

#1093 2024-12-11 14:46:42

zayedkherani
Member
Registered: 2024-12-11
Posts: 1

Re: chromium: hardware video acceleration with VA-API

I got hardware acceleration to work, and playing upto 4K@60fps videos on YouTube, Netflix, Jellyfin... all seem to show up on `chrome://media-internals/` with `VaapiVideoDecoder` as the decoder.
Issue really only steps in on 8k videos, where the video buffers every 2-3 seconds, whereas there is a smooth playback on Windows. Media Internals report the decoder as `Dav1dVideoDecoder`. From what I can tell, both Jellyfin and YouTube is supplying a AV1 codec at 8k (7680x4320, 8k[16:9]). I've only gotten `Dav1dVideoDecoder` to be the decoder during any 8K stream, otherwise `VaapiVideoDecoder` is used.

vainfo:
==============================
Trying display: wayland
vainfo: VA-API version: 1.22 (libva 2.22.0)
vainfo: Driver version: Mesa Gallium driver 24.2.7-arch1.1 for AMD Radeon Graphics (radeonsi, renoir, LLVM 18.1.8, DRM 3.59, 6.11.7-zen1-1-zen)
vainfo: Supported profile and entrypoints
      VAProfileMPEG2Simple                      VAEntrypointVLD
      VAProfileMPEG2Main                         VAEntrypointVLD
      VAProfileVC1Simple                            VAEntrypointVLD
      VAProfileVC1Main                               VAEntrypointVLD
      VAProfileVC1Advanced                       VAEntrypointVLD
      VAProfileH264ConstrainedBaseline    VAEntrypointVLD
      VAProfileH264ConstrainedBaseline    VAEntrypointEncSlice
      VAProfileH264Main                              VAEntrypointVLD
      VAProfileH264Main                              VAEntrypointEncSlice
      VAProfileH264High                              VAEntrypointVLD
      VAProfileH264High                              VAEntrypointEncSlice
      VAProfileHEVCMain                            VAEntrypointVLD
      VAProfileHEVCMain                            VAEntrypointEncSlice
      VAProfileHEVCMain10                        VAEntrypointVLD
      VAProfileHEVCMain10                        VAEntrypointEncSlice
      VAProfileJPEGBaseline                       VAEntrypointVLD
      VAProfileVP9Profile0                           VAEntrypointVLD
      VAProfileVP9Profile2                           VAEntrypointVLD
      VAProfileNone                                     VAEntrypointVideoProc


chrome://gpu/:
Graphics Feature Status
==============================
*   Canvas: Hardware accelerated
*   Canvas out-of-process rasterization: Enabled
*   Direct Rendering Display Compositor: Disabled
*   Compositing: Hardware accelerated
*   Multiple Raster Threads: Enabled
*   OpenGL: Enabled
*   Rasterization: Hardware accelerated on all pages
*   Raw Draw: Disabled
*   Skia Graphite: Disabled
*   Video Decode: Hardware accelerated
*   Video Encode: Hardware accelerated
*   Vulkan: Enabled
*   WebGL: Hardware accelerated
*   WebGL2: Hardware accelerated
*   WebGPU: Hardware accelerated
*   WebNN: Enabled


Video Acceleration Information:
==============================
Decoding
Decode h264 baseline                64x64 to 4096x4096 pixels
Decode h264 main                      64x64 to 4096x4096 pixels
Decode h264 high                       64x64 to 4096x4096 pixels
Decode vp9 profile0                    64x64 to 8192x4352 pixels
Decode vp9 profile2                    64x64 to 8192x4352 pixels
Decode hevc main                      64x64 to 8192x4352 pixels
Decode hevc main 10                 64x64 to 8192x4352 pixels
Decode hevc main still-picture    64x64 to 8192x4352 pixels
Encoding
Encode h264 baseline                321x241 to 4096x2304 pixels, and/or 30.000 fps.
Encode h264 main                      321x241 to 4096x2304 pixels, and/or 30.000 fps.
Encode h264 high                       321x241 to 4096x2304 pixels, and/or 30.000 fps.

Offline

#1094 2024-12-11 19:50:14

topcat01
Member
Registered: 2019-09-17
Posts: 135

Re: chromium: hardware video acceleration with VA-API

zayedkherani wrote:

I got hardware acceleration to work, and playing upto 4K@60fps videos on YouTube, Netflix, Jellyfin... all seem to show up on `chrome://media-internals/` with `VaapiVideoDecoder` as the decoder.
Issue really only steps in on 8k videos, where the video buffers every 2-3 seconds, whereas there is a smooth playback on Windows. Media Internals report the decoder as `Dav1dVideoDecoder`. From what I can tell, both Jellyfin and YouTube is supplying a AV1 codec at 8k (7680x4320, 8k[16:9]). I've only gotten `Dav1dVideoDecoder` to be the decoder during any 8K stream, otherwise `VaapiVideoDecoder` is used.

Does Firefox work better on the same system?

Offline

#1095 2024-12-12 16:52:31

Pearf
Member
Registered: 2012-02-07
Posts: 2

Re: chromium: hardware video acceleration with VA-API

Working Wayland + Ozone + Vulkan + Vaapi decode and encode with AMD!

--use-gl=angle
--use-angle=vulkan
--enable-features=Vulkan,VulkanFromANGLE,DefaultANGLEVulkan,AcceleratedVideoDecodeLinuxZeroCopyGL,AcceleratedVideoEncoder,VaapiIgnoreDriverChecks,UseMultiPlaneFormatForHardwareVideo
--ozone-platform-hint=auto

Tested on brave/chromium with 7900XTX and Radeon 880M (Strix Point) and RX Vega 7 (Renoir) fully working. On the first two 8k@60fps (AV1) Youtube with no dropped frames. It is imho a really big leap for Linux desktop since hardware acceleration increases performance and lowers power comsumption on a laptop in a BIG way!

Let's hope it will not break again and will be activated by default soon.

Offline

Board footer

Powered by FluxBB