Demonstrate usage of the `detect()` function to process a subset of a video.
(test_video_file: str)
| 24 | |
| 25 | |
| 26 | def test_api_detect_start_end_time(test_video_file: str): |
| 27 | """Demonstrate usage of the `detect()` function to process a subset of a video.""" |
| 28 | from scenedetect import ContentDetector, detect |
| 29 | |
| 30 | # Times can be seconds (float), frames (int), or timecode 'HH:MM:SSS.nnn' (str). |
| 31 | # See test_api_timecode_types() for examples of each format. |
| 32 | scene_list = detect(test_video_file, ContentDetector(), start_time=10.5, end_time=15.9) |
| 33 | for i, scene in enumerate(scene_list): |
| 34 | print(f"Scene {i + 1}: {scene[0].get_timecode()} - {scene[1].get_timecode()}") |
| 35 | |
| 36 | |
| 37 | def test_api_detect_stats(test_video_file: str): |
nothing calls this directly
no test coverage detected