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

Robert Krüger krueger at lesspain.software
Thu Dec 13 19:01:43 EET 2018


Hi Carl,

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

> On 12/13/2018 8:10 AM, Robert Krüger wrote:
> > Are there command line parameters to make it compute the exact size or is
> > this a design or implementation limitation?
>
> IIRC (and I could be wrong), the generic "info" uses metadata whereas
> mediainfo actually counts frames and applies the frame rate to that.
> Without
> a container, there's no appropriate metadata.
>

yes, absolutely, that's what I assumed, I just didn't know the option to
force it to do something else.


>
> It's easy enough to tell, if ffmpeg -i returns almost immediately, it's
> probably not counting frames. You also might get a more accurate answer by
> using -probesize with a parameter larger than the actual file.
>
>
that did the trick, thanks! There still a minor inaccuracy of a few frames
but that is probably still https://trac.ffmpeg.org/ticket/3683. My main
concern was estimating vs. actually parsing.

Thanks again,
Robert


More information about the ffmpeg-user mailing list