Demonstrate how to use a SceneManager to implement a function similar to `detect()`.
(test_video_file: str)
| 42 | |
| 43 | |
| 44 | def test_api_scene_manager(test_video_file: str): |
| 45 | """Demonstrate how to use a SceneManager to implement a function similar to `detect()`.""" |
| 46 | from scenedetect import ContentDetector, SceneManager, open_video |
| 47 | |
| 48 | video = open_video(test_video_file) |
| 49 | scene_manager = SceneManager() |
| 50 | scene_manager.add_detector(ContentDetector()) |
| 51 | scene_manager.detect_scenes(video=video) |
| 52 | scene_list = scene_manager.get_scene_list() |
| 53 | for i, scene in enumerate(scene_list): |
| 54 | print(f"Scene {i + 1}: {scene[0].get_timecode()} - {scene[1].get_timecode()}") |
| 55 | |
| 56 | |
| 57 | def test_api_scene_manager_start_end_time(test_video_file: str): |
nothing calls this directly
no test coverage detected