MCPcopy Index your code
hub / github.com/Breakthrough/PySceneDetect / test_split_video_ffmpeg_default

Function test_split_video_ffmpeg_default

tests/test_output.py:47–62  ·  view source on GitHub ↗
(tmp_path, test_movie_clip)

Source from the content-addressed store, hash-verified

45
46@pytest.mark.skipif(condition=not is_ffmpeg_available(), reason="ffmpeg is not available")
47def 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")

Callers

nothing calls this directly

Calls 2

open_videoFunction · 0.90
split_video_ffmpegFunction · 0.90

Tested by

no test coverage detected