Video stuttering with ALSA output
Hi!
I've already reported this bug to Debian, but got no answer. http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=734100
Starting somewhere around VLC 2.x, I experience "video stuttering" problems on many files, mostly >= 720P, MKV/H.264+AC3 (almost all such files), but not only them - for example I also experience it on some MPEG2 720x576 files (mpeg container, mpeg2 video and audio codecs). HW acceleration is disabled, the problem always reproduces at least on 2 different Debian machines (laptop and PC, both 32-bit and both with snd-hda-intel kernel module), and on both debian-multimedia and normal VLC/libav* packages. The same files play without problem in mplayer/mplayer2/mpv.
vlc -vvv output shows many "ES_OUT_SET_(GROUP_)PCR is called too late" errors; on each error the video playback temporarily stops ("stutters").
...
[0x87a0a30] main audio output warning: playback way too early (-563272): playing silence
[0x87a0a30] main audio output debug: inserting 27037 zeroes
[0xf4c11150] main input error: ES_OUT_SET_(GROUP_)PCR is called too late (pts_delay increased to 300 ms)
[0xf4c11150] main input error: ES_OUT_RESET_PCR called
[0xf4c11150] main input debug: Buffering 0%
...
[0xf0c45bc0] main decoder debug: End of audio preroll
...
[0xf4c11150] main input debug: Stream buffering done (334 ms in 3 ms)
[0xf4c11150] main input debug: Decoder buffering done in 0 ms
[0x87a0a30] main audio output debug: inserting 9553 zeroes
[0xebc00c58] main vout display debug: auto hiding mouse cursor
[0xf0c36aa8] main decoder debug: End of video preroll
[0xf4c11150] main input error: ES_OUT_SET_(GROUP_)PCR is called too late (pts_delay increased to 320 ms)
[0xf4c11150] main input error: ES_OUT_RESET_PCR called
...
The key point is, first I've thought it's some video decoder problem, but I was wrong!
I've tried different setups and discovered that the problem is in direct ALSA sound output - i.e. it works all good with PulseAudio! (direct PA; didn't check alsa piped to PA). Also it works with sound disabled or if the "discard all samples" audio device is selected (so it's not an audio decoder problem).
If the video track is disabled the bug also doesn't reproduce (so maybe it's also related to demuxing in some way?)
I don't want to have PulseAudio installed, just because for me it's just a useless wrapper for ALSA (everything always worked fine without it) and because I don't like Lennart's creations. :-)
In any case I think it's a bug if ALSA output doesn't work in VLC...
Is it a known problem? Do you have any ideas of fixing it? I've found many "stuttering" problems in VLC bug database, but it seems nobody tried to check for audio output problems...
I think severity=critical because I can't use VLC anymore - it stutters on 95% of my video files :(