1 | initial version |
That happened to me in a previous Python version with some videos, my partial solution was reading video with
i=1
while(i< NUMBER_FRAMES)
ret, frame = cap.read()
i=i+1
if you realize, this code read frames to discard them. According the size of your video, NUMBER_FRAMES could vary between 10 and 400, you can set your own number. Hope this hint works for you.