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

Function test_ntsc_framerate_detection

tests/test_timecode.py:374–383  ·  view source on GitHub ↗

Common NTSC framerates should be detected from float values.

()

Source from the content-addressed store, hash-verified

372
373
374def test_ntsc_framerate_detection():
375 """Common NTSC framerates should be detected from float values."""
376 assert framerate_to_fraction(23.976023976023978) == Fraction(24000, 1001)
377 assert framerate_to_fraction(29.97002997002997) == Fraction(30000, 1001)
378 assert framerate_to_fraction(59.94005994005994) == Fraction(60000, 1001)
379 assert framerate_to_fraction(119.88011988011988) == Fraction(120000, 1001)
380 assert framerate_to_fraction(24.0) == Fraction(24, 1)
381 assert framerate_to_fraction(30.0) == Fraction(30, 1)
382 assert framerate_to_fraction(60.0) == Fraction(60, 1)
383 assert framerate_to_fraction(25.0) == Fraction(25, 1)
384
385
386def test_frame_timecode_converts_ntsc_float_fps():

Callers

nothing calls this directly

Calls 1

framerate_to_fractionFunction · 0.90

Tested by

no test coverage detected