[FFmpeg-user] Forcing ffmpeg to detect duration reliably

Carl Eugen Hoyos cehoyos at ag.or.at
Fri Mar 1 10:51:08 CET 2013


Robert Krüger <krueger <at> lesspain.de> writes:

> I assumed that if I make probesize large enough 
> (larger than the entire file in my case, which is a 
> bit over 4 MB) that ffmpeg would be able to detect 
> the accurate duration

Just in case this is not clear:
-analyzeduration has nothing to do with analyzing the 
duration of the input file, it means the duration (ms) 
used to analyze the sample.

You can use "ffmpeg -i input -f null -" to determine 
the actual duration of input.
(In your sample case, the input video is vbr, meaning 
there is no way of knowing the duration without 
going through the whole file as in decoding. You can 
speed up this operation but you have to invoke the 
decoder.)

Carl Eugen



More information about the ffmpeg-user mailing list