[MPlayer-dev-eng] Re: [PATCH] dvr-ms fixes for pts, key frame detection and seeking
Rich Felker
dalias at aerifal.cx
Thu Feb 8 05:14:41 CET 2007
On Wed, Feb 07, 2007 at 04:53:46PM -0600, John Donaghy wrote:
> >you could call repeatedly ds_fill_buffer() until you find the second
> >I-frame
> >(in this case save the second pts in priv->something),
> >then discard all packets (ds_free_packs()) and seek back to the initial
> >position,
> >but is it really necessary if you use -correct-pts?
>
>
> Unfortunately -correct-pts wont work for dvr-ms files that only contain
> timestamps on I-frames, so I'd have to do something like what you've
> suggested. If I did do that it would also avoid the need to use -correct-pts
> on the dvr-ms files that do contain timestamps on all video frames - because
> I'd use the average frametime to calculate the timestamp for all frames in
> between I-frames.
This sounds like a totally wrong approach. Aren't we talking about
mpeg video here? In which case, the video codec has a nominal
framerate stored in the video headers, which should be followed in the
absence of container-level timestamps. Yes it's ugly for the demuxer
to have to dig into codec-level data, but that's what you have to do
when writing a demuxer for an incestuous container. It's just like for
ogg/vorbis...
Rich
More information about the MPlayer-dev-eng
mailing list