[vlc-devel] Another stutter issue

Juha Jeronen juha.jeronen at jyu.fi
Sat Mar 5 21:02:56 CET 2011


On 03/05/2011 09:35 PM, Laurent Aimar wrote:
> On Sat, Mar 05, 2011 at 09:21:09PM +0200, Juha Jeronen wrote:
>> Hi,
>>
>> On 03/05/2011 07:19 PM, Rémi Denis-Courmont wrote:
>>> Le samedi 5 mars 2011 19:11:59 Juha Jeronen, vous avez écrit :
>>>> a) Maybe the processing chain is not aligned to vsync?
>  In the current state, VLC plays the video with its clock locked on the
> system clock or the source clock.
>  So, when the video output uses vsync, you don't have tearing BUT you
> can have suttering as some times a frame will be displayed a bit
> longer or shorter (or even skipped when the fps ~ lcd refresh rate).

I see. Thanks! Exactly the kind of thing I was going for. This explains
the problem.

I think that since display and video framerates tend to be of the same
order of magnitude, this is rather important. Even with no framerate
doubling, each frame (at 30fps, with a 60Hz display) has only two
choices as to which vsync to go in. If one vsync is missed, the frame
display time for that frame is halved, which shows immediately as
stutter in a steady camera pan or zoom...

The only remotely realistic case I can think of, where the display
framerate is even half an order of magnitude (as much as that concept
makes sense) larger than the video framerate, is watching 24p on a 120Hz
display (five refreshes per frame). But many displays these days are
LCD, which are only 60Hz...

(In this spirit, I should definitely implement a 2x output mode in my
traditional IVTC filter, skipping the framerate conversion. The current
version assumes an infinite display refresh rate, and in practice, it
can play back smoothly only if the display is e.g. 72Hz (=3*24), and the
telecine cadence has no jumps. This is unlikely.)


>  Ideally when the source can be read at the speed we want, we should synch
> either to the sound card (no audio resampling) or the video display (no
> sutter). But sadlly not to both...

I think audio resampling is the lesser of the two evils, since video
stutter is more noticeable (and for most framerate doublers to work
properly, a steady framerate is even a requirement).

How difficult would it be to sync to the video display? What parts of
VLC would be affected?

And is anyone except me interested in this issue? :)

 -J




More information about the vlc-devel mailing list