[FFmpeg-user] Get exact duration of an mpeg1 file

Carl Zwanzig cpz at tuunq.com
Fri Dec 14 18:31:05 EET 2018

On 12/14/2018 8:19 AM, Robert Kr├╝ger wrote:
> Just a comparison: This approach gives me the duration information for a
> 180 minute file in 1.8 seconds while mediainfo does it in 0.25 seconds
> (being exact while ffmpeg is a few frames off, but that's a different
> topic), so there must be a faster way to implement it. Tested with a number
> of different files with identical results in principle.

I'd have to look at the code, and I'm not going to now :), but maybe 
mediainfo is looking at time stamps and calculating. As another tool, have 
you tried mplayer to see what it comes up with?


More information about the ffmpeg-user mailing list