[FFmpeg-user] Displayed duration of MPEG wrong, up to several frames

Peter B. pb at das-werkstatt.com
Thu Feb 9 10:11:21 CET 2012


During extensive MPEG encoding tests, I've noticed that sometimes,  
FFmpeg does not display the duration of MPEG files correctly.

I've tried ffprobe and ffmpeg:

ffmpeg version N-37610-g0349d61 Copyright (c) 2000-2012 the FFmpeg developers
   built on Feb  9 2012 09:47:14 with gcc 4.4.5


Here are 2 example files:

1)  
http://download.das-werkstatt.com/pb/mthk/examples/mpeg-duration/vx-04810_00_k01.mpg
Duration: 338 frames = 13,52 sec
FFmpeg says: 13,52 sec (4 frames difference)

2)  
http://download.das-werkstatt.com/pb/mthk/examples/mpeg-duration/v-10942_00_k01.mpg
Duration: 400 frames = 16,00 sec
FFmpeg says: 15,96 sec (1 frame difference)


I've verified their correct length with Avidemux [1] and GSpot [2].

Unfortunately, a duration-mismatch of up-to several frames makes it  
currently impossible to use FFmpeg as transcoding verification tool :(

If anyone could provide me information about why this is happening, or  
how to fix it, I'd be very very grateful.

Thanks in advance,
Pb


== References:
[1] http://avidemux.org/
[2] http://www.headbands.com/gspot/




More information about the ffmpeg-user mailing list