MCPcopy Index your code
hub / github.com/Breakthrough/PySceneDetect / test_api_open_video_framerate_legacy_alias

Function test_api_open_video_framerate_legacy_alias

tests/test_api.py:75–85  ·  view source on GitHub ↗

`open_video(framerate=...)` is the soft-deprecated alias for `frame_rate=` (issue #548). Both forms must produce equivalent streams; when both are provided, `frame_rate` wins.

(test_video_file: str)

Source from the content-addressed store, hash-verified

73
74
75def test_api_open_video_framerate_legacy_alias(test_video_file: str):
76 """`open_video(framerate=...)` is the soft-deprecated alias for `frame_rate=` (issue #548).
77 Both forms must produce equivalent streams; when both are provided, `frame_rate` wins."""
78 from scenedetect import open_video
79
80 legacy = open_video(test_video_file, framerate=30.0)
81 canonical = open_video(test_video_file, frame_rate=30.0)
82 assert legacy.frame_rate == canonical.frame_rate
83 # `frame_rate` takes precedence over `framerate` when both are provided.
84 both = open_video(test_video_file, frame_rate=30.0, framerate=24.0)
85 assert both.frame_rate == canonical.frame_rate
86
87
88def test_api_timecode_types():

Callers

nothing calls this directly

Calls 1

open_videoFunction · 0.90

Tested by

no test coverage detected