(tmp_path, test_movie_clip)
| 45 | |
| 46 | @pytest.mark.skipif(condition=not is_ffmpeg_available(), reason="ffmpeg is not available") |
| 47 | def test_split_video_ffmpeg_default(tmp_path, test_movie_clip): |
| 48 | video = open_video(test_movie_clip) |
| 49 | # Extract three hard-coded scenes for testing, each 30 frames. |
| 50 | scenes = [ |
| 51 | (video.base_timecode + 30, video.base_timecode + 60), |
| 52 | (video.base_timecode + 60, video.base_timecode + 90), |
| 53 | (video.base_timecode + 90, video.base_timecode + 120), |
| 54 | ] |
| 55 | assert ( |
| 56 | split_video_ffmpeg(test_movie_clip, scenes, output_dir=tmp_path, arg_override=FFMPEG_ARGS) |
| 57 | == 0 |
| 58 | ) |
| 59 | # The default filename format should be VIDEO_NAME-Scene-SCENE_NUMBER.mp4. |
| 60 | video_name = Path(test_movie_clip).stem |
| 61 | entries = sorted(tmp_path.glob(f"{video_name}-Scene-*")) |
| 62 | assert len(entries) == len(scenes) |
| 63 | |
| 64 | |
| 65 | @pytest.mark.skipif(condition=not is_ffmpeg_available(), reason="ffmpeg is not available") |
nothing calls this directly
no test coverage detected