[Ffmpeg-devel] Wrong duration in a nut container

Rich Felker dalias
Fri Aug 12 18:18:47 CEST 2005


On Fri, Aug 12, 2005 at 11:02:23AM +0200, Reimar D?ffinger wrote:
> Hi,
> On Fri, Aug 12, 2005 at 10:31:00AM +0200, Michael Niedermayer wrote:
> > and if the file is on something non seekable?
> > its a question which is more important, the validity of the duration
> > field in randomly cut raw pieces or the availabilty of the duration 
> > in non seekable streams
> 
> Well, my opinion is that knowing the duration in non-seekable streams is
> not so important - especially since in quite a few applications
> (e.g. streaming) the duration will not be known anyway.
> Also adding the duration at a special place also means one more piece of
> redundant information - and from my experience with multimedia, this
> means in at least 1% of cases this will just contain some random crap
> :-(.
> But the approach of seeking to the end and reading the last timestamp
> reminds me a lot of MPEG where this just doesn't work at all...

It only fails on mpeg because mpeg is allowed to have broken
timestamps. NUT strictly forbids timestamp discontinuity and
nonmonotonicity.

> Shouldn't this kind of info be part of the index ideally? Something like
> having a list of keyframes + the last frame in it? Like this one
> "function" would be enough to fix both the index and the duration
> information.

IMO it's not really needed to store last frame timestamp in index.
But I'm not against it..

Rich





More information about the ffmpeg-devel mailing list