You are not logged in.

#1 2023-01-22 23:13:00

bernd_b
Member
Registered: 2013-07-30
Posts: 165

libva-2.17.0-1 breaks --vo=vaapi in mpv

After a system update, mpv wasn't able to play video with --vo=vaapi:

mpv --hwdec=vaapi --vo=vaapi Nord\ bei\ Nordwest-19-Canasta.mp4 
 (+) Video --vid=1 (*) (h264 1920x1080 50.000fps)
 (+) Audio --aid=1 --alang=deu (*) (aac 2ch 48000Hz)
[vo/vaapi] Warning: this compatibility VO is low quality and may have issues with OSD, scaling, screenshots and more.
[vo/vaapi] vo=gpu is the preferred choice in any case and includes VA-API support via hwdec=vaapi or vaapi-copy.
AO: [pipewire] 48000Hz stereo 2ch floatp
VO: [vaapi] 1920x1080 yuv420p
[vo/vaapi] vaPutSurface() failed (unknown libva error)
[vo/vaapi] vaPutSurface() failed (unknown libva error)
[vo/vaapi] vaPutSurface() failed (unknown libva error)
AV: 00:00:00 / 01:28:49 (0%) A-V:  0.000 Cache: 235s/118MB
[vo/vaapi] vaPutSurface() failed (unknown libva error)
[vo/vaapi] vaPutSurface() failed (unknown libva error)
.
.
.

I found this thread about vlc crashing. Suggestion here is to downgrade libva to 2.16.0-1.

I gave it a shot, and downgrading brings playback with --vo=vaapi back in mpv.

Does someone has any other clues?

Offline

#2 2023-01-23 11:27:54

Lone_Wolf
Administrator
From: Netherlands, Europe
Registered: 2005-10-04
Posts: 13,038

Re: libva-2.17.0-1 breaks --vo=vaapi in mpv

That thread is about a system with a recent amd processor and an older type of nvidia card .
Do you use similar hardware ?


[vo/vaapi] vaPutSurface() failed (unknown libva error)

What was the output of vainfo ?


--vo=vaapi

from man mpv - video output drivers

vaapi
    Intel VA API video output driver with support for hardware decoding. Note that there is absolutely no reason to use this, other than compatibility. This is low quality, and has issues with OSD. We strongly recommend that you use --vo=gpu with --hwdec=vaapi instead.

Why are you using --vo-vaapi ?

Last edited by Lone_Wolf (2023-01-24 11:46:45)


Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.

clean chroot building not flexible enough ?
Try clean chroot manager by graysky

Offline

#3 2023-01-23 18:14:45

bernd_b
Member
Registered: 2013-07-30
Posts: 165

Re: libva-2.17.0-1 breaks --vo=vaapi in mpv

Lone_Wolf wrote:

That thread is about a system with a recent amd processor and an older type of nvidia card .
Do you use similar hardware ?

No, I made this observation on my poor man's Intel G4560 with Intel HD Graphic 610.


Lone_Wolf wrote:

Why are you using --vo-vaapi ?

On a rare occasion, I tried to play a file with HDR-encoding. For performance reason, I chose --vo vaapi instead of default --vo gpu. I had the honour to discuss this here.

Lone_Wolf wrote:

What was the output of vainfo ?

vainfo 
Trying display: wayland
Trying display: x11
vainfo: VA-API version: 1.16 (libva 2.16.0)
vainfo: Driver version: Intel i965 driver for Intel(R) Kaby Lake - 2.4.1
vainfo: Supported profile and entrypoints
      VAProfileMPEG2Simple            : VAEntrypointVLD
      VAProfileMPEG2Simple            : VAEntrypointEncSlice
      VAProfileMPEG2Main              : VAEntrypointVLD
      VAProfileMPEG2Main              : VAEntrypointEncSlice
      VAProfileH264ConstrainedBaseline: VAEntrypointVLD
      VAProfileH264ConstrainedBaseline: VAEntrypointEncSlice
      VAProfileH264ConstrainedBaseline: VAEntrypointEncSliceLP
      VAProfileH264Main               : VAEntrypointVLD
      VAProfileH264Main               : VAEntrypointEncSlice
      VAProfileH264Main               : VAEntrypointEncSliceLP
      VAProfileH264High               : VAEntrypointVLD
      VAProfileH264High               : VAEntrypointEncSlice
      VAProfileH264High               : VAEntrypointEncSliceLP
      VAProfileH264MultiviewHigh      : VAEntrypointVLD
      VAProfileH264MultiviewHigh      : VAEntrypointEncSlice
      VAProfileH264StereoHigh         : VAEntrypointVLD
      VAProfileH264StereoHigh         : VAEntrypointEncSlice
      VAProfileVC1Simple              : VAEntrypointVLD
      VAProfileVC1Main                : VAEntrypointVLD
      VAProfileVC1Advanced            : VAEntrypointVLD
      VAProfileNone                   : VAEntrypointVideoProc
      VAProfileJPEGBaseline           : VAEntrypointVLD
      VAProfileJPEGBaseline           : VAEntrypointEncPicture
      VAProfileVP8Version0_3          : VAEntrypointVLD
      VAProfileVP8Version0_3          : VAEntrypointEncSlice
      VAProfileHEVCMain               : VAEntrypointVLD
      VAProfileHEVCMain               : VAEntrypointEncSlice
      VAProfileHEVCMain10             : VAEntrypointVLD
      VAProfileHEVCMain10             : VAEntrypointEncSlice
      VAProfileVP9Profile0            : VAEntrypointVLD
      VAProfileVP9Profile0            : VAEntrypointEncSlice
      VAProfileVP9Profile2            : VAEntrypointVLD
glxinfo -B
name of display: :0.0
display: :0  screen: 0
direct rendering: Yes
Extended renderer info (GLX_MESA_query_renderer):
    Vendor: Intel Open Source Technology Center (0x8086)
    Device: Mesa DRI Intel(R) HD Graphics 610 (KBL GT1) (0x5902)
    Version: 21.3.9
    Accelerated: yes
    Video memory: 3072MB
    Unified memory: yes
    Preferred profile: core (0x1)
    Max core profile version: 4.6
    Max compat profile version: 3.0
    Max GLES1 profile version: 1.1
    Max GLES[23] profile version: 3.2
OpenGL vendor string: Intel Open Source Technology Center
OpenGL renderer string: Mesa DRI Intel(R) HD Graphics 610 (KBL GT1)
OpenGL core profile version string: 4.6 (Core Profile) Mesa 21.3.9 Amber
OpenGL core profile shading language version string: 4.60
OpenGL core profile context flags: (none)
OpenGL core profile profile mask: core profile

OpenGL version string: 3.0 Mesa 21.3.9 Amber
OpenGL shading language version string: 1.30
OpenGL context flags: (none)

OpenGL ES profile version string: OpenGL ES 3.2 Mesa 21.3.9 Amber
OpenGL ES profile shading language version string: OpenGL ES GLSL ES 3.20

Offline

#4 2023-01-23 18:22:28

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 23,447

Re: libva-2.17.0-1 breaks --vo=vaapi in mpv

You have a Kaby Lake GPU, why are you using mesa-amber? It is supported by standard mesa with the iris GL driver and your default libva implementation  should come from intel-media-driver instead of libva-intel-driver.

Last edited by V1del (2023-01-23 18:25:03)

Offline

#5 2023-01-23 18:51:36

bernd_b
Member
Registered: 2013-07-30
Posts: 165

Re: libva-2.17.0-1 breaks --vo=vaapi in mpv

I may have misunderstood the wiki-page.

mesa-amber is the legacy Mesa package which includes the classic (non-Gallium3D) drivers for Gen 2 hardware and later. This driver has better performance and stability for Gen 7 and older hardware.

I thought Kabby Lake to be Gen7 and so I installed it with the last update of my system.

The same for intel-media-driver versus libva-intel-driver:

HD Graphics series starting from Broadwell (2014) and newer are supported by intel-media-driver.
GMA 4500 (2008) and newer GPUs, including HD Graphics up to Coffee Lake (2017) are supported by libva-intel-driver.

In my case, it seems to be irrelevant which of both to choose.

Last edited by bernd_b (2023-01-23 18:54:24)

Offline

#6 2023-01-23 18:59:44

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 23,447

Re: libva-2.17.0-1 breaks --vo=vaapi in mpv

WTF? Not sure based on what that recommendation is there. Both of these relevant packages/technologies came about when these generations were new precisely because they shipped better HW capabilites that mandated newer implementations than stringing along support in the older APIs and should likely generally be preferred.

I was confused for a sec, the generation nomenclature can be confusing and it is actually different for the GPU as opposed to the CPU, in this context we are talking about GPU generations. Gen 8 is Haswell and Gen 9 is Skylake+ https://en.wikipedia.org/wiki/Intel_Gra … chitecture

Even if they might not directly affect your issue for now (FWIW you might want to reboot/recheck the vainfo output) you are leaving a lot of recent developments on the table your CPU/GPU can actually  benefit from if you stay on the old versions.

Last edited by V1del (2023-01-23 19:27:01)

Offline

#7 2023-01-23 20:51:34

bernd_b
Member
Registered: 2013-07-30
Posts: 165

Re: libva-2.17.0-1 breaks --vo=vaapi in mpv

O.K, I switched to intel-media-driver and updated the system to be on the safe side.

Unfortunatly, --vo vaapi seems still to be broken.

mpv --no-config --hwdec-codecs=all --hwdec=vaapi --vo=vaapi Friesland-17-Artenvielfalt.mp4 
 (+) Video --vid=1 (*) (h264 1280x720 50.000fps)
 (+) Audio --aid=1 --alang=deu (*) (aac 2ch 48000Hz)
[vo/vaapi] OSD format not supported. Disabling OSD.
[vo/vaapi] Warning: this compatibility VO is low quality and may have issues with OSD, scaling, screenshots and more.
[vo/vaapi] vo=gpu is the preferred choice in any case and includes VA-API support via hwdec=vaapi or vaapi-copy.
AO: [pipewire] 48000Hz stereo 2ch floatp
VO: [vaapi] 1280x720 yuv420p
[vo/vaapi] vaPutSurface() failed (invalid parameter)
[vo/vaapi] vaPutSurface() failed (invalid parameter)
AV: 00:00:00 / 01:29:20 (0%) A-V:  0.004 Dropped: 1 Cache: 191s/69MB
[vo/vaapi] vaPutSurface() failed (invalid parameter)
vainfo
Trying display: wayland
Trying display: x11
vainfo: VA-API version: 1.17 (libva 2.17.1)
vainfo: Driver version: Intel iHD driver for Intel(R) Gen Graphics - 23.1.0 ()
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

Last edited by bernd_b (2023-01-24 13:54:26)

Offline

#8 2023-01-23 21:46:01

Maniaxx
Member
Registered: 2014-05-14
Posts: 757

Re: libva-2.17.0-1 breaks --vo=vaapi in mpv

bernd_b wrote:

Unfortunatly, --vo vaapi seems still to be broken.

What about --vo=gpu with the new drivers (performance wise)?
If you think the picture is wrong try some more professional/reasonable test videos to analyze color/luma ramps, linearization, clamping and whatsoever. Maybe start with something like this or that. Download with yt-dlp or similar.

Last edited by Maniaxx (2023-01-23 21:52:19)


sys2064

Offline

#9 2023-01-23 21:59:16

bernd_b
Member
Registered: 2013-07-30
Posts: 165

Re: libva-2.17.0-1 breaks --vo=vaapi in mpv

On typical files up to 1080p --vo=gpu seems to work without issues. But I never could say that --vo=vaapi was inferior.

I noticed skippy movements when I started to playback files with HDR-profile. See the link I posted above.
--vo=vaapi gives pale colours compared to --vo=gpu on my setup, but movement were always fluently.

I can't say for now if the intel-media-drivers work better regarding performance/movements, I had to do further testing as suggested.

But anyway, an update shouldn't break functionality, or is the support finally ceased for --vo=vaapi?

Last edited by bernd_b (2023-01-23 22:02:30)

Offline

#10 2023-01-24 09:42:14

Maniaxx
Member
Registered: 2014-05-14
Posts: 757

Re: libva-2.17.0-1 breaks --vo=vaapi in mpv

bernd_b wrote:

--vo=vaapi gives pale colours compared to --vo=gpu on my setup

And it has already been told that this is most likely caused by bad data interpretation/processing (clamped luma/color range). That's why i pointed to some more serious testing methods to figure that out. The goal should be to get a proper technical output (that might not be possible with the old renderer). After that, one could still change colors to preferred liking.

Not sure if a side effect, your comparison screenshots show color variations in the window decorations as well. This could be a select/deselect variation (during screenshot creation) but this could also be a different global color profile/processing affecting even the desktop. Just an observation, not sure if relevant or correct.


sys2064

Offline

#11 2023-01-24 12:13:19

bernd_b
Member
Registered: 2013-07-30
Posts: 165

Re: libva-2.17.0-1 breaks --vo=vaapi in mpv

The screenshots give a very good impression of how it turns out on the screen.

I am with you that vo=gpu is to preferred in any way.  But on my hardware --vo=vaapi is a performance saver. If using intel-media-driver instead of libva-intel-driver is a game changer, I have to test, but this is difficult and at least takes more time.

Still, the question remains if --vo=vaapi support is silently dropped (by libva?) If not, where is fault?
Since when using libva-intel-driver instead of intel-media-driver downgrading to libva-2.16 helps to make --vo=vaapi work again, I guess something gone missing in libva?

Last edited by bernd_b (2023-01-24 13:52:24)

Offline

#12 2023-01-24 13:25:23

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 23,447

Re: libva-2.17.0-1 breaks --vo=vaapi in mpv

There's https://github.com/intel/libva/issues/677 which has identified a commit enabling DRI 3 support in the X11 renderer of libva as causing potential issues, maybe try to revert that and check behaviour.

Last edited by V1del (2023-01-24 13:25:43)

Offline

#13 2023-01-24 20:17:14

bernd_b
Member
Registered: 2013-07-30
Posts: 165

Re: libva-2.17.0-1 breaks --vo=vaapi in mpv

I compiled libva as described here

and --vo=vaapi is working again.

pv --no-config --hwcodecs=all --hwdec=vaapi --vo=vaapi --autofit=50% SCHNELLTEST\ HDR.webm 
Error parsing option hwcodecs (option not found)
Setting commandline option --hwcodecs=all failed.
Exiting... (Fatal error)
[bernd_b@P4560-dev FAA4-0ECA]$ mpv --no-config --hwdec-codecs=all --hwdec=vaapi --vo=vaapi --autofit=50% SCHNELLTEST\ HDR.webm 
 (+) Video --vid=1 (*) (vp9 3840x2160 24.000fps)
 (+) Audio --aid=1 --alang=eng (*) (opus 2ch 48000Hz)
[vo/vaapi] OSD format not supported. Disabling OSD.
[vo/vaapi] Warning: this compatibility VO is low quality and may have issues with OSD, scaling, screenshots and more.
[vo/vaapi] vo=gpu is the preferred choice in any case and includes VA-API support via hwdec=vaapi or vaapi-copy.
[autoconvert] Converting yuv420p10 -> yuv420p
AO: [pipewire] 48000Hz stereo 2ch floatp
[autoconvert] Converting yuv420p10 -> yuv420p
VO: [vaapi] 3840x2160 yuv420p
AV: 00:00:14 / 00:04:24 (6%) A-V:  0.000 Cache: 55s/150M

But: mpv doesn't indicate to use hw-decoding (and there is high CPU usage) when --vo=vaaapi is chosen and OSD doesn't work.

Switching to the default OSD --vo=gpu and hwdecoding and OSD work.

mpv --no-config --hwdec-codecs=all --hwdec=vaapi --autofit=50% SCHNELLTEST\ HDR.webm 
 (+) Video --vid=1 (*) (vp9 3840x2160 24.000fps)
 (+) Audio --aid=1 --alang=eng (*) (opus 2ch 48000Hz)
Using hardware decoding (vaapi).
AO: [pipewire] 48000Hz stereo 2ch floatp
VO: [gpu] 3840x2160 vaapi[p010]
AV: 00:00:39 / 00:04:24 (15%) A-V:  0.000 Cache: 55s/150MB

Last edited by bernd_b (2023-01-25 09:00:16)

Offline

#14 2023-01-24 22:05:05

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

Re: libva-2.17.0-1 breaks --vo=vaapi in mpv

The same for intel-media-driver versus libva-intel-driver

Did you restore the status quo ante wrt the VAAPI driver?

Offline

#15 2023-01-25 09:04:46

bernd_b
Member
Registered: 2013-07-30
Posts: 165

Re: libva-2.17.0-1 breaks --vo=vaapi in mpv

seth wrote:

Did you restore the status quo ante wrt the VAAPI driver?

I hope I understand the question. The Outputs of my last post were done using intel-media-driver as in Post #7.

Offline

#16 2023-01-25 09:07:38

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

Re: libva-2.17.0-1 breaks --vo=vaapi in mpv

You were previously using libva-intel-driver, right?
Did you try that against the patched libva?

Offline

#17 2023-01-25 09:11:57

bernd_b
Member
Registered: 2013-07-30
Posts: 165

Re: libva-2.17.0-1 breaks --vo=vaapi in mpv

O.K., no, not so far. But I will.

UPDATE:
libva-intel-driver shows to me the nearly same behaviour with patched libva:

bernd_b@P4560-dev FAA4-0ECA]$ mpv --no-config --hwdec-codecs=all --hwdec=vaapi --vo=vaapi --autofit=50% SCHNELLTEST\ HDR.webm  (+) Video --vid=1 (*) (vp9 3840x2160 24.000fps)
 (+) Audio --aid=1 --alang=eng (*) (opus 2ch 48000Hz)
[vo/vaapi] Warning: this compatibility VO is low quality and may have issues with OSD, scaling, screenshots and more.
[vo/vaapi] vo=gpu is the preferred choice in any case and includes VA-API support via hwdec=vaapi or vaapi-copy.
[autoconvert] Converting yuv420p10 -> yuv420p
AO: [pipewire] 48000Hz stereo 2ch floatp
[autoconvert] Converting yuv420p10 -> yuv420p
VO: [vaapi] 3840x2160 yuv420p
AV: 00:00:03 / 00:04:24 (1%) A-V:  0.000 Cache: 56s/150MB

Exiting... (Quit)



[bernd_b@P4560-dev FAA4-0ECA]$ mpv --no-config --hwdec-codecs=all --hwdec=vaapi --vo=gpu --autofit=50% SCHNELLTEST\ HDR.webm  (+) Video --vid=1 (*) (vp9 3840x2160 24.000fps)
 (+) Audio --aid=1 --alang=eng (*) (opus 2ch 48000Hz)
Using hardware decoding (vaapi).
AO: [pipewire] 48000Hz stereo 2ch floatp
VO: [gpu] 3840x2160 vaapi[p010]
(Paused) AV: 00:00:20 / 00:04:24 (8%) A-V:  0.000 Cache: 55s/150MB

But there is OSD using libva-intel-driver with --vo=vaapi.

For the the record:

[bernd_b@P4560-dev FAA4-0ECA]$ vainfo 
Trying display: wayland
Trying display: x11
vainfo: VA-API version: 1.17 (libva 2.17.1)
vainfo: Driver version: Intel i965 driver for Intel(R) Kaby Lake - 2.4.1
vainfo: Supported profile and entrypoints
      VAProfileMPEG2Simple            : VAEntrypointVLD
      VAProfileMPEG2Simple            : VAEntrypointEncSlice
      VAProfileMPEG2Main              : VAEntrypointVLD
      VAProfileMPEG2Main              : VAEntrypointEncSlice
      VAProfileH264ConstrainedBaseline: VAEntrypointVLD
      VAProfileH264ConstrainedBaseline: VAEntrypointEncSlice
      VAProfileH264ConstrainedBaseline: VAEntrypointEncSliceLP
      VAProfileH264Main               : VAEntrypointVLD
      VAProfileH264Main               : VAEntrypointEncSlice
      VAProfileH264Main               : VAEntrypointEncSliceLP
      VAProfileH264High               : VAEntrypointVLD
      VAProfileH264High               : VAEntrypointEncSlice
      VAProfileH264High               : VAEntrypointEncSliceLP
      VAProfileH264MultiviewHigh      : VAEntrypointVLD
      VAProfileH264MultiviewHigh      : VAEntrypointEncSlice
      VAProfileH264StereoHigh         : VAEntrypointVLD
      VAProfileH264StereoHigh         : VAEntrypointEncSlice
      VAProfileVC1Simple              : VAEntrypointVLD
      VAProfileVC1Main                : VAEntrypointVLD
      VAProfileVC1Advanced            : VAEntrypointVLD
      VAProfileNone                   : VAEntrypointVideoProc
      VAProfileJPEGBaseline           : VAEntrypointVLD
      VAProfileJPEGBaseline           : VAEntrypointEncPicture
      VAProfileVP8Version0_3          : VAEntrypointVLD
      VAProfileVP8Version0_3          : VAEntrypointEncSlice
      VAProfileHEVCMain               : VAEntrypointVLD
      VAProfileHEVCMain               : VAEntrypointEncSlice
      VAProfileHEVCMain10             : VAEntrypointVLD
      VAProfileHEVCMain10             : VAEntrypointEncSlice
      VAProfileVP9Profile0            : VAEntrypointVLD
      VAProfileVP9Profile0            : VAEntrypointEncSlice
      VAProfileVP9Profile2            : VAEntrypointVLD

Last edited by bernd_b (2023-01-25 09:38:40)

Offline

Board footer

Powered by FluxBB