For an application (Win7/ mingw) that analyses movie files I divide the reading-in to the cores. When trying to jump to the beginning of the parts with
VideoCapture::set (CAP_PROP_POS_FRAMES, frameNumber);
and then
capt >> frame;
I do not get frame with number frameNumber but some frames before (the exact value depends on the movie format). Also the first two calls of
capt >> frame;
return the same frame.
But
VideoCapture::set (CAP_PROP_POS_FRAMES, frameNumber);
and then
ret = VideoCapture::get (CAP_PROP_POS_FRAMES);
lets frameNumber == ret
There are many threads about this issue already. Some say that in newer versions of opencv that "bug" is gone.
Other say that it's about the keyframes in the video stream that would make ffmpeg seek to the first keyframe AFTER the desired position.
Has somebody up-to-date information what happens here and how to do (this quite common task) please?