user1729031
user1729031

Reputation: 130

Get FFMPEG KeyFrames Time or time range

I am using the following command to get keyframe of desire video

ffmpeg -i input.mp4 -vf select='eq(pict_type\,I)',setpts='N/(24*TB)' %09d.jpg

I want to extract key-frame time/time duration/start time-end time to map keyframe with time.

Is there any way to get time information of key-frame in the same command?

Upvotes: 1

Views: 3548

Answers (1)

Gobe
Gobe

Reputation: 2717

Check if the following command does what you want, for my application it works:

ffmpeg -i input.mp4 -vf select=key -an -vsync 0 \ 
       keyframes%03d.jpeg -loglevel debug 2>&1 |
grep select:1 > keyframes.txt

Replace grep with findstr if you're under Windows.

Upvotes: 1

Related Questions