{"id":15033936,"url":"https://github.com/breakthrough/pyscenedetect","last_synced_at":"2025-05-14T21:02:06.936Z","repository":{"id":17665781,"uuid":"20470449","full_name":"Breakthrough/PySceneDetect","owner":"Breakthrough","description":":movie_camera: Python and OpenCV-based scene cut/transition detection program \u0026 library.","archived":false,"fork":false,"pushed_at":"2025-05-03T02:51:10.000Z","size":176738,"stargazers_count":3835,"open_issues_count":63,"forks_count":435,"subscribers_count":68,"default_branch":"main","last_synced_at":"2025-05-03T03:38:18.171Z","etag":null,"topics":["analysis","image-processing","opencv","python","python-opencv","scene-detection","scene-recognition","video","video-processing"],"latest_commit_sha":null,"homepage":"https://www.scenedetect.com/","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Breakthrough.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":"CITATION.cff","codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2014-06-04T04:43:21.000Z","updated_at":"2025-05-03T02:51:14.000Z","dependencies_parsed_at":"2023-02-16T03:30:48.052Z","dependency_job_id":"517a1595-bcb3-435d-8405-28398abe80a2","html_url":"https://github.com/Breakthrough/PySceneDetect","commit_stats":{"total_commits":1116,"total_committers":33,"mean_commits":33.81818181818182,"dds":"0.11827956989247312","last_synced_commit":"0b4b3b4b995ea1e3f0bc82c3d7339075e29dfbf5"},"previous_names":[],"tags_count":38,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Breakthrough%2FPySceneDetect","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Breakthrough%2FPySceneDetect/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Breakthrough%2FPySceneDetect/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Breakthrough%2FPySceneDetect/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Breakthrough","download_url":"https://codeload.github.com/Breakthrough/PySceneDetect/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252835026,"owners_count":21811469,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["analysis","image-processing","opencv","python","python-opencv","scene-detection","scene-recognition","video","video-processing"],"created_at":"2024-09-24T20:23:16.982Z","updated_at":"2025-05-07T07:38:44.521Z","avatar_url":"https://github.com/Breakthrough.png","language":"Python","readme":"\n![PySceneDetect](https://raw.githubusercontent.com/Breakthrough/PySceneDetect/main/website/pages/img/pyscenedetect_logo_small.png)\n==========================================================\nVideo Cut Detection and Analysis Tool\n----------------------------------------------------------\n\n[![Build Status](https://img.shields.io/github/actions/workflow/status/Breakthrough/PySceneDetect/build.yml)](https://github.com/Breakthrough/PySceneDetect/actions)\n[![PyPI Status](https://img.shields.io/pypi/status/scenedetect.svg)](https://pypi.python.org/pypi/scenedetect/)\n[![PyPI Version](https://img.shields.io/pypi/v/scenedetect?color=blue)](https://pypi.python.org/pypi/scenedetect/)\n[![PyPI License](https://img.shields.io/pypi/l/scenedetect.svg)](https://scenedetect.com/copyright/)\n\n----------------------------------------------------------\n\n### Latest Release: v0.6.6 (March 9, 2025)\n\n**Website**:  [scenedetect.com](https://www.scenedetect.com)\n\n**Quickstart Example**: [scenedetect.com/cli/](https://www.scenedetect.com/cli/)\n\n**Documentation**:  [scenedetect.com/docs/](https://www.scenedetect.com/docs/)\n\n**Discord**: https://discord.gg/H83HbJngk7\n\n----------------------------------------------------------\n\n**Quick Install**:\n\n    pip install scenedetect[opencv] --upgrade\n\nRequires ffmpeg/mkvmerge for video splitting support. Windows builds (MSI installer/portable ZIP) can be found on [the download page](https://scenedetect.com/download/).\n\n----------------------------------------------------------\n\n**Quick Start (Command Line)**:\n\nSplit input video on each fast cut using `ffmpeg`:\n\n    scenedetect -i video.mp4 split-video\n\nSave some frames from each cut:\n\n    scenedetect -i video.mp4 save-images\n\nSkip the first 10 seconds of the input video:\n\n    scenedetect -i video.mp4 time -s 10s\n\nMore examples can be found throughout [the documentation](https://www.scenedetect.com/docs/latest/cli.html).\n\n**Quick Start (Python API)**:\n\nTo 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):\n\n```python\nfrom scenedetect import detect, ContentDetector\nscene_list = detect('my_video.mp4', ContentDetector())\n```\n\n`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.\n\nTry calling `print(scene_list)`, or iterating over each scene:\n\n```python\nfrom scenedetect import detect, ContentDetector\nscene_list = detect('my_video.mp4', ContentDetector())\nfor i, scene in enumerate(scene_list):\n    print('    Scene %2d: Start %s / Frame %d, End %s / Frame %d' % (\n        i+1,\n        scene[0].get_timecode(), scene[0].get_frames(),\n        scene[1].get_timecode(), scene[1].get_frames(),))\n```\n\nWe can also split the video into each scene if `ffmpeg` is installed (`mkvmerge` is also supported):\n\n```python\nfrom scenedetect import detect, ContentDetector, split_video_ffmpeg\nscene_list = detect('my_video.mp4', ContentDetector())\nsplit_video_ffmpeg('my_video.mp4', scene_list)\n```\n\nFor 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](https://www.scenedetect.com/docs/latest/api.html):\n\n```python\nfrom scenedetect import open_video, SceneManager, split_video_ffmpeg\nfrom scenedetect.detectors import ContentDetector\nfrom scenedetect.video_splitter import split_video_ffmpeg\n\ndef split_video_into_scenes(video_path, threshold=27.0):\n    # Open our video, create a scene manager, and add a detector.\n    video = open_video(video_path)\n    scene_manager = SceneManager()\n    scene_manager.add_detector(\n        ContentDetector(threshold=threshold))\n    scene_manager.detect_scenes(video, show_progress=True)\n    scene_list = scene_manager.get_scene_list()\n    split_video_ffmpeg(video_path, scene_list, show_progress=True)\n```\n\nSee [the documentation](https://www.scenedetect.com/docs/latest/api.html) for more examples.\n\n**Benchmark**:\n\nWe evaluate the performance of different detectors in terms of accuracy and processing speed. See the [benchmark report](benchmark/README.md) for details.\n\n## Reference\n\n - [Documentation](https://www.scenedetect.com/docs/) (covers application and Python API)\n - [CLI Example](https://www.scenedetect.com/cli/)\n - [Config File](https://www.scenedetect.com/docs/0.6.4/cli/config_file.html)\n\n## Help \u0026 Contributing\n\nPlease submit any bugs/issues or feature requests to [the Issue Tracker](https://github.com/Breakthrough/PySceneDetect/issues). Before submission, ensure you search through existing issues (both open and closed) to avoid creating duplicate entries.\nPull requests are welcome and encouraged.  PySceneDetect is released under the BSD 3-Clause license, and submitted code should be compliant.\n\nFor help or other issues, you can join [the official PySceneDetect Discord Server](https://discord.gg/H83HbJngk7), submit an issue/bug report [here on Github](https://github.com/Breakthrough/PySceneDetect/issues), or contact me via [my website](http://www.bcastell.com/about/).\n\n## Code Signing\n\nThis program uses free code signing provided by [SignPath.io](https://signpath.io?utm_source=foundation\u0026utm_medium=github\u0026utm_campaign=PySceneDetect), and a free code signing certificate by the [SignPath Foundation](https://signpath.org?utm_source=foundation\u0026utm_medium=github\u0026utm_campaign=PySceneDetect)\n\n## License\n\nBSD-3-Clause; see [`LICENSE`](LICENSE) and [`THIRD-PARTY.md`](THIRD-PARTY.md) for details.\n\n----------------------------------------------------------\n\nCopyright (C) 2014-2024 Brandon Castellano.\nAll rights reserved.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbreakthrough%2Fpyscenedetect","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbreakthrough%2Fpyscenedetect","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbreakthrough%2Fpyscenedetect/lists"}