<p dir="auto">I have a video with 25 fps and 50 tbr, when i capture video the output is not as expected,<br>
Observations:<br>
1.set CV_CAP_PROP_POS_FRAMES to some position and start to capture, the captured frame won't match the actual frame (at that time) pos/time when i watch the video using vlc player<br>
2.The number of frames captured is less than the frames captured directly using ffmpeg. Many frames at the start are missing<br>
You can download the video from the specified link,<br>
<a href="https://drive.google.com/open?id=1RPvNcaiMTNWTA8Pi5MOMT1i07FmPiFXR" rel="nofollow">https://drive.google.com/open?id=1RPvNcaiMTNWTA8Pi5MOMT1i07FmPiFXR</a></p>
<p dir="auto">How to simulate:<br>
1.Dump all the frames using video capture from the beginning without using set position.</p>
<p dir="auto">handler = cv2.VideoCapture()<br>
fd = handler.open(filename)<br>
ret,frame=handler.read()<br>
index = 0<br>
while frame is not None:<br>
cv2.imwrite(str(index)+".jpg",frame)<br>
ret,frame=handler.read()<br>
index+=1</p>
<p dir="auto">2.Set frame position to 5840 and try to match the frame dumped now and the previous one without set.</p>
<p dir="auto">handler = cv2.VideoCapture()<br>
fd = handler.open(filename)<br>
ret,frame=handler.read()<br>
handler.set(cv2.CAP_PROP_POS_FRAMES, 5340)<br>
ret,frame=handler.read()<br>
cv2.imwrite("using_set_"+str(5340)+".jpg",frame)</p>
<p dir="auto">Output  [5340.jpg] is not same as [using_set_5340.jpg]</p>
<p dir="auto">Example and confirmed effect:</p>
<p dir="auto"><a href="http://answers.opencv.org/question/162781/videocaptureset-cap_prop_pos_frames-framenumber-not-exact-in-opencv-32-with-ffmpeg/" rel="nofollow">http://answers.opencv.org/question/162781/videocaptureset-cap_prop_pos_frames-framenumber-not-exact-in-opencv-32-with-ffmpeg/</a></p>