[Ffmpeg-devel] [BUG] MP4 Duration

Brian Brice bbrice
Wed Dec 13 20:49:41 CET 2006


I've got a possible bug in calculating duration for an MP4 file.  ffmpeg
reports the stream information as:

Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'speededit.mp4':
   Duration: 00:03:12.5, start: 0.000000, bitrate: 614 kb/s
   Stream #0.0(eng): Video: mpeg4, yuv420p, 1280x720, 29.97 fps(r)
   Stream #0.1(eng): Data: mp4s / 0x7334706D
   Stream #0.2(eng): Data: mp4s / 0x7334706D

The duration of stream 0.0 is actually about 13 seconds, and about 3
minutes for streams 0.1 and 0.2.  The last 2 streams are not used
though, thus giving a bad duration for the entire movie.

Within the mvhd, the duration stored there is 13 seconds, but ffmpeg
chooses the duration for the 2, longer, unused streams.

Shouldn't it use the duration that is stored in the mvhd?

Brian Brice

More information about the ffmpeg-devel mailing list