上QQ阅读APP看书,第一时间看更新
How it works...
Obtaining the video position and setting it is done using the cv2.CAP_PROP_POS_FRAMES property. Depending on the way a video is encoded, setting the property might not result in setting the exact frame index requested. The value to set must be within a valid range.
You should see the following output after running the program:
Frame count: 182
Position: 0
Position: 1
Position: 100
The following frames should be displayed: