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

Robert Krüger krueger at lesspain.software
Tue Dec 18 22:50:26 EET 2018

On Fri, Dec 14, 2018 at 5:31 PM Carl Zwanzig <cpz at tuunq.com> wrote:

> 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?
> know because I'm actually more interested in getting this to work using
libavformat and I am just testing the possibilities using the command line.

More information about the ffmpeg-user mailing list