Frame type property for ffmpeg video capture#22163
Frame type property for ffmpeg video capture#22163opencv-pushbot merged 1 commit intoopencv:4.xfrom philipphutterer:vcap-frame-type
Conversation
|
thanks @LukasBommes and his project mv-extractor for the idea |
|
There is already |
|
I mean in order to use |
alalek
left a comment
There was a problem hiding this comment.
Discussed with @vpisarev @asmorkalov . Let put this in as is.
Thank you for the contribution!
I also meet this problem. |
|
Does the property cap = cv2.VideoCapture(...)
ret, frame = cap.read()
if cap.get(cv2.CAP_PROP_FRAME_TYPE) == ord("I"):
# do something with this I-frame |
|
Yes, it work. However the |
Adds functionality to read the frame type for an ffmpeg VideoCapture via property syntax. The new property
CAP_PROP_FRAME_TYPEis readonly. It returns the frame type ascii code of the most recently read frame (i.e. 73 = 'I', 80 = 'P', 66 = 'B' or 63 = '?' if unknown)closes #21859
Patch to opencv_extra has the same branch name.