Git Product home page Git Product logo

byeframe's Introduction

byeframe

Trim video clips using audio threshold

Requirements

  • moviepy == 1.0: pip install moviepy==1.0

Basic Usage

python byeframe.py PATH_TO_VIDEO min_thres max_thresh thresh_duration

And you should obtain an output at the same folder of the input video called out.mp4.

Here are the available options:

usage: byeframe.py [-h] [--tmax TMAX] [--tdur TDUR] [--thread THREAD]
                   [--splitNb SPLITNB]
                   path

positional arguments:
  path               Path to video file [home/usr/foo.mp4]

optional arguments:
  -h, --help         show this help message and exit
  --tmax TMAX        maximum threshold for sound [0.1 by default]
  --tdur TDUR        duration in seconds for threshold for sound [0.05 by
                     default]
  --thread THREAD    use multiple thread [3 by default]
  --splitNb SPLITNB  split video to nb parts. Necessary for large videos

For an efficient split pipeline, calculate each part as roughly about 10 seconds.

Dev Usage

Everything you need for trimming videos is in trim.py, if you'd like to use it in an api. I use to have a minimum threshold as well to capture volume ranges, but it did not serve a bunch, plus it was a little difficult come up with a sensible default value, so I removed that from the implementation. However if you have such a need just add a min threshold value to the if statement of cut_silence method of the SilenceTrimmer.

byeframe's People

Contributors

d-k-e avatar

Stargazers

 avatar

Watchers

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