[MPlayer-dev-eng] [PATCH] mencoder, B-frames, and video/audio delay
Michael Niedermayer
michaelni at gmx.at
Fri Jan 27 16:26:03 CET 2006
Hi
On Fri, Jan 27, 2006 at 12:52:31AM -0500, Rich Felker wrote:
> On Thu, Jan 26, 2006 at 06:26:43PM -0800, Corey Hickey wrote:
> > All right, here's patch #5. Changes from the previous:
> >
> > 1. The encoder config() functions each initialize the delay variable:
> > 0 if no B-frames
> > 1 if any B-frames
> > 2 if b_pyramid (which requires >1 B-frames, as well)
> > This takes care of the decoding delay, and, since it's set right at the
> > beginning, mencoder will start compensating immediately and skip 1 or 2
> > frames as soon as it can.
> > The encode_frame() functions still increment the delay variable each
> > time the encoder doesn't output a frame, so that takes care of encoding
> > delay nice and smoothly.
> >
> > 2. I changed "encoder_delay" to "codec_delay" to represent that it's
> > compensating for delays in both encoding and decoding.
>
> IMO it's incorrect to compensate for it at this level. It's definitely
> incorrect for muxers that can handle dts correctly. Like Michael has
> said I'm not sure how dts is handled for avi by other player
> implementations but it would be worth experimenting to see before we
> make significant changes like this..
>
> Anyway since having mencoder process the decode-delay like this is a
> BUG WORKAROUND for avi's limitations
disagree
> (actually for the stupid idea of
> storing B frames in avi files)
why is it stupid to store b frames in avi? is it stupid to store them in
mpeg-ps too? mpeg-ps does not have pts per frame either
> and only applies to avi container, I
> don't think it should be enabled all the time. Either just for avi, or
> not at all.
> It's certainly incorrect to skip the first 1-2 frames when
> muxing proper containers.
yes, but why does mencoder skip them? it shouldnt, not for avi or any other
format, theres the bug, if a initial timestamp is negative mencoder skips
but it should not, it should add the value to all timestamps of all streams
instead
[...]
--
Michael
More information about the MPlayer-dev-eng
mailing list