In [1]: import cv2 In [2]: v=cv2.VideoCapture('sample.mp4') In [3]: v.get(cv2.CAP_PROP_POS_MSEC) Out[3]: 0.0 In [4]: v.set(cv2.CAP_PROP_POS_AVI_RATIO,1) Out[4]: True In [5]: v.get(cv2.CAP_PROP_POS_MSEC) Out[5]: 0.078125 In [10]: v.read() Out[10]: (Fa...
Just to confirm: the issue with cv2.CAP_PROP_POS_MSEC and cv2.CAP_PROP_POS_FRAMES is that it may not actually seek the first frame and may set the start pointer to some other frame? Would it be sufficient, in our implementation, to remove the lines where this value is set? Author ...
1)# total_time = vid.get(cv.CAP_PROP_POS_MSEC)last_save_time =-1*thermal_time#So that it saves the 0th frameidx=0whilecurrent_frame < total_frames:
(rgb_frame); // returns Frame 500 The behavior is consistent with both CAP_PROP_POS_FRAMES and CAP_PROP_POS_MSEC properties. For the video file that I'm analyzing (FFmpeg stream info - Video: h264 (High) (avc1 / 0x31637661), yuv420p, 128x512, 225 kb/s, 30 fps, 30 tbr, ...