scenedetect
:movie_camera: Python and OpenCV-based scene cut/transition detection program & library.
Science Score: 54.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
✓CITATION.cff file
Found CITATION.cff file -
✓codemeta.json file
Found codemeta.json file -
✓.zenodo.json file
Found .zenodo.json file -
○DOI references
-
○Academic publication links
-
✓Committers with academic emails
1 of 37 committers (2.7%) from academic institutions -
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (13.4%) to scientific vocabulary
Keywords
Keywords from Contributors
Repository
:movie_camera: Python and OpenCV-based scene cut/transition detection program & library.
Basic Info
- Host: GitHub
- Owner: Breakthrough
- License: bsd-3-clause
- Language: Python
- Default Branch: main
- Homepage: https://www.scenedetect.com/
- Size: 170 MB
Statistics
- Stars: 4,161
- Watchers: 67
- Forks: 456
- Open Issues: 66
- Releases: 36
Topics
Metadata Files
README.md
Video Cut Detection and Analysis Tool
Latest Release: v0.6.7 (August 24, 2025)
Website: scenedetect.com
Quickstart Example: scenedetect.com/cli/
Documentation: scenedetect.com/docs/
Discord: https://discord.gg/H83HbJngk7
Quick Install:
pip install scenedetect[opencv] --upgrade
Requires ffmpeg/mkvmerge for video splitting support. Windows builds (MSI installer/portable ZIP) can be found on the download page.
Quick Start (Command Line):
Split input video on each fast cut using ffmpeg:
scenedetect -i video.mp4 split-video
Save some frames from each cut:
scenedetect -i video.mp4 save-images
Skip the first 10 seconds of the input video:
scenedetect -i video.mp4 time -s 10s
More examples can be found throughout the documentation.
Quick Start (Python API):
To get started, there is a high level function in the library that performs content-aware scene detection on a video (try it from a Python prompt):
python
from scenedetect import detect, ContentDetector
scene_list = detect('my_video.mp4', ContentDetector())
scene_list will now be a list containing the start/end times of all scenes found in the video. There also exists a two-pass version AdaptiveDetector which handles fast camera movement better, and ThresholdDetector for handling fade out/fade in events.
Try calling print(scene_list), or iterating over each scene:
python
from scenedetect import detect, ContentDetector
scene_list = detect('my_video.mp4', ContentDetector())
for i, scene in enumerate(scene_list):
print(' Scene %2d: Start %s / Frame %d, End %s / Frame %d' % (
i+1,
scene[0].get_timecode(), scene[0].frame_num,
scene[1].get_timecode(), scene[1].frame_num,))
We can also split the video into each scene if ffmpeg is installed (mkvmerge is also supported):
python
from scenedetect import detect, ContentDetector, split_video_ffmpeg
scene_list = detect('my_video.mp4', ContentDetector())
split_video_ffmpeg('my_video.mp4', scene_list)
For more advanced usage, the API is highly configurable, and can easily integrate with any pipeline. This includes using different detection algorithms, splitting the input video, and much more. The following example shows how to implement a function similar to the above, but using the scenedetect API:
```python from scenedetect import openvideo, SceneManager, splitvideoffmpeg from scenedetect.detectors import ContentDetector from scenedetect.videosplitter import splitvideoffmpeg
def splitvideointoscenes(videopath, threshold=27.0): # Open our video, create a scene manager, and add a detector. video = openvideo(videopath) scenemanager = SceneManager() scenemanager.adddetector( ContentDetector(threshold=threshold)) scenemanager.detectscenes(video, showprogress=True) scenelist = scenemanager.getscenelist() splitvideoffmpeg(videopath, scenelist, show_progress=True) ```
See the documentation for more examples.
Benchmark:
We evaluate the performance of different detectors in terms of accuracy and processing speed. See the benchmark report for details.
Reference
- Documentation (covers application and Python API)
- CLI Example
- Config File
Help & Contributing
Please submit any bugs/issues or feature requests to the Issue Tracker. Before submission, ensure you search through existing issues (both open and closed) to avoid creating duplicate entries. Pull requests are welcome and encouraged. PySceneDetect is released under the BSD 3-Clause license, and submitted code should be compliant.
For help or other issues, you can join the official PySceneDetect Discord Server, submit an issue/bug report here on Github, or contact me via my website.
Code Signing
This program uses free code signing provided by SignPath.io, and a free code signing certificate by the SignPath Foundation
License
BSD-3-Clause; see LICENSE and THIRD-PARTY.md for details.
Copyright (C) 2014-2024 Brandon Castellano. All rights reserved.
Owner
- Name: Brandon Castellano
- Login: Breakthrough
- Kind: user
- Location: Canada
- Company: Google
- Website: https://www.bcastell.com
- Repositories: 24
- Profile: https://github.com/Breakthrough
Software engineer with experience in embedded development, computer vision and operating systems. Currently at Google, working on Fuchsia.
Citation (CITATION.cff)
cff-version: 1.2.0
title: PySceneDetect
message: www.scenedetect.com
type: software
authors:
- given-names: Brandon
family-names: Castellano
affiliation: www.bcastell.com
repository-code: 'https://github.com/Breakthrough/PySceneDetect'
url: 'https://www.scenedetect.com'
abstract: Video Cut Detection and Analysis Tool
license: BSD-3-Clause
GitHub Events
Total
- Create event: 37
- Release event: 5
- Issues event: 74
- Watch event: 816
- Delete event: 31
- Member event: 1
- Issue comment event: 134
- Push event: 276
- Pull request review comment event: 16
- Pull request review event: 24
- Pull request event: 44
- Fork event: 61
Last Year
- Create event: 37
- Release event: 5
- Issues event: 74
- Watch event: 816
- Delete event: 31
- Member event: 1
- Issue comment event: 134
- Push event: 276
- Pull request review comment event: 16
- Pull request review event: 24
- Pull request event: 44
- Fork event: 61
Committers
Last synced: 12 months ago
Top Committers
| Name | Commits | |
|---|---|---|
| Brandon Castellano | b****8@g****m | 1,235 |
| wjs018 | w****8@g****m | 46 |
| Joshua Coales | j****a@c****k | 26 |
| Tony Cebzanov | t****u@g****m | 7 |
| Brandon Castellano | b****o@g****m | 6 |
| Daniel Morgan | d****n@d****g | 5 |
| dependabot[bot] | 4****] | 5 |
| welix | t****y@g****m | 5 |
| Lyuboslav Petrov | p****v@g****m | 3 |
| Jonas | e****o@g****m | 2 |
| dadus33 | l****s@g****m | 2 |
| Kian-Meng Ang | k****g@g****m | 2 |
| João Faria | 4****a | 2 |
| Jan Chang | 5****e | 2 |
| Ivan Korostelev | i****r@g****m | 2 |
| 邢欣 | x****n@b****m | 1 |
| tpltnt | t****b@d****t | 1 |
| Marcellus Amadeus | 7****s@g****m | 1 |
| lgtm-com[bot] | 4****] | 1 |
| leingang | m****g@g****m | 1 |
| e271828- | e****- | 1 |
| deacon | l****n@g****m | 1 |
| Tal Kain | t****l@k****t | 1 |
| Soumitra Agarwal | a****4@g****m | 1 |
| Sara Veldhoen | V****n | 1 |
| Petr Pulc | p****c@g****m | 1 |
| Oliver Broomhall | o****l@g****m | 1 |
| Nathaniel Chin | 2****m | 1 |
| Martin Tillmann | m****n@g****m | 1 |
| Markus Bauer | s****e@s****e | 1 |
| and 7 more... | ||
Committer Domains (Top 20 + Academic)
Issues and Pull Requests
Last synced: 6 months ago
All Time
- Total issues: 221
- Total pull requests: 84
- Average time to close issues: 6 months
- Average time to close pull requests: about 1 month
- Total issue authors: 130
- Total pull request authors: 19
- Average comments per issue: 2.98
- Average comments per pull request: 1.5
- Merged pull requests: 71
- Bot issues: 0
- Bot pull requests: 8
Past Year
- Issues: 58
- Pull requests: 57
- Average time to close issues: 19 days
- Average time to close pull requests: 9 days
- Issue authors: 30
- Pull request authors: 7
- Average comments per issue: 1.21
- Average comments per pull request: 0.74
- Merged pull requests: 46
- Bot issues: 0
- Bot pull requests: 3
Top Authors
Issue Authors
- Breakthrough (58)
- tormento (5)
- babyta (5)
- yumianhuli1 (4)
- whatforiam (4)
- AhmedEwis (3)
- pengyouak (3)
- raj6996 (3)
- zaterio (2)
- awkrail (2)
- Mensen (2)
- jeremymeyers (2)
- ghost (2)
- macguruza (2)
- theojk1 (2)
Pull Request Authors
- Breakthrough (32)
- awkrail (12)
- wjs018 (12)
- dependabot[bot] (7)
- Janscode (4)
- ash2703 (2)
- moritzbrantner (2)
- oliviernguyenquoc (2)
- lgtm-com[bot] (1)
- chyang-nycu (1)
- Veldhoen (1)
- Mtillmann (1)
- jeremymeyers (1)
- kianmeng (1)
- leingang (1)
Top Labels
Issue Labels
Pull Request Labels
Packages
- Total packages: 3
-
Total downloads:
- pypi 1,005,341 last-month
- Total docker downloads: 1,772
-
Total dependent packages: 13
(may contain duplicates) -
Total dependent repositories: 87
(may contain duplicates) - Total versions: 76
- Total maintainers: 1
pypi.org: scenedetect
Video scene cut/shot detection program and Python library.
- Homepage: https://www.scenedetect.com
- Documentation: https://www.scenedetect.com/docs/
- License: BSD 3-Clause License
-
Latest release: 0.6.7
published 6 months ago
Rankings
Maintainers (1)
proxy.golang.org: github.com/breakthrough/pyscenedetect
- Documentation: https://pkg.go.dev/github.com/breakthrough/pyscenedetect#section-documentation
- License: bsd-3-clause
-
Latest release: v0.5.6
published over 4 years ago
Rankings
proxy.golang.org: github.com/Breakthrough/PySceneDetect
- Documentation: https://pkg.go.dev/github.com/Breakthrough/PySceneDetect#section-documentation
- License: bsd-3-clause
-
Latest release: v0.5.6
published over 4 years ago
Rankings
Dependencies
- jinja2 ==3.0.3
- mkdocs ==1.2.3
- Sphinx ==4.4.0
- av *
- numpy *
- opencv-python *
- appdirs *
- av <=8.0.3
- av *
- click *
- numpy *
- opencv-python ==4.5.1.48
- pytest >=7.0
- tqdm *
- appdirs *
- av <=8.0.3
- av *
- click *
- numpy *
- opencv-python-headless *
- pytest >=7.0
- tqdm *
- actions/checkout v3 composite
- actions/setup-python v3 composite
- actions/checkout v3 composite
- github/codeql-action/analyze v2 composite
- github/codeql-action/autobuild v2 composite
- github/codeql-action/init v2 composite
