Coder Social home page Coder Social logo

asdlei99 / pyscenedetect Goto Github PK

View Code? Open in Web Editor NEW

This project forked from breakthrough/pyscenedetect

0.0 1.0 0.0 52.56 MB

:movie_camera: Python and OpenCV-based scene cut/transition detection program & library.

Home Page: http://py.scenedetect.com

License: Other

Python 99.51% Makefile 0.21% Batchfile 0.27%

pyscenedetect's Introduction

PySceneDetect

Video Scene Cut Detection and Analysis Tool

Documentation Status PyPI Status PyPI Version PyPI License

Latest Release: v0.5.1.1 (August 3, 2019)

Main Webpage: py.scenedetect.com

Documentation: manual.scenedetect.com

Download/Install: https://pyscenedetect.readthedocs.io/en/latest/download/


Quick Install: Requires Python modules numpy, OpenCV cv2, and (optional) tqdm for displaying progress. To install PySceneDetect via pip with all dependencies:

pip install scenedetect[opencv,progress_bar]

Or to install just PySceneDetect (OpenCV installation required):

pip install scenedetect

To test if you have the required prerequisites, open a python prompt, and run the following:

import numpy
import cv2

If both of those commands execute without any problems, you should be able to run PySceneDetect without any issues. To enable video splitting support, you will also need to have mkvmerge or ffmpeg installed on your system. See the documentation on Video Splitting Support after installation for details.

Full documentation for PySceneDetect can be found on Readthedocs, or by visiting py.scenedetect.com. This includes details on detection modes, default values/thresholds to try, and how to effectively choose the optimal detection parameters.

Install From Source: To install from source code instead, download the latest release archive, and run python setup.py install wherever you extract the archive (see releases tab or the download page for details).


PySceneDetect is a command-line tool, written in Python and using OpenCV, which analyzes a video, looking for scene changes or cuts. The output timecodes can then be used with another tool (e.g. mkvmerge, ffmpeg) to split the video into individual clips. A frame-by-frame analysis can also be generated for a video, to help with determining optimal threshold values or detecting patterns/other analysis methods for a particular video. See the Usage documentation for details.

There are two main detection methods PySceneDetect uses: detect-threshold (comparing each frame to a set black level, useful for detecting cuts and fades to/from black), and detect-content (compares each frame sequentially looking for changes in content, useful for detecting fast cuts between video scenes, although slower to process). Each mode has slightly different parameters, and is described in detail below.

In general, use detect-threshold mode if you want to detect scene boundaries using fades/cuts in/out to black. If the video uses a lot of fast cuts between content, and has no well-defined scene boundaries, you should use the detect-content mode. Once you know what detection mode to use, you can try the parameters recommended below, or generate a statistics file (using the -s / --statsfile flag) in order to determine the correct paramters - specifically, the proper threshold value.

Note that PySceneDetect is currently in beta; see Current Features & Roadmap below for details. For help or other issues, you can contact me on my website, or we can chat in #pyscenedetect on Freenode. Feel free to submit any bugs or feature requests to the Issue Tracker here on Github.

Download & Installation

See the Download & Installation page on Readthedocs (alt. link) for how to get PySceneDetect, as well as details on which system dependencies are required.

Usage

Current Features & Roadmap

You can view the latest features and version roadmap on Readthedocs. See docs/changelog.md for a list of changes in each version, or visit the Releases page to download a specific version. Feel free to submit any bugs/issues or feature requests to the Issue Tracker.

Additional features being planned or in development can be found here (tagged as feature) in the issue tracker. You can also find additional information about PySceneDetect at http://www.bcastell.com/projects/PySceneDetect/.


Licensed under BSD 3-Clause (see the LICENSE file for details).

Copyright (C) 2014-2019 Brandon Castellano. All rights reserved.

pyscenedetect's People

Contributors

breakthrough avatar tonycpsu avatar nirabo avatar wjs018 avatar ivan23kor avatar elcombato avatar colelawrence avatar piercus avatar dlu avatar markusbauer avatar petrpulc avatar soumitraagarwal avatar talkain avatar e271828- avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.