[MPlayer-dev-eng] mp4, vfr and timestamps

Rich Felker dalias at aerifal.cx
Mon Jun 19 01:38:30 CEST 2006


On Mon, Jun 19, 2006 at 01:15:01AM +0200, Tomas Carnecky wrote:
> Michael Niedermayer wrote:
> > for the case of mpeg1, mpeg2 and mpeg4 video there is a very
> > simle rule how PTS/CTS must be set (no frame reordering CTS=DTS, frame reordering
> > CTS=DTS for B frames, CTS of non B frames = DTS of next non B frame)
> > for H.264 the rules are more complex..
> 
> seems so.. because this doesn't work if I use the '--b-pyramid' option
> in x264. Then even the B frames can be out of order...
> I have pretty much implemented this logic (as described above) in x264,
> but I don't think they'll accept my patch if it crashes with the
> '--b-pyramid' option.
> 
> The file in the attachment is my attempt. Does anyone see right away how
> I could fix the code when using '--b-pyramid'?  How to properly compute
> the timestamps in such a situation?

the nut spec has algorithms for converting between dts and pts which
are probably the same or similar to what you want. perhaps read it or
the relevant mailing list threads about nut and dts.

rich




More information about the MPlayer-dev-eng mailing list