Coder Social home page Coder Social logo

lrml / video-audio-tools Goto Github PK

View Code? Open in Web Editor NEW

This project forked from hezhang1994/video-audio-tools

0.0 1.0 0.0 13.75 MB

To process/edit video and audio with Python+FFmpeg. [简单实用] 基于Python+FFmpeg的视频和音频的处理/剪辑。

License: MIT License

Python 100.00%

video-audio-tools's Introduction

Video and Audio Processing/Editing

image image image

English Version | 中文版

This is a Python implementation of processing/editing video and audio with FFmpeg libraries.

Many thanks to FFmpeg and its contributors. For more related information, please visit FFmpeg website.

Table of Contents

Functions

  • Extracting the audio from a video.

  • Adding the audio to a video that contains no audio.

  • Removing the audio from a video.

  • Converting the format of audio.

  • Cutting video or audio into clips.

  • Merging video or audio clips.

Dependencies

  • ffmpeg 4.1.1 (for Linux)
  • ffmpeg 4.1.3 (for Mac)

Install FFmpeg for Linux

  • Installation
$ sudo apt-get install ffmpeg
  • Upgrade (if applicable)
# The latest version of FFmpeg is 4.1.x (11th April 2019).
$ sudo add-apt-repository ppa:jonathonf/ffmpeg-4
$ sudo apt update && sudo apt upgrade

Install FFmpeg for Mac

  • Installation
# Install homebrew.
$ /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
# Install FFmpeg via homebrew.
$ brew install ffmpeg
  • Upgrade (if applicable)
# Upgrade FFmpeg via homebrew.
$ brew update && brew upgrade ffmpeg

Usage

Specify the path/name of input and output media in the code (see comments).

Video and Audio Processing

Please use the code provided in VideoAudio_Processing/.

  • To extract the audio from a video, run run_VAP_extract.py.

  • To add the audio to a video, run run_VAP_add.py.

  • To remove the audio from a video, run run_VAP_remove.py.

  • To convert the format of audio, run run_VAP_convert.py.

Video and Audio Editing

Please use the code provided in VideoAudio_Editing/.

  • To cut video or audio into clips, run run_VAE_Video_01Clip.py or run_VAE_Audio_01Clip.py.

  • To merge video or audio clips, run run_VAE_Video_02Merge.py or run_VAE_Audio_02Merge.py.


Please report an issue if you have any question about this repository, I will respond ASAP.

Please star this repository if you found its content useful. Thank you very much. ^_^

video-audio-tools's People

Contributors

hezhang1994 avatar

Watchers

James Cloos 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.