You are not logged in.

#1 2020-12-06 16:45:37

andrzej1_1
Member
Registered: 2017-09-07
Posts: 50

Glitched video rendering with VLC

Since a long time I can't play videos with VLC, because rendering is glitched - sample mp4 video:
k5GIH6nm.png

This is the console output:

VLC media player 3.0.11.1 Vetinari (revision 3.0.11.1-0-g52483f3ca2)
[0000565195eb95b0] main libvlc: Running vlc with the default interface. Use 'cvlc' to use vlc without interface.
qt.qpa.xcb: QXcbConnection: XCB error: 5 (BadAtom), sequence: 444, resource id: 0, major code: 20 (GetProperty), minor code: 0
[00007faa480075e0] gl gl: Initialized libplacebo v2.72.0 (API v72)
libva error: vaGetDriverNameByIndex() failed with unknown libva error, driver_name = (null)
[00007faa480075e0] glconv_vaapi_x11 gl error: vaInitialize: unknown libva error
[00007faa60c18a70] avcodec decoder: Using Intel iHD driver for Intel(R) Gen Graphics - 20.4.1 () for hardware decoding

However mpv is playing video with VA-API without any problem:

$ mpv --hwdec=auto  file_example_MP4_480_1_5MG.mp4
 (+) Video --vid=1 (*) (h264 480x270 30.000fps)
 (+) Audio --aid=1 (*) (aac 2ch 48000Hz)
Cannot load libcuda.so.1
Using hardware decoding (vaapi).
AO: [pulse] 48000Hz stereo 2ch float
VO: [gpu] 480x270 vaapi[nv12]
AV: 00:00:01 / 00:00:30 (5%) A-V:  0.000

Exiting... (Quit)

My GPU is AMD Radeon RX 580 and these are related installed packages:

$ sudo pacman -Qn | grep libva
lib32-libva-mesa-driver 20.2.3-1
libva 2.10.0-1
libva-intel-driver 2.4.1-1
libva-mesa-driver 20.2.3-1
libva-utils 2.9.1-1
libva-vdpau-driver 0.7.4-5
$ sudo pacman -Qn | grep mesa       
lib32-libva-mesa-driver 20.2.3-1
lib32-mesa 20.2.3-1
lib32-mesa-vdpau 20.2.3-1
libva-mesa-driver 20.2.3-1
mesa 20.2.3-1
mesa-demos 8.4.0-4
mesa-vdpau 20.2.3-1
opencl-mesa 20.2.3-1
vulkan-mesa-layers 20.2.3-1

I would like to get your help to know answer for two things:
1. What might be the problem VLC is unable to initialize VA-API?
2. Even though CPU hardware decoding is used,  why I see the glitches?

Last edited by andrzej1_1 (2020-12-07 10:04:06)

Offline

#2 2020-12-06 21:35:28

seth
Member
Registered: 2012-09-03
Posts: 35,197

Re: Glitched video rendering with VLC

Please replace the oversized image w/ a thumbnail/link.

My GPU is AMD Radeon RX 580 and these are related installed packages:

[00007faa60c18a70] avcodec decoder: Using Intel iHD driver for Intel(R) Gen Graphics - 20.4.1 () for hardware decoding

Post the output of "lspci" and please ensure to have checked https://wiki.archlinux.org/index.php/VL … er_upgrade (and downwards)

Offline

#3 2020-12-07 10:27:10

andrzej1_1
Member
Registered: 2017-09-07
Posts: 50

Re: Glitched video rendering with VLC

Thumbnail fixed, lspci output:

00:00.0 Host bridge: Intel Corporation 8th Gen Core Processor Host Bridge/DRAM Registers (rev 07)
00:01.0 PCI bridge: Intel Corporation Xeon E3-1200 v5/E3-1500 v5/6th Gen Core Processor PCIe Controller (x16) (rev 07)
00:02.0 Display controller: Intel Corporation UHD Graphics 630 (Desktop)
00:08.0 System peripheral: Intel Corporation Xeon E3-1200 v5/v6 / E3-1500 v5 / 6th/7th/8th Gen Core Processor Gaussian Mixture Model
00:14.0 USB controller: Intel Corporation 200 Series/Z370 Chipset Family USB 3.0 xHCI Controller
00:14.2 Signal processing controller: Intel Corporation 200 Series PCH Thermal Subsystem
00:16.0 Communication controller: Intel Corporation 200 Series PCH CSME HECI #1
00:17.0 SATA controller: Intel Corporation 200 Series PCH SATA controller [AHCI mode]
00:1c.0 PCI bridge: Intel Corporation 200 Series PCH PCI Express Root Port #1 (rev f0)
00:1c.4 PCI bridge: Intel Corporation 200 Series PCH PCI Express Root Port #5 (rev f0)
00:1f.0 ISA bridge: Intel Corporation Z370 Chipset LPC/eSPI Controller
00:1f.2 Memory controller: Intel Corporation 200 Series/Z370 Chipset Family Power Management Controller
00:1f.3 Audio device: Intel Corporation 200 Series PCH HD Audio
00:1f.4 SMBus: Intel Corporation 200 Series/Z370 Chipset Family SMBus Controller
00:1f.6 Ethernet controller: Intel Corporation Ethernet Connection (2) I219-V
01:00.0 VGA compatible controller: Advanced Micro Devices, Inc. [AMD/ATI] Ellesmere [Radeon RX 470/480/570/570X/580/580X/590] (rev e7)
01:00.1 Audio device: Advanced Micro Devices, Inc. [AMD/ATI] Ellesmere HDMI Audio [Radeon RX 470/480 / 570/580/590]
03:00.0 USB controller: ASMedia Technology Inc. ASM2142 USB 3.1 Host Controller

I downgraded VLC and 3.0.4-7 is using CPU acceleration and playing without glitches. However 3.0.6-13 onward are looking like on screenshot that I attached - I will try to compile it from sources and bisect the problem.

Offline

#4 2020-12-07 13:56:35

seth
Member
Registered: 2012-09-03
Posts: 35,197

Re: Glitched video rendering with VLC

Do the older versions also use the intel chip?
"driver_name = (null)" looks fishy - what's the output on the older versions?

Offline

#5 2020-12-09 14:32:31

andrzej1_1
Member
Registered: 2017-09-07
Posts: 50

Re: Glitched video rendering with VLC

It's not VLC bug; it might be related to Wayland, Intel drivers or libva - see https://github.com/intel/media-driver/i … -740347980

$ vainfo --display x11
libva error: vaGetDriverNameByIndex() failed with unknown libva error, driver_name = (null)
vaInitialize failed with error code -1 (unknown libva error),exit

As a temporary workaround I am using environmental variable, that makes everything working:

LIBVA_DRIVER_NAME=radeonsi

Last edited by andrzej1_1 (2020-12-09 14:35:01)

Offline

Board footer

Powered by FluxBB