Latest Release: v0.6.2 (July 23, 2023)Download Changelog Documentation Getting Started
See the changelog for the latest release notes and known issues.
PySceneDetect is a tool/library for detecting shot changes in videos (example), and automatically splitting the video into separate clips. PySceneDetect is free and open-source software, and there are several detection methods available - from simple threshold-based fade in/out detection, to advanced content aware fast-cut detection of each shot.
Split video on each fast cut using command line (more examples):
scenedetect -i video.mp4 split-video
Split video on each fast cut using Python API (docs):
from scenedetect import detect, AdaptiveDetector, split_video_ffmpeg scene_list = detect('my_video.mp4', AdaptiveDetector()) split_video_ffmpeg('my_video.mp4', scene_list)
Examples and Use Cases
Here are some of the things people are using PySceneDetect for:
- splitting home videos or other source footage into individual scenes
- automated detection and removal of commercials from PVR-saved video sources
- processing and splitting surveillance camera footage
- statistical analysis of videos to find suitable "loops" for looping GIFs/cinemagraphs
- academic analysis of film and video (e.g. finding mean shot length)
Of course, this is just a small slice of what you can do with PySceneDetect, so why not try it out for yourself! The timecode format used by default (
HH:MM:SS.nnnn) is compatible with most popular video tools, so in most cases the output scene list from PySceneDetect can be directly copied and pasted into another tool of your choice (e.g.
avconv or the