MCPcopy Create free account
hub / github.com/Breakthrough/PySceneDetect / reset

Method reset

scenedetect/backends/opencv.py:275–278  ·  view source on GitHub ↗

Close and re-open the VideoStream (should be equivalent to calling `seek(0)`).

(self)

Source from the content-addressed store, hash-verified

273 self._cap.set(cv2.CAP_PROP_POS_FRAMES, 0)
274
275 def reset(self):
276 """Close and re-open the VideoStream (should be equivalent to calling `seek(0)`)."""
277 self._cap.release()
278 self._open_capture(float(self._frame_rate))
279
280 def read(self, decode: bool = True) -> np.ndarray | bool:
281 if not self._cap.isOpened():

Callers 1

Calls 1

_open_captureMethod · 0.95

Tested by 1