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

Method _seconds_to_frames

scenedetect/common.py:466–472  ·  view source on GitHub ↗

Convert `seconds` to the nearest number of frames using the current framerate. *NOTE*: This will not be correct for variable framerate videos.

(self, seconds: float)

Source from the content-addressed store, hash-verified

464 )
465
466 def _seconds_to_frames(self, seconds: float) -> int:
467 """Convert `seconds` to the nearest number of frames using the current framerate.
468
469 *NOTE*: This will not be correct for variable framerate videos.
470 """
471 assert self._rate is not None
472 return round(seconds * self._rate)
473
474 def _timecode_to_seconds(self, input: str) -> float:
475 """Parses a string based on the three possible forms (in timecode format, as an integer

Callers 2

frame_numMethod · 0.95
_get_other_as_framesMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected