PySceneDetect Reference Manual¶
PySceneDetect finds scene changes in video (fast cuts and fades) and can split the video, save
frames, or export the scene list. Use it as the scenedetect command, or as the
scenedetect Python package.
Install with pip install scenedetect (pip install scenedetect-headless on servers without
GUI libraries), or download the Windows build from
scenedetect.com/download. Splitting video requires
ffmpeg (or mkvmerge with split-video -m); the Windows build includes ffmpeg.
Quick Start¶
From the command line, find the scenes in video.mp4 and write one clip per scene:
scenedetect -i video.mp4 split-video
Add list-scenes for a CSV, save-images for still frames, or a detect-* command to
pick the detector (default: detect-adaptive). See the CLI reference.
The same from Python:
from scenedetect import detect, AdaptiveDetector, split_video_ffmpeg
scenes = detect("video.mp4", AdaptiveDetector())
split_video_ffmpeg("video.mp4", scenes)
scenes is a list of (start, end) timecode pairs. See Examples for side-by-side CLI
and Python examples (saving images, CSV output, tuning detectors, and more), or
SceneManager for advanced workflows.
Reference¶
Most features work in both the CLI and the Python API. The Examples page shows each task both ways, and each reference page links to its counterpart across CLI commands, config file keys, and Python functions or classes.
CLI
scenedetect Command
-
Fast Cuts
Other
-
Splitting & Images
Scene Lists & Exports
Input & Timing
Python API
-
Fast Cuts
Other
Found a problem in the docs? Open an issue on the PySceneDetect issue tracker. Development happens on GitHub at github.com/Breakthrough/PySceneDetect.