Video scene cut/shot detection program and Python library (bundles the opencv-python-headless OpenCV variant and the scenedetect CLI; for servers without GUI libraries).
Actively maintained. Last release 3 weeks ago, commits in 20 of the last 26 weeks. A safe choice.
$
pip install scenedetect-headlessPySceneDetect
==========================================================
Video Scene Cut Detection and Analysis Tool
----------------------------------------------------------
.. image:: https://img.shields.io/pypi/status/scenedetect.svg
:target: https://github.com/Breakthrough/PySceneDetect
.. image:: https://img.shields.io/github/release/Breakthrough/PySceneDetect.svg
:target: https://github.com/Breakthrough/PySceneDetect
.. image:: https://img.shields.io/pypi/l/scenedetect.svg
:target: https://www.scenedetect.com/copyright/
.. image:: https://img.shields.io/github/stars/Breakthrough/PySceneDetect.svg?style=social&label=View%20on%20Github
:target: https://github.com/Breakthrough/PySceneDetect
----------------------------------------------------------
Documentation: https://www.scenedetect.com/docs
Github Repo: https://github.com/Breakthrough/PySceneDetect/
Install: ``pip install --upgrade scenedetect`` (or ``scenedetect-headless`` for servers)
Packages: `scenedetect <https://pypi.org/project/scenedetect/>`_ (CLI + ``opencv-python``) and `scenedetect-headless <https://pypi.org/project/scenedetect-headless/>`_ (CLI + ``opencv-python-headless``). Both provide the same ``scenedetect`` module -- install only one.
----------------------------------------------------------
**PySceneDetect** is a tool for detecting shot changes in videos, and can automatically split videos into separate clips. PySceneDetect is free and open-source software, and has several detection methods to find fast-cuts and threshold-based fades.
For example, to split a video: ``scenedetect -i video.mp4 split-video``
You can also use the Python API (`docs <https://www.scenedetect.com/docs/latest/>`_) to do the same:
.. code-block:: python
from scenedetect import detect, AdaptiveDetector, split_video_ffmpeg
scene_list = detect('my_video.mp4', AdaptiveDetector())
split_video_ffmpeg('my_video.mp4', scene_list)
----------------------------------------------------------
Licensed under BSD 3-Clause (see the ``LICENSE`` file for details).
Copyright (C) 2014 Brandon Castellano.
All rights reserved.