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

Method seconds

scenedetect/common.py:372–380  ·  view source on GitHub ↗

The frame's position in number of seconds.

(self)

Source from the content-addressed store, hash-verified

370
371 @property
372 def seconds(self) -> float:
373 """The frame's position in number of seconds."""
374 if isinstance(self._time, Timecode):
375 return self._time.seconds
376 if isinstance(self._time, _Seconds):
377 return self._time.value
378 # `_FrameNumber` is only assigned after `_rate` is set.
379 assert self._rate is not None
380 return float(self._time.value / self._rate)
381
382 def get_seconds(self) -> float:
383 """[DEPRECATED] Get the frame's position in number of seconds.

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected