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

Method position

scenedetect/backends/opencv.py:484–492  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

482
483 @property
484 def position(self) -> FrameTimecode:
485 if self.frame_number < 1:
486 return self.base_timecode
487 # Synthesize a Timecode from frame count and rational framerate.
488 fps = self.frame_rate
489 time_base = Fraction(1, fps.numerator)
490 pts = (self.frame_number - 1) * fps.denominator
491 timecode = Timecode(pts=pts, time_base=time_base)
492 return FrameTimecode(timecode=timecode, fps=fps)
493
494 @property
495 def position_ms(self) -> float:

Callers

nothing calls this directly

Calls 2

TimecodeClass · 0.90
FrameTimecodeClass · 0.90

Tested by

no test coverage detected