Bug-Report: VLC 3 swaps even & odd scanlines (AMD Ryzen 2400G) [solved]

*nix specific usage questions
CO_Windler
Blank Cone
Blank Cone
Posts: 15
Joined: 15 Aug 2021 07:21
VLC version: 3.0.x
Operating System: Windows, Linux
Location: Germany

Bug-Report: VLC 3 swaps even & odd scanlines (AMD Ryzen 2400G) [solved]

Postby CO_Windler » 17 Aug 2021 07:01

fix: Apparently video output module must be set to XBC instead of VDPAU output.

The default VLC 3.0.9 of Linux Mint 20.1 has a bug that seems to swap all even and odd scanlines in low resolution video files (downloaded from Youtube), which looks ugly and makes small text unreadable. I am using KDE5 Plasma on AMD Ryzen 2400G (Vega graphics, output through HDMI2VGA adapter on CRT monitor) with recent amdgpu driver 21.20.

(I would include a screenshot example, but don't know how to upload a photo here.)

The bug also happens with other graphics driver versions. It swaps scanlines only on screen but not in the video snapshot PNG saved with VLC itself. Temporary I had tried out VLC 3.0.16 from a PPA (made same bug?), but had to uninstall it because it corrupts converted video files. The bug does not happen on my laptop Thinkpad X61t (Intel Core2Duo 1.6GHz with Intel graphics, 4GB RAM, 160GB HDD, wifi removed) with Win10 (old version) and VLC 3.0.6.

I use VLC mainly for playing downloaded video files and converting them to lower resolutions (often 240p). I do not use the streaming features.

I typically use these conversion parameters:

Encapsulation: MP4/MOV
Video Codec: H-264 (with custom bitrate and height set)
Audio Codec: MP3 (44100 Hz, custom bitrate)

As a collector and hardware researcher of music keyboards and soundtoys, for reference I keep on my harddisk tons of downloaded youtube tech info and tutorial videos. Hence I need VLC for quick sighting and conversion (file size reduction). Yet I used this this on my main PC (Colani bigtower), but because the highend Win98SE machine (AMD K6-3@550MHz, 768MB RAM) became completely overloaded with this work (160GB harddrive full to the brim and FAT32 too slow), I installed an additional modern ITX mainboard with AMD 2400G, 16GB RAM and 8TB harddrive running Linux Mint.

Code: Select all

MAY THE SOFTWARE BE WITH YOU! *============================================================================* I CYBERYOGI Christian Oliver(=CO=) Windler I I (teachmaster of LOGOLOGIE - the first cyberage-religion!) I I ! I *=============================ABANDON=THE=BRUTALITY==========================*
Last edited by CO_Windler on 18 Aug 2021 06:16, edited 2 times in total.

Rémi Denis-Courmont
Developer
Developer
Posts: 15265
Joined: 07 Jun 2004 16:01
VLC version: master
Operating System: Linux
Contact:

Re: Bug-Report: VLC 3 swaps even & odd scanlines (AMD Ryzen 2400G)

Postby Rémi Denis-Courmont » 17 Aug 2021 13:11

Without logs, nobody can say for sure, but it sounds like a bug in display drivers.
Rémi Denis-Courmont
https://www.remlab.net/
Private messages soliciting support will be systematically discarded

CO_Windler
Blank Cone
Blank Cone
Posts: 15
Joined: 15 Aug 2021 07:21
VLC version: 3.0.x
Operating System: Windows, Linux
Location: Germany

Re: Bug-Report: VLC 3 swaps even & odd scanlines (AMD Ryzen 2400G)

Postby CO_Windler » 17 Aug 2021 15:55

The scanline swap has the width of the played low resolution video, not the much thinner scanlines of the linux graphics mode (using 1280x1024 on a 22'' Trinitron CRT).

This is the debug log from the "Meldungen" window when playing a video. The full debug log (mode 2) is too huge (>1600 lines) and gets refused by this forum.

This seems to be the scaler when playing a 360p H264 video:

Code: Select all

chain debug: Trying to use chroma I0AL as middle man main debug: looking for video converter module matching "any": 23 candidates swscale debug: 640x360 (640x368) chroma: I420 -> 640x360 (640x368) chroma: I0AL with scaling using Bicubic (good quality)
At the end there is this stuff. I suspect that it is an upscaling bug happening after decoding the original resolution video.

Code: Select all

main debug: removing module "adjust" main debug: Filter 0x7f039c1107d0 removed from chain main warning: VoutDisplayEvent 'pictures invalid' main warning: VoutDisplayEvent 'pictures invalid' main warning: VoutDisplayEvent 'pictures invalid' vdpau_display debug: resetting pictures main debug: removing module "freetype" main debug: removing module "vdpau_chroma" main debug: Filter 0x7f039c12b560 removed from chain main debug: A filter to adapt decoder VDV0 to display VDOR is needed main debug: looking for video converter module matching "any": 23 candidates vdpau_chroma debug: using video mixer temporal deinterlace feature vdpau_chroma debug: using video mixer sharpness feature vdpau_chroma debug: using video mixer 7 main debug: using video converter module "vdpau_chroma" main debug: Filter 'VDPAU' (0x7f039c15e3b0) appended to chain main debug: looking for text renderer module matching "any": 2 candidates freetype debug: Building font databases. freetype debug: Took -14926 microseconds main debug: using text renderer module "freetype" main debug: looking for hw decoder module matching "any": 3 candidates main debug: using hw decoder module "vdpau_avcodec" avcodec info: Using G3DVL VDPAU Driver Shared Library version 1.0 for hardware decoding main debug: Received first picture main debug: Decoder wait done in 319 ms main debug: inserting 1450 zeroes main debug: resized to 1268x812 main debug: VoutDisplayEvent 'resize' 1268x812 main debug: auto hiding mouse cursor
Debug log in mode 1 (warnings) looks like this:

Code: Select all

mp4 warning: unknown box type gmin (incompletely loaded) mp4 warning: unknown box type text (incompletely loaded) mp4 warning: elst box found mp4 warning: STTS table of 1 entries mp4 warning: CTTS table of 24208 entries mp4 warning: elst box found mp4 warning: STTS table of 1 entries mp4 warning: elst box found mp4 warning: STTS table of 14 entries faad warning: decoded zero sample main error: video output creation failed main error: failed to create video output postproc error: Unsupported input chroma (VDV0) postproc warning: Quantification table was not set by video decoder. Postprocessing won't look good. chain error: Too high level of recursion (3) main error: Failed to create video converter chain error: Too high level of recursion (3) main error: Failed to create video converter ... chain error: Too high level of recursion (3) main error: Failed to create video converter main error: Failed to create video converter main error: Failed to create video converter main error: Failed to compensate for the format changes, removing all filters main warning: VoutDisplayEvent 'pictures invalid' main warning: VoutDisplayEvent 'pictures invalid' main warning: VoutDisplayEvent 'pictures invalid' avcodec info: Using G3DVL VDPAU Driver Shared Library version 1.0 for hardware decoding

Rémi Denis-Courmont
Developer
Developer
Posts: 15265
Joined: 07 Jun 2004 16:01
VLC version: master
Operating System: Linux
Contact:

Re: Bug-Report: VLC 3 swaps even & odd scanlines (AMD Ryzen 2400G)

Postby Rémi Denis-Courmont » 17 Aug 2021 16:17

Well, this just confirms that the bugged deinterlacing algorithm is provided by your display driver. You will need to turn hardware decoding acceleration off.
Rémi Denis-Courmont
https://www.remlab.net/
Private messages soliciting support will be systematically discarded

CO_Windler
Blank Cone
Blank Cone
Posts: 15
Joined: 15 Aug 2021 07:21
VLC version: 3.0.x
Operating System: Windows, Linux
Location: Germany

Re: Bug-Report: VLC 3 swaps even & odd scanlines (AMD Ryzen 2400G)

Postby CO_Windler » 18 Aug 2021 05:25

Disabling hardware decoding in the Eingang/Videocodecs/FFmpeg setting does not change it at all. I suspect that the screen stretch algorithm by the display manager might be faulty, but in KDE5 Plasma and Cinnamon they look the same. The vertically alternating stripes of partially wrong scanlines look a bit like a terribly coarse ancient dithering attempt to save computing time (likely a Pentium 2 could do that better). Celluloid plays the same 360p video without any stripes (i.e. text is much better readable). But even when the video is set to 100% size it has swapped scanlines. The fact that a video screenshot by VLC itself is flawless proves that the bug must be in the postprocessing.

Is there a mode to let VLC itself stretch the output to the window size in pure software without any use of hardware or display manager acceleration? Or may it be that deinterlacing gets falsely activated despite the video is not interlaced?

CO_Windler
Blank Cone
Blank Cone
Posts: 15
Joined: 15 Aug 2021 07:21
VLC version: 3.0.x
Operating System: Windows, Linux
Location: Germany

Re: Bug-Report: VLC 3 swaps even & odd scanlines (AMD Ryzen 2400G)

Postby CO_Windler » 18 Aug 2021 06:11

I have switched the video output module from VDPAU to xVideo output (XBC) now, which seems to fix the scanline swap.


Return to “VLC media player for Linux and friends Troubleshooting”

Who is online

Users browsing this forum: No registered users and 11 guests