[FFmpeg-user] Fastest way to get keyframe indices from MOV files?

Gyan Doshi gyandoshi at gmail.com
Mon Apr 23 17:28:37 EEST 2018



On 4/23/2018 7:31 PM, Stuart Bruce wrote:
> 
> In principle, should there be a faster way to just get the keyframe / I
> frame numbers (or times), which doesn't require FFprobe to output over 1500
> lines of data per minute of video for parsing afterwards?

Using ffmpeg, you can run

     ffmpeg -copyts -discard nokey -i Timecode.mov -vf showinfo -an -f 
null -

The discard option sends only demuxer-flagged keyframes to the showinfo 
filter. Takes a lot fewer seconds. You can get PTS values; the frame 
index simply counts frames received by the filter, so not useful for 
your purposes.

Fastest way probably would be to use some other app which can dump data 
from inside the MOOV box/atom, specifically the track stss box.


Regards,
Gyan


More information about the ffmpeg-user mailing list