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

Function test_detect_scenes_crop

tests/test_scene_manager.py:182–196  ·  view source on GitHub ↗
(test_video_file)

Source from the content-addressed store, hash-verified

180
181
182def test_detect_scenes_crop(test_video_file):
183 video = VideoStreamCv2(test_video_file)
184 sm = SceneManager()
185 sm.crop = (10, 10, 1900, 1000)
186 sm.add_detector(ContentDetector())
187
188 video_fps = video.frame_rate
189 start_time = FrameTimecode("00:00:05", video_fps)
190 end_time = FrameTimecode("00:00:15", video_fps)
191 video.seek(start_time)
192 sm.auto_downscale = True
193
194 _ = sm.detect_scenes(video=video, end_time=end_time)
195 scene_list = sm.get_scene_list()
196 assert [start for start, _ in scene_list] == TEST_VIDEO_START_FRAMES_ACTUAL
197
198
199def test_crop_invalid():

Callers

nothing calls this directly

Calls 8

add_detectorMethod · 0.95
seekMethod · 0.95
detect_scenesMethod · 0.95
get_scene_listMethod · 0.95
VideoStreamCv2Class · 0.90
SceneManagerClass · 0.90
ContentDetectorClass · 0.90
FrameTimecodeClass · 0.90

Tested by

no test coverage detected