[vlc-devel] Fixing long latency audio outputs like Airplay

Rémi Denis-Courmont remi at remlab.net
Sat Jun 27 10:53:47 CEST 2015


Le 2015-06-27 11:12, David Fuhrmann a écrit :
> Thanks for the input, Remi. I understand that it likely takes more
> effort to properly support it. What do you exactly mean with latency
> requirements? From my understanding, the current latency is already
> reported by time_get. Do you mean reporting an expected latency value
> beforehand, to adapt buffer sizes or whatever beforehand?

TimeGet timings are (currently) not propagated upstream of the audio 
output. You _can_ report 2 seconds latency, but instead of increasing 
caching, it will trash late audio frames.

> Where is this 40 ms value hardcoded / incorporated?

AOUT_MIN_PREPARE_TIME and probably a whole lot of other magic values.

> Additionally, I’m asking what the difference is between the current
> audio sync option and the aout latency. Maybe the former can be used
> to mitigate the problem?

I don't know.

> Before VLC 2.2, the user needed to set the
> -2000ms shift by hand, and this seems to work fine even for higher
> shifts.

I don't know what you mean.

> Still, increasing input cache helps already, according to various
> reports. Thus I still wonder if it makes sense, to help users by
> setting a sensible value by default, or by informing the users about
> increasing the input cache, over whatever ways.

It helps statistically, especially for local playback. But it does not 
solve the problem, and it has nasty side effects in other scenarii. For 
live capture we definitely cannot accept 2 seconds of latency for 
instance.

-- 
Rémi Denis-Courmont
http://www.remlab.net/



More information about the vlc-devel mailing list