[MPlayer-dev-eng] Nut startcodes

Ville Saari 114263 at foo.bar.org
Tue Apr 27 06:29:23 CEST 2004


On Mon, Apr 26, 2004 at 06:07:01PM -0400, D Richard Felker III wrote:

> It doesn't matter. Startcodes are not keyframe markers. Only a very
> broken demuxer would only seek to startcodes. Rather, startcodes are
> there for two purposes:
...
> > I suggest that the "must" in your description is replaced with "should".
> 
> Which one? The "predictive" coding I talk about is on the container

Sorry - sloppy reading. I got an impression that you required the
first frame after the startcode to be completeley independent, but
you only required full timestamp.

> > If not all the streams start with an I-frame after a seek, then the
> > demuxer or the decoder must ignore any non-I-frames and display blackness
...
> No, it just seeks to a keyframe.

You cant "just" seek to keyframe if you are playing more than one stream
from the file and the keyframes of the different streams are not aligned.

> Agree. If you want to seek to time X (and assuming you don't have an
> index) you binary search for the first startcode before time X, then
> walk the packets to the timestamp you want.

Yes, but if the first I-frame after startcode is later than X, you need
to start two startcodes before X.

It might be useful for the specification to require, that every stream
must have at least one keyframe between any two startcodes. This would
ensure that you never need to start more than two startcodes before X.

-- 
 Ville




More information about the MPlayer-dev-eng mailing list