Giter Club home page Giter Club logo

gated-video-editor's Introduction

Gated Video Editor

Gated Video Editor is a Python script that modifies video files, speeding up silent parts without affecting the sound parts. This is especially useful for instructional videos, as it helps users to watch videos more efficiently without missing any relevant content.

Table of Contents

Prerequisites

  • Python 3.6+
  • FFmpeg

Quick install

./Setup-Gate-Engine.py

This will run all requirements for you.

Standalone

You can use the script Gated-Engine.py as a seperate argument

TOOLS

python Gate-Engine.py --input_file Video.mp4 --output_file VideoMP4_Output.mp4 --sounded_speed 1 --silent_speed 999999 --frame_margin 3

Argument Description
--input_file Input File you want to process.
--url A youtube url to download and process.
--output_file the output file. (optional. if not included, it'll just modify the input file name).
--silent_threshold, default=0.03 The volume amount that frames' audio needs to surpass to be consider "sounded". It ranges from 0 (silence) to 1 (max volume).
--sounded_speed, default=1.00 The speed that sounded (spoken) frames should be played at. Typically 1.
--silent_speed, default=5.00 The speed that silent frames should be played at. 999999 for jumpcutting.
--frame_margin, default=1 Some silent frames adjacent to sounded frames are included to provide context. How many frames on either the side of speech should be included? That's this variable.
--sample_rate, default=44100 Sample rate of the input and output videos.
--frame_rate, default=30 Frame rate of the input and output videos. optional... I try to find it out myself, but it doesn't always work.
--frame_quality, default=3 Quality of frames to be extracted from input video. 1 is highest, 31 is lowest, 3 is the default.

Installation

  1. Clone the repository:
git clone https://github.com/your_username/Gated-Video-Editor.git
  1. Navigate to the project directory:
cd Gated-Video-Editor
  1. Install the required packages:
pip install -r requirements.txt

Usage

  1. Run the run.py script and follow the prompts:
python run.py
  1. Alternatively, you can use the Gate-Engine.py script with command line arguments. See below for a list of arguments:
python Gate-Engine.py --input_file INPUT_FILE --output_file OUTPUT_FILE --sounded_speed 1 --silent_speed 999999 --frame_margin 3 --frame_rate FRAME_RATE

Docker Setup

  1. Build the Docker image:
docker build -t gated-video-editor .
  1. Run the Docker container:
docker run -it --rm -v /path/to/your/video/files:/app gated-video-editor
  1. Replace /path/to/your/video/files with the path to the directory containing your video files. This will mount the directory inside the container.

License

This project is released under the MIT License.

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.