[FFmpeg-user] How to get he total number of frames

Peter White peter.white at posteo.net
Tue Mar 9 12:53:55 EET 2021


On Tue, Mar 09, 2021 at 10:41:41AM +0100, Nicolas George wrote:
> Peter White (12021-03-09):
> > If anybody on this list knows a better one, step up, please.
> 
> ffprobe, of course.

Unless it happens to be one of those special cases that don't have that
info in their metadata, like matroska:
https://stackoverflow.com/a/28376817

Other than being a little ugly, my way seems to yield the correct result
with any video. I like universal solutions, so I stuck with it, and
recommended it.


Peter


More information about the ffmpeg-user mailing list