[FFmpeg-devel] [PATCH] av_get_delay

Mike Scheutzow mike.scheutzow at alcatel-lucent.com
Thu Jun 30 16:17:52 CEST 2011

Michael Niedermayer wrote:
> On Thu, Jun 30, 2011 at 09:22:04AM -0400, Mike Scheutzow wrote:
>> Michael Niedermayer wrote:
>>>>> This doesnt seem to work very well for example when you have:
>>>>> a slideshow with commentary, the delay from the video stream could
>>>>> make quite big jumps an be constant between them. It might be
>>>>> better to add the remaining duration of the currently displayed frame
>>>>> in there or something
>> This is a very different use case than the original proposal was meant  
>> to solve, which I understood as pre-skewing uncompressed output samples  
>> to improve lip sync.
> you seem to missunderstand this somehow.

Well, it seems that you do not understand the problem that Nicolas is 
trying to improve. Do you agree with these statements:

1) We are talking about presentation (display to the user of audio and 

2) There is a system delay between the call to snd_write_pcm() and when 
the user actually hears that sound. Assume that this delay is constant, 
+- half write size.

3) This is a (possibly different) system delay between the call to pass 
video pixels to the video subsystem, and when the user can see that 
frame of data. Assume this delay is constant, +- half frame.

Nicolas wants to enable decoders to compensate for the two different 
system delays. The magnitude of these values is typically in the range 
10 - 100 milliseconds.

I have no idea how he intends to obtain this information (it's difficult 
to get), but this is the topic I think we are talking about.

> when you have 2 streams, 2 muxers, one only video and one only audio
> and you want to sync them but the video muxer tells you as delay
> only 0seconds or 30seconds you wont get sync better than 30seconds and
> thats really not good for a slideshow of lets say pictures in a museum
> that are being commented.

You seem to be talking about resolution here. I don't understand how 
that is relevent to this conversation.

Mike Scheutzow

More information about the ffmpeg-devel mailing list