[Ffmpeg-devel] Wrong duration in a nut container

Hendrik Schmal Hendrik.Schmal
Thu Aug 11 14:47:03 CEST 2005


Hello,

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 ?

Thanks in advance.
Hendrik

-----------------------------------------------------------------------------
tested avi:

#>ffmpeg -an -s 384x288 -vcodec mpeg4 -hq -r 50 -vframes 250 -b 4000 test.avi
ffmpeg version CVS, build 3211265, Copyright (c) 2000-2004 Fabrice Bellard
  configuration:
  built on Aug 10 2005 11:10:24, gcc: 3.3.3
Input #0, video4linux, from '':
  Duration: N/A, bitrate: N/A
  Stream #0.0: Video: rawvideo, yuv420p, 384x288, 50.00 fps
Output #0, avi, to 'test.avi':
  Stream #0.0: Video: mpeg4 (hq), yuv420p, 384x288, 50.00 fps, q=2-31, 4000 
kb/s
Stream mapping:
  Stream #0.0 -> #0.0
[mpeg4 @ 0x8370d14]removing common factors from framerate
Press [q] to stop encoding
frame=  250 q=0.0 Lsize=      50kB time=5.0 bitrate=  81.7kbits/s
video:25kB audio:0kB global headers:0kB muxing overhead 96.945858%

#>ffmpeg -i test.avi
ffmpeg version CVS, build 3211265, Copyright (c) 2000-2004 Fabrice Bellard
  configuration:
  built on Aug 10 2005 11:10:24, gcc: 3.3.3
Input #0, avi, from 'test.avi':
  Duration: 00:00:05.0, start: 0.000000, bitrate: 81 kb/s
  Stream #0.0: Video: mpeg4, yuv420p, 384x288, 50.00 fps
Must supply at least one output file


tested nut:

#>ffmpeg -an -s 384x288 -vcodec mpeg4 -hq -r 50 -vframes 250 -b 4000 test.nut
ffmpeg version CVS, build 3211265, Copyright (c) 2000-2004 Fabrice Bellard
  configuration:
  built on Aug 10 2005 11:10:24, gcc: 3.3.3
Input #0, video4linux, from '':
  Duration: N/A, bitrate: N/A
  Stream #0.0: Video: rawvideo, yuv420p, 384x288, 50.00 fps
Output #0, nut, to 'test.nut':
  Stream #0.0: Video: mpeg4 (hq), yuv420p, 384x288, 50.00 fps, q=2-31, 4000 
kb/s
Stream mapping:
  Stream #0.0 -> #0.0
[mpeg4 @ 0x8370d14]removing common factors from framerate
Press [q] to stop encoding
frame=  250 q=0.0 Lsize=      40kB time=5.0 bitrate=  64.7kbits/s
video:25kB audio:0kB global headers:0kB muxing overhead 59.514984%

#>ffmpeg -i test.nut
ffmpeg version CVS, build 3211265, Copyright (c) 2000-2004 Fabrice Bellard
  configuration:
  built on Aug 10 2005 11:10:24, gcc: 3.3.3
Input #0, nut, from 'test.nut':
  Duration: 00:00:00.0, start: 0.000000, bitrate: 4045 kb/s
  Stream #0.0: Video: mpeg4, yuv420p, 384x288, 50.00 fps
Must supply at least one output file







More information about the ffmpeg-devel mailing list