[MPlayer-dev-eng] nut seeking without an index
Michael Niedermayer
michaelni at gmx.at
Thu Sep 8 19:30:25 CEST 2005
Hi
On Thu, Sep 08, 2005 at 07:01:05PM +0200, Michael Niedermayer wrote:
> Hi
>
> On Thu, Sep 08, 2005 at 12:33:26PM -0400, Rich Felker wrote:
> > On Thu, Sep 08, 2005 at 10:34:40AM +0200, Michael Niedermayer wrote:
> > > > > > maybe richs idea with backward pointers at sync points can be amended a
> > > > > > little to solve the issue:
> > > > > > store a single pointer at every syncpoint which points back to a point so
> > > > > > that every stream has at least 1 keyframe between the point and the current
> > > > > > sync point
> > > > >
> > > > > This could be one hugeass useless backward pointer in the presence of
> > > > > subtitles. I know one anime movie (Tenshi no Tamago) with only about
> > > > > 10 lines of dialogue over 2 hours...
> > > >
> > > > Unfortunately I can't come up with anything reasonable except either
> > > > having a backward pointer for each stream, or treating subtitle and
> > > > info streams separately and excluding them from the backpointer rules.
> > > > However I think the latter choice is bad, since it may be desirable to
> > > > seek according to an info stream, especially if the info stream
> > > > represents song/chapter/etc boundaries.
> > >
> > > i still think the single pointer is enough, a file which stores keyframes
> > > once every 2 hours, can only be seeked to at 2hour granularity and yes
> >
> > But obviously this isn't true at all for subtitle streams.
> > The key condition is that you only need to find a keyframe for stream
> > N if there will be another non-key frame for stream N before the
> > following keyframe for stream N.
>
> no, thats wrong, it depends upon the duration of the keyframe, the
> current definition in nut is that it lasts until the next frame
> theres no concept for "holes" in streams like you seem to somehow
> have invented for subtitle streams, all problems here seem to be
> caused by that
> just add a 0byte keyframe for subtitle streams every second where
> there is nothing displayed or alternatively we could add some frame
> duration or end-of-frame support but these will be less easy
we could also place just 1 0byte keyframe at the point where subtitles
disapear and handle this differently from other keyframes, its also
easy to detect by the zero size in the index on the demuxer side ...
furthermore we could add such a 0byte keyframe at the very end instead
of the last-pts to indicate stream length and the length of the last
frame
[...]
--
Michael
More information about the MPlayer-dev-eng
mailing list