Quantcast
Channel: MediaSPIP
Viewing all articles
Browse latest Browse all 118024

Get the list of I-Frames in a video using Python

$
0
0

I'm trying to get the list of indexes for all I-frames in a video in Python (and later save a portion of them as JPEG). Right now, I can traverse all frames using FFProbe in terminal, and see which one is I-frame:

ffprobe -select_streams v -show_frames -show_entries frame=pict_type -of csv 18s.mp4

which gives me something like this:

frame,I
frame,B
frame,P
frame,B
frame,P
frame,B

But how can I do that in Python (I'm in Windows) and get a list of all their indexes?


Viewing all articles
Browse latest Browse all 118024

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>