[Ffmpeg-devel] Wrong duration in a nut container
Fri Aug 12 18:21:30 CEST 2005
On Fri, Aug 12, 2005 at 02:05:11PM +0200, Luca Barbato wrote:
> Rich Felker wrote:
> > On Fri, Aug 12, 2005 at 01:14:35AM +0200, Michael Niedermayer wrote:
> >>On Thu, Aug 11, 2005 at 02:47:03PM +0200, Hendrik Schmal wrote:
> >>>I want to grab a video from tape (via framegrabber (bt8x8), no audio, SuSE
> >>>Linux 8.2). I use the FFMpeg-20050806.tar.bz2 package.
> >>>The following commandline (see below) should give me a video containing 250
> >>>frames (that means 5secs on 50fps).
> >>>With the avi format I get a duration of 5 secs. The nut format shows me a
> >>>wrong duration, but it also contains 250 frames.
> >>>This happens when for example the tape partially contains no data.
> >>>The same behaviour I have using the FFmpeg API (libavformat/libavcodec).
> >>>I can't use avi, because of my videos are larger than 1GB.
> >>>Is this a bug or did I something wrong ?
> >>nuts duration field is in a info packet and thats neither stored nor read
> >>currently, patch welcome
> > IMO using the info field is a very bad idea. For instance people might
> > framecopy a nut file to make a small excerpt, and keep all the info
> > headers. Then the total length will be wrong. Instead the demuxer
> > should seek to the end and read the last timestamps to find total
> > length.. It will already be seeking to end to read index anyway, and
> > if there's an index it can just get total length from the index.
> You may update the info packet on framecopy.
But an editing tool should not need to know a list of info packet
types it has to modify on framecopy. What if new types that need
updating are invented, and old tools don't know about them?
> Anyway would be ok just check for the value on the info packet, then
> check the in the index and then validate by the last timestamp value
> (you already seek to the end for getting the index)
Redundant info in containers is very bad. If it's redundant, no need
to include it twice. And if the two differ, it's a way people can make
More information about the ffmpeg-devel