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

Method duration

scenedetect/backends/opencv.py:471–476  ·  view source on GitHub ↗

Duration of the stream as a FrameTimecode, or None if non terminating.

(self)

Source from the content-addressed store, hash-verified

469
470 @property
471 def duration(self) -> FrameTimecode | None:
472 """Duration of the stream as a FrameTimecode, or None if non terminating."""
473 frame_count = math.trunc(self._cap.get(cv2.CAP_PROP_FRAME_COUNT))
474 if frame_count > 0:
475 return self.base_timecode + frame_count
476 return None
477
478 @property
479 def aspect_ratio(self) -> float:

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected