[MEncoder-users] Howto fix audio delay

Oded Shimon ods15 at ods15.dyndns.org
Mon Jul 4 18:20:03 CEST 2005


On Mon, Jul 04, 2005 at 11:28:34AM -0400, The Wanderer wrote:
> Oded Shimon wrote:
> 
> >On Mon, Jul 04, 2005 at 10:07:58AM -0400, The Wanderer wrote:
> 
> >>I don't personally know of any reason why it would not be
> >>theoretically possible to simply pad the beginning of either the
> >>audio stream (in the case of "audio played too early") or the video
> >>stream (in the case of "audio played too late") with 'blank'
> >>frames during the encoding stage, such that in the former case no
> >>sound would be played and in the latter case no video would be
> >>output, to correct for the mis-synchronization, but since no one
> >>has attempted to implement such a seemingly obvious thing I suppose
> >>there might be a technical obstacle I'm not aware of.
> >
> >Yes, the obstacle is -oac copy and -ovc copy.
> >
> >Since all frames (both video and audio frames) are compressed, you
> >can't just pad them with "nothing", you have to pad them with a
> >legally compressed "silence" or "blackness". this is impossible if
> >you can't fake the original encoder...
> 
> That's why I said "during the encoding stage"; -o?c copy does not IMO
> qualify as "encoding", it's just remuxing. Nobody (at least among the
> developers) complains about the fact that most other options, filters
> and so forth, get ignored when using -o?c copy; I see no reason to
> object to having a hypothetical -hard-delay option be ignored in the
> same circumstances.

Ah.

Usually you want to fix the video without re-encoding... BTW, it IS 
possible with -o?c copyby DELETING areas. This is ofcourse suboptimal, but 
better than nothing.

Anyway, even with a full re-encode, it's not very trivial.. how do you 
"produce" silence or black frames? It might be possible, but not easy, not 
with the way MEncoder is built... It get's tougher with EDL, because evn 
if you made an initial delay, EDL re-syncs the audio with the video to the 
exact same time...

But, you have given me a challenge.. I'm gonna start working on making a 
true delay fixer. We'll see where this takes me...

- ods15




More information about the MEncoder-users mailing list