[MPlayer-dev-eng] [PATCH] mencoder, B-frames, and video/audio delay

Michael Niedermayer michaelni at gmx.at
Tue Jan 24 00:54:48 CET 2006


Hi

On Mon, Jan 23, 2006 at 03:01:57PM -0800, Loren Merritt wrote:
> On Mon, 23 Jan 2006, Corey Hickey wrote:
> 
> >Corey Hickey wrote:
> >>Meanwhile, I'm going to just prepare a patch that makes mencoder's XviD
> >>encoding set the encoder delay based on the number of B-frames.
> >>Realistically, that should do exactly the same thing. Using a variable
> >>set by XviD would just be nicer/cleaner.
> >
> >Ok, here's the current patch. Unfortunately, it seems for x264 I can't
> >access mod->x264->frames.i_delay because x264.h doesn't expose any
> >details about the x264_t structure. So, I had to stick with
> >mod->param.i_bframe instead.
> >
> >Does the attached patch look ok? Should I apply it?
> 
> I can understand arguments for either bframes or bframes+1, but it is not 
> correct to mix them. 

fully agree


> The decision is a property of AVI, not of the codec. 
> H.264 with simple B-frames is exactly the same as MPEG-4 in terms of 
> encoding and decoding delay.
> 
> And whichever we choose, make sure that MPlayer follows the same rule.

yes, but mplayer isnt the only player, the question is how do other players
decide upon when to display a frame? i didnt check any but somehow i think
they assume dts=pts for AVI and will not add any +1 delay for low_delay=0 
streams 
anyway how should a player even know if a stream is low_delay=0 or 1?

[...]
-- 
Michael




More information about the MPlayer-dev-eng mailing list