[MPlayer-dev-eng] Re: h264+aac in lavf mp4

Rich Felker dalias at aerifal.cx
Sun Mar 19 21:05:56 CET 2006


On Sun, Mar 19, 2006 at 08:07:55PM +0100, Erik Slagter wrote:
> On Sun, 2006-03-19 at 14:05 -0500, Rich Felker wrote:
> > On Sun, Mar 19, 2006 at 07:08:10PM +0100, Erik Slagter wrote:
> > > frames. I guess somewhere in the frame that mencoder passes is a value
> > > for it's pts and/or dts values, in that case I guess it wouldn't be too
> > > hard to fix it and maybe even I can do it ;-) I guess it would be nice
> > > to have this fixed.
> > 
> > You guess wrong. It absolutely does not exist anywhere and the only
> > sane fix is to rewrite the core of MPlayer.
> 
> Slowly it seems the fog fades, it seems. I guess, as mencoder is
> developed around avi, there has never been any need for a "real" pts,
> the B frames are simply packed with their I or P frames.

No, they are not. AVI simply has DTS only, not PTS, so PTS was not
needed. Also there was no encoder that generated B frames at the time
mencoder was written.

> Then my only question that remains for the moment is, how does the -of
> mpeg do it. Does it calculate the pts from the frame type or does it
> simply do it incorrectly, like -of lavf? If it's the first one, a
> similar trick may help me out. If it's the latter, I'd be ehmm, a bit
> discouraged.

Of course it generates PTS from the bitstream. Otherwise the files
generated would be hopelessly invalid and I would have cvs rm'd the
file a long time ago to prevent people from using it (or crippled it
like I did to muxer_lavf).

Of course muxer_lavf could use the same approach, but its much more
difficult since it must support arbitrary (or at least a wide range
of) codecs instead of just a single codec (mpeg1/2).

Rich





More information about the MPlayer-dev-eng mailing list