I have a cap.read() function where I am reading in frames from a video. The first call of the function is the zeroth frame, the second call is the 1st frame, etc... I am trying to call the function 1200 because I need to start my read-in at the 1200th frame.
Right now this is what I have, but I know it is incorrect.
The direct answer to your question was answered by @Shmack in the comments. The code is simply
Given that your using the variable
cap, I suspect that your using the OpenCV module. If that is the case, then you can simply set the frame you want to start at by usingcap.set(1, 1200)The
.setfunction takes in its first parameter as the identifier, and for your case, you can simply leave that as1. The second parameter is the frame you wish to start at. You can read more aboutcap.set()here