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

Function _tc_to_secs

tests/test_vfr.py:48–52  ·  view source on GitHub ↗

Parse a HH:MM:SS.mmm timecode string to seconds.

(tc: str)

Source from the content-addressed store, hash-verified

46
47
48def _tc_to_secs(tc: str) -> float:
49 """Parse a HH:MM:SS.mmm timecode string to seconds."""
50 h, m, rest = tc.split(":")
51 s, ms = rest.split(".")
52 return int(h) * 3600 + int(m) * 60 + int(s) + int(ms) / 1000
53
54
55def test_vfr_position_is_timecode(test_vfr_video: str):

Callers 1

test_vfr_otio_exportFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected