PySceneDetect Documentation

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. More Examples, each done both ways, cover images, CSV output, detector tuning and more; see SceneManager for advanced workflows.

Reference

Most features exist on both sides. The Examples page shows each task done both ways, and every page links to its counterpart on the other side: each command to the function or class that does the same, and each detector to a table of its options, config file keys and constructor parameters.

Found a problem in the docs? Raise an issue on the PySceneDetect issue tracker. Development happens on Github at github.com/Breakthrough/PySceneDetect.

Indices and Tables