[MPlayer-dev-eng] [PATCH] delay-compensated B-frames and dwStart

Corey Hickey bugfood-ml at fatooh.org
Fri Feb 17 01:10:46 CET 2006


Guillaume POIRIER wrote:
>>>This patch is the combination of my earlier efforts into (a)fixing video
>>>delay when encoding with B-frames and (b)making mplayer/mencoder
>>>recognize dwStart correctly.
>>
>>[..]
>>
>>All I can say is that if works like a charm on the different files I've
>>encoded with your patch.
> 
> 
> Mores x264 encodes with your patch, and still anly success stories.
> Not only AVI files produced by MEncoder are in sync, but also remuxing
> them in matroska, stripping out the AC3 audio that I had in the AVI
> file to replace it with vorbis don't _require_ to apply an audio delay
> correction (there's still a very small delay which I can notice, but
> can go unnoticed if you don't pay attention to it).

With that small delay, is the audio delayed or the video? If it's a
small video delay, it might be the decoding delay:

1 frame delay if any B-frames are used
-or-
2 frame delay if b_pyramid

Mencoder (patched) compensates by setting a dwStart on the audio stream.
I don't know how/if mkvmerge handles that, especially with a different
audio stream, but you ought to be able to compensate by manually
delaying the audio stream with whatever method mkvmerge provides.

> This patch is good stuff!

Thank you. :)

> I'll test your other patch later this weekend.

Nobody objected after I threatened to re-apply that patch, and the 3-day
deadline I set has now passed, so it ought to be in CVS shortly.

-Corey




More information about the MPlayer-dev-eng mailing list