Coder Social home page Coder Social logo

jumpcutter-1's Introduction

What is jumpcutter?

Jumpcutter is a program that is written in Python to automatically jump-cut silent parts of your videos. The purpose here is to ease your post recording work.

Check out the medium post for more information.

Installation

You can install jumpcutter by simply:

pip install jumpcutter 

Demo

Watch the video

How to run it?

There are 11 command line arguments you can run the program with. Before explaining them, I would like to say that most of these parameters have a default value that “just works”. So, if you don’t want you don’t need to specify (or know) almost any of these parameters. You will be just fine with the default values.

  1. -i, --input: Path to the video that you want to jump-cut.
  2. -o, --output: Path to where you want to save the output video.
  3. -m, --magnitude-threshold-ratio: The percentage of the maximum value of your audio signal that you would like to consider as silent a signal (default: 0.02).
  4. -d, --duration-threshold: Minimum number of required seconds in silence to cut it out. For example if this parameter is 0.5, it means that the silence parts have to last minimum 0.5 seconds, otherwise they won't be jump-cut (default: 0.5).
  5. -f, --failure-tolerance-ratio: Most of the times, there are 44100 audio signal values in 1 second of a video. Let's say the "--duration-threshold" was set to 0.5. This means that, we need to check minimum 22050 signal values to see if there is a silent part of not. What happens if we found 22049 values that we consider as silent, but there is 1 value that is above our threshold. Should we just throw this part of the video and consider it as a loud signal? I think we shouldn't. This parameter leaves some room for failure, it tolerates high signal values until some point. Let's say it is set to 0.1, it means that 10% of the signal that is currently being investigated can have values that are higher than our threshold, but they are still going to be considered as a silent part (default: 0.1).
  6. -s, --space-on-edges: Leaves some space on the edges of silence cut. E.g. if it is found that there is silence between 10th and 20th second of the video, then instead of cutting it out directly, we cut out (10+space_on_edges)th and (20-space_on_edges)th seconds of the clip (default: 0.1).
  7. -x, --silence-part-speed : If this parameter is given, instead of cutting the silent parts out, the script will speed them up "x" times.
  8. -l, --min-loud-part-duration: If this parameter is given, loud parts of the video that are shorter then this parameter will also be cut.
  9. -c, --cut: If you want, you can also cut voiced parts of the video (to have some fun :)). There are 3 choices you can make for this parameter: silent, voiced, both. If you choose silent, silent parts of the video will be cutted; if you choose voiced, voiced parts of the video will be cutted; if you choose both 2 videos will be saved: 1 for the silent parts, 1 for the voiced parts (default: silent).
  10. --codec: Codec to use for image encoding. Can be any codec supported by ffmpeg. If the filename has extension ‘.mp4’, ‘.ogv’, ‘.webm’, the codec will be set accordingly, but you can still set it if you don’t like the default. For other extensions, the output filename must be set accordingly. Check here
  11. bitrate: Desired bitrate of the output video. Leave blank if you don't know what this is.

Examples of running the program

# The simplest way you can run the program
jumpcutter -i input_video.mp4 -o output_video.mp4
# If you want, you can also set the other parameters that was mentioned
jumpcutter -i input_video.mp4 -o output_video.mp4 -m 0.05 -d 1.0 -f 0.2 -s 0.2 -x 2000 -l 1.0 -c both

jumpcutter-1's People

Contributors

emkademy avatar kivancyuksel 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.