[Ffmpeg-devel] Wrong duration in a nut container

Reimar Döffinger Reimar.Doeffinger
Fri Aug 12 11:02:23 CEST 2005

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...
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

Reimar D?ffinger

More information about the ffmpeg-devel mailing list