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

Function _edl_timecode

scenedetect/output/__init__.py:245–254  ·  view source on GitHub ↗

Format `timecode` as ``HH:MM:SS:FF`` for a CMX 3600 EDL entry.

(timecode: FrameTimecode)

Source from the content-addressed store, hash-verified

243
244
245def _edl_timecode(timecode: FrameTimecode) -> str:
246 """Format `timecode` as ``HH:MM:SS:FF`` for a CMX 3600 EDL entry."""
247 total_seconds = timecode.seconds
248 frame_rate = timecode.frame_rate
249 assert frame_rate is not None
250 hours = int(total_seconds // 3600)
251 minutes = int((total_seconds % 3600) // 60)
252 seconds = int(total_seconds % 60)
253 frames_part = int((total_seconds * frame_rate) % frame_rate)
254 return f"{hours:02d}:{minutes:02d}:{seconds:02d}:{frames_part:02d}"
255
256
257def _parse_edl_start_timecode(value: str, frame_rate: Fraction | float) -> int:

Callers 1

write_scene_list_edlFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected