Coder Social home page Coder Social logo

Comments (1)

Breakthrough avatar Breakthrough commented on August 22, 2024

Hi @hanoonaR;

Controlling the number of splits would require some kind of resolution method to determine both where to add missing cuts, and also where to remove them. With the Python API this is certainly possible, since you can do whatever you would like with the resulting scene list before the video is split:

from scenedetect import detect, ContentDetector, split_video_ffmpeg
scene_list = detect('my_video.mp4', ContentDetector())
# modify scene_list here
split_video_ffmpeg('my_video.mp4', scene_list)

As an example, you could combine the shortest scenes together until you have the desired amount.

You could also use minimum scene length and detect only a certain portion of the video to limit the maximum number of scenes. For example if you set minimum scene length to 1 second and limit the processing duration to 10s, there can never be more than 10 scenes detected.

To add this as an official feature however, we need to look into how it will be used, so the right method can be chosen. There are also some open questions. For example, where should the cuts be placed if we didn't find any? Could you share more about your use case?

Thanks for the comment/idea, glad you're finding the project useful!

from pyscenedetect.

Related Issues (20)

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.