[FFmpeg-user] Fastest way to get keyframe indices from MOV files?
Stuart Bruce
stuartrbruce at gmail.com
Mon Apr 23 17:01:53 EEST 2018
Indirectly related to my previous enquiry...
Programatically I want to use FFprobe get a list of the frame numbers
(numbers preferred, times if necessary) of keyframes (I frames without the
P frames) in a MOV file.
At present I'm using the arguments:
-select_streams v -show_frames "M:\ProcessTests\Timecode.mov" -of csv
-show_entries frame=pkt_pts_time,pict_type
but for this 30-minute video (available at
http://www.twentypenguins.co.uk/misc/ffpmeg_tests/Timecode.mov ), that
process is taking around 20-30 seconds to provide the lengthy result of
approximately 45,000 CSV lines of frame info, which I then parse in my
Windows app to find the line indices of every frame with an 'I' at the end.
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?
Thanks
Stuart
--
Stuart Bruce - stuart at stuartbruce.co.uk - www.stuartbruce.co.uk
More information about the ffmpeg-user
mailing list