![OpenCV 3 Computer Vision with Python Cookbook](https://wfqqreader-1252317822.image.myqcloud.com/cover/102/36700102/b_36700102.jpg)
上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:
![](https://epubservercos.yuewen.com/34A43F/19470396008899506/epubprivate/OEBPS/Images/8d41e6d5-e1bc-4080-8ddc-99c0b3484fa6.png?sign=1738792572-wyP1FCMyRo6Zwcb2SIsvA32hYzAsht7a-0-b16578d18d1bc05e345bede52deacb4c)