Bug-Report: VLC 3.0.16 corrupts converted videos (black screen at start)
Posted: 15 Aug 2021 08:08
The default VLC 3.0.9 of Linux Mint 20.1 has a bug that makes it lockup when closing its window ("x" button) while a video is playing. (Tested in KDE5 Plasma on AMD 2400G with recent amdgpu driver 21.20.) So you always need to enter "killall -9 vlc" to make VLC start again.
So I tried to install VLC 3.0.16 from the savoury1 PPA which indeed fixes this problem but caused much worse trouble. Particularly it corrupts converted videos, showing the first 8 seconds as black screen during playback.
https://launchpad.net/~savoury1/+archive/ubuntu/vlc3
First the requested ppa:savoury1/ffmpeg4 installs a defective version of ffmpeg 4.4 that crashes, which made e.g. youtube-dl, mkv and Celluloid unusable, showing an error. It was someting like "ffmpeg: symbol lookup error: /lib/x86_64-linux-gnu/libavcodec.so.58: undefined symbol: drmModeGetFB2". Updating to a recent kernel 5.4.80 and amdgpu version 21.20 did not help, so I removed the PPA and downgraded with aptitude ffmpeg to the previous version which runs well.
VLC 3.0.16 does not crash by closing window anymore, but has a severe bug that corrupts converted videos. Playing them in VLC (also in older version) makes the screen stay black during the first about 8 seconds (playing only audio). Only after this the window size adapts to the now visible video, which makes me conclude that VLC fails to recognize the neccesary video codec type. Setting video cache to huge 8000ms displays a still picture instead of black, which isn't useful either. The converted videos do play correctly in Celluloid and mkv those seem to be immune against the video file corruption.
The conversion bug does not appear so long x264 conversion quality is set "ultrafast" (the default, which looks extremely ugly) or at high bitrates. Also X264 profile & level set to "baseline" instead of "high" works but produces even worse pixelated video. (The selected audio resolution doesn't matter.)
I normally only use quality "slow" and convert downloaded youtube videos to fairly low resolutions (360p, 240p, sometimes 144p with video bitrates about 80..160kb/s) to save disk space. Old converted video files still play fine in VLC 3.0.16, which proves that the conversion and not playback went faulty. The bug does not appear at high bitrates, which may be the reason why it stayed undetected.
The line "[00007fee0d57c6b0] main decoder error: buffer deadlock prevented" stands for a timeout, which may have to do with failing to recognize the correct codec type during the initial 8 seconds.
The video player "mpv" uses the hardware decoder vaapi, which plays converted videos correctly. But VLC outputs green pixel garbage when trying to convert with the same(?) input codec "VA-API".
I spent a whole night trying out different VLC settings without success, so finally I could do nothing but removing the PPA and then downgrading VLC to the default version 3.0.9 through aptitude.
sudo add-apt-repository -r ppa:savoury1/vlc3
So I tried to install VLC 3.0.16 from the savoury1 PPA which indeed fixes this problem but caused much worse trouble. Particularly it corrupts converted videos, showing the first 8 seconds as black screen during playback.
https://launchpad.net/~savoury1/+archive/ubuntu/vlc3
First the requested ppa:savoury1/ffmpeg4 installs a defective version of ffmpeg 4.4 that crashes, which made e.g. youtube-dl, mkv and Celluloid unusable, showing an error. It was someting like "ffmpeg: symbol lookup error: /lib/x86_64-linux-gnu/libavcodec.so.58: undefined symbol: drmModeGetFB2". Updating to a recent kernel 5.4.80 and amdgpu version 21.20 did not help, so I removed the PPA and downgraded with aptitude ffmpeg to the previous version which runs well.
VLC 3.0.16 does not crash by closing window anymore, but has a severe bug that corrupts converted videos. Playing them in VLC (also in older version) makes the screen stay black during the first about 8 seconds (playing only audio). Only after this the window size adapts to the now visible video, which makes me conclude that VLC fails to recognize the neccesary video codec type. Setting video cache to huge 8000ms displays a still picture instead of black, which isn't useful either. The converted videos do play correctly in Celluloid and mkv those seem to be immune against the video file corruption.
The conversion bug does not appear so long x264 conversion quality is set "ultrafast" (the default, which looks extremely ugly) or at high bitrates. Also X264 profile & level set to "baseline" instead of "high" works but produces even worse pixelated video. (The selected audio resolution doesn't matter.)
I normally only use quality "slow" and convert downloaded youtube videos to fairly low resolutions (360p, 240p, sometimes 144p with video bitrates about 80..160kb/s) to save disk space. Old converted video files still play fine in VLC 3.0.16, which proves that the conversion and not playback went faulty. The bug does not appear at high bitrates, which may be the reason why it stayed undetected.
Code: Select all
running vlc -v outputs this:
>>>
co_windler@Juchhe:/usr/src$ vlc -v
VLC media player 3.0.16 Vetinari (revision 3.0.13-8-g41878ff4f2)
[000055f3295cc670] main libvlc: VLC wird mit dem Standard-Interface ausgeführt. Benutzen Sie 'cvlc', um VLC ohne Interface zu verwenden.
Invalid Context= "Apps" line for icon theme: "/home/co_windler/.local/share/icons/Windows Vista/apps/16/"
[...]
Icon theme "Papirus" not found.
[000055f32965d350] main playlist: playlist is empty
<<<
Dragging a converted video into it:
>>>
[000055ad63f20350] main playlist: playlist is empty
[00007fee0cc01e40] mp4 stream warning: unknown box type cenc (incompletely loaded)
[00007fee0c0011c0] mp4 demux warning: elst box found
[00007fee0c0011c0] mp4 demux warning: STTS table of 5544 entries
[00007fee0c0011c0] mp4 demux warning: elst box found
[00007fee0c0011c0] mp4 demux warning: STTS table of 14111 entries
[00007fee0c0011c0] mp4 demux warning: CTTS table of 20613 entries
[00007fee0d56f150] faad decoder warning: decoded zero sample
uint DBusMenuExporterDBus::GetLayout(int, int, const QStringList&, DBusMenuLayoutItem&): Condition failed: menu
uint DBusMenuExporterDBus::GetLayout(int, int, const QStringList&, DBusMenuLayoutItem&): Condition failed: menu
uint DBusMenuExporterDBus::GetLayout(int, int, const QStringList&, DBusMenuLayoutItem&): Condition failed: menu
[00007fee0d57c6b0] main decoder error: buffer deadlock prevented
<<<
after about 8s black delay:
>>>
[000055ad63f6a0d0] pulse audio output warning: starting late (-14188 us)
[00007fedfc006500] gl gl: Initialized libplacebo v2.72.0 (API v72)
libva info: VA-API version 1.12.0
libva info: Trying to open /usr/lib/x86_64-linux-gnu/dri/radeonsi_drv_video.so
libva info: Found init function __vaDriverInit_1_7
libva info: va_openDriver() returns 0
[00007feda401b520] gl gl: Initialized libplacebo v2.72.0 (API v72)
[00007fee0d57c6b0] avcodec decoder: Using G3DVL VDPAU Driver Shared Library version 1.0 for hardware decoding
<<<
The message window outputs these warnings when video starts:
>>>
qt warning: orphaned video window
mp4 warning: unknown box type cenc (incompletely loaded)
mp4 warning: elst box found
mp4 warning: STTS table of 5544 entries
mp4 warning: elst box found
mp4 warning: STTS table of 14111 entries
mp4 warning: CTTS table of 20613 entries
faad warning: decoded zero sample
main error: buffer deadlock prevented
<<<
picture starts here:
>>>
pulse warning: starting late (-13563 us)
gl info: Initialized libplacebo v2.72.0 (API v72)
gl info: Initialized libplacebo v2.72.0 (API v72)
avcodec info: Using G3DVL VDPAU Driver Shared Library version 1.0 for hardware decoding
<<<
The line "[00007fee0d57c6b0] main decoder error: buffer deadlock prevented" stands for a timeout, which may have to do with failing to recognize the correct codec type during the initial 8 seconds.
The video player "mpv" uses the hardware decoder vaapi, which plays converted videos correctly. But VLC outputs green pixel garbage when trying to convert with the same(?) input codec "VA-API".
I spent a whole night trying out different VLC settings without success, so finally I could do nothing but removing the PPA and then downgrading VLC to the default version 3.0.9 through aptitude.
sudo add-apt-repository -r ppa:savoury1/vlc3