Ask Your Question
0

Wrong frame position when using the OpenCV 4.3.0

asked 2020-08-31 03:02:15 -0600

Hi, I encountered a problem when using OpenCV 4.3.0. When I use video_capture.set(CAP_PROP_POS_FRAMES, frame_index);, if the frame is a B-frame, there will be a problem. It seems that we cannot frame_index as a B-frame. But there is no function to detect whether a frame is a B-frame.

Does anybody know the solution to this problem? Seeking to the B-frame or avoid seeking to B-frame?

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted
0

answered 2020-08-31 03:24:19 -0600

berak gravatar image

opencv's VideoCapture does not know anything about B-frames. (it's a simple utility class to acquire images for computer-vision)

if you need more control, you have to use libraries like ffmpeg or gstreamer directly

edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2020-08-31 03:02:15 -0600

Seen: 263 times

Last updated: Aug 31 '20