[FFmpeg-user] Frame counting is too slow

Ulf Zibis Ulf.Zibis at CoSoCo.de
Tue Mar 9 17:39:13 EET 2021


Am 09.03.21 um 16:27 schrieb Peter White:
> Hi all,
>
> as a follow-up to this discussion:
> https://ffmpeg.org/pipermail/ffmpeg-user/2021-March/052358.html
>
> I would like to ask, if frame counting with ffprobe can be made faster.
> The way it done now is obviously by decoding every single frame and
> afterwards incrementing the counter. See how slow this example runs:
>
> time ffprobe -count_frames -select_streams v:0 -show_entries stream=nb_read_frames -of default=nokey=1:noprint_wrappers=1 input.mkv

I additionally like to suggest to add a short cut option for this operations (count frames + count packets). This would also "automatically" entail a item in the documentation, where people can find it without the need to repeat this question in the mailing list again and again.

-Ulf



More information about the ffmpeg-user mailing list