PySceneDetect finds scene cuts and fades in video files, then lists, splits, or exports them. Use the command-line tool, Python API, Windows builds, or a Docker image with ffmpeg and mkvmerge included.
Overview
PySceneDetect analyzes video to locate hard cuts, adaptive transitions, fades, and related scene boundaries. Output includes time-coded scene lists that you can split into clips, export for editors, or feed into downstream processing.
The CLI accepts pip-installed packages and drives workflows such as splitting on each cut, saving still frames per scene, skipping leading segments, and writing CSV, EDL, XML, OTIO, HTML reports, and other standard formats. Multiple detectors cover adaptive motion, HSV and edge content changes, perceptual hash, histogram, and threshold-based fade detection.
Developers call a high-level Python API for content-aware detection or compose lower-level pipelines with configurable backends. OpenCV is the default decoder; optional PyAV or MoviePy backends can be installed. Splitting integrates with ffmpeg or mkvmerge when those tools are present.
Windows users can install a signed MSI or portable ZIP with the CLI and bundled ffmpeg without a separate Python setup. A container image on ghcr.io bundles the CLI, ffmpeg, mkvmerge, PyAV, and MoviePy for jobs that mount host directories for input and output.
Key features
- Multiple scene detection algorithms
- CLI and Python API
- ffmpeg and mkvmerge video splitting
- Editor timeline export formats
- HTML reports and per-scene images
- Configurable video decode backends
- Official Docker image
- Signed Windows installer option
Use cases
- Splitting home or raw footage by scene
- Trimming commercials from recordings
- Reviewing security camera footage
- Finding loops for GIFs and cinemagraphs
- Measuring shot length in video datasets