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

Function get_test_video_params

tests/test_video_stream.py:93–120  ·  view source on GitHub ↗

Fixture for parameters of all videos.

()

Source from the content-addressed store, hash-verified

91# TODO: Save two "golden" frames from each video on a shot boundary, and use that to validate
92# that seeking works correctly for all backends (as well as that no frames are dropped).
93def get_test_video_params() -> list[VideoParameters]:
94 """Fixture for parameters of all videos."""
95 return [
96 VideoParameters(
97 path=get_absolute_path("resources/testvideo.mp4"),
98 width=1280,
99 height=720,
100 frame_rate=29.97,
101 total_frames=720,
102 aspect_ratio=1.0,
103 ),
104 VideoParameters(
105 path=get_absolute_path("resources/goldeneye.mp4"),
106 width=1280,
107 height=544,
108 frame_rate=23.976,
109 total_frames=1980,
110 aspect_ratio=1.0,
111 ),
112 VideoParameters(
113 path=get_absolute_path("resources/issue-195-aspect-ratio.mp4"),
114 width=704,
115 height=576,
116 frame_rate=25.0,
117 total_frames=628,
118 aspect_ratio=1.4545454545,
119 ),
120 ]
121
122
123_VS_TYPES: list = [vs for vs in (VideoStreamCv2, VideoStreamAv) if vs is not None]

Callers

nothing calls this directly

Calls 2

VideoParametersClass · 0.85
get_absolute_pathFunction · 0.70

Tested by

no test coverage detected