[MPlayer-dev-eng] [PATCH] mencoder, B-frames, and video/audio delay
Corey Hickey
bugfood-ml at fatooh.org
Sat Jan 21 01:57:54 CET 2006
Rich Felker wrote:
>>The attached patch disables the portion of mencoder.c that decides
>>whether to adjust the A-V sync based upon the relative positions of the
>>muxer stream timers. I don't know if that's the correct fix. If mencoder
>
> This is definitely not correct, and will make a/v sync (and choice of
> which frames to keep and how many) totally wrong for any encoding
> where there's not an exact one-to-one correspondence of input frames
> to output frames. If you want this behavior, just use -noskip.
Dang. -noskip doesn't do the same thing, though: mencoder duplicates too
many frames and ends up out of sync, just like before.
> Instead you need to make the encoder advertise the number of frames of
> encoding-delay it has, and fake the muxer timer to compensate for it.
That's what I was thinking of earlier, but I thought I had found a
better solution.
> BTW I think there's a corresponding problem at the _decoder_ end too,
> which you should check out. (Use h264 with deep pyramid to test it..)
You mean b_pyramid with lots of b_frames? I'm not seeing any problem
here... I tried adding b_pyramid to each of my test clips and they
looked fine (with my wrongly-patched mencoder). The mplayer man page
says b_pyramid "increases decoding delay to 2 frames". If that's the
problem, I don't know if I would notice a 2/24 second delay. Can you
elaborate?
>>is adjusted quickly), with 16 B-frames and perfect a-v sync. If somebody
>>more knowledgeable than I gives me the go-ahead, then I will commit this
>>patch.
>
>
> Don't take this as a flame, buf if you commit this it might break the
> 1000000000000l cola record. :)
No, I'm not. I freely admit that I only 10% know what I'm talking about,
but that number increases whenever I try to do something. Also, not to
say this is necessarily the case now, but I've found that doing
something wrong is a very good way to get someone to tell me how to do
it right, where they might not otherwise have done so if I had just
asked. :)
-Corey
More information about the MPlayer-dev-eng
mailing list