Git Product home page Git Product logo

videofiletools's Introduction

VideoFileTools

Video file manipulation scripts

videosplit.py

Batch extract all tracks of a given type from Matroska containers. Uses mkvtoolnix (Mac OS: brew install mkvtoolnix) which does the heavy lifting work of parsing and extracting the tracks.

The tracks are tagged by language when exported.

Example

  • Extract all subtitles and place them alongside the mkv files
python videosplit.py --subtitles ~/Movies/*.mkv

ls ~/Movies/
Sintel.mkv
Sintel.3.eng.idx
Sintel.3.eng.sub
Sintel.4.eng.srt
  • Extract all subtitles but save them elsewhere
python videosplit.py --subtitles video1.mkv video2.mkv video3.mkv --dst /tmp

ls /tmp
Sintel.3.eng.idx
Sintel.3.eng.sub
Sintel.4.eng.srt
  • Extract all audio streams, subtitles and chapters from all the mkv files under ~/Movies including subdirectories
python videosplit.py --subtitles --chapters --audio ~/Movies

ls ~/Movies
Sintel.mkv
Sintel.2.eng.m4a
Sintel.3.eng.idx
Sintel.3.eng.sub
Sintel.4.eng.srt
Sintel.chapters.txt

Usage

python videosplit.py --help

usage: videosplit.py [-h] [-d DST] [-n] [--video] [--audio] [--subtitles]
                     [--chapters]
                     files) [file(s ...]

Tool to extract all subtitle or audio tracks from a video into separate files.
Requires: mkvtoolnix (Mac OS: brew install mkvtoolnix)

positional arguments:
  file(s)            mkv file(s)

optional arguments:
  -h, --help         show this help message and exit
  -d DST, --dst DST  save the tracks in other directory (default same as
                     video)
  -n, --dry-run      do not write any files

Extracted tracks types:
  --video            extract video tracks
  --audio            extract audio tracks
  --subtitles        extract subtitles tracks
  --chapters         extract chapters

videofiletools's People

Contributors

laurb9 avatar

Stargazers

 avatar

Watchers

 avatar  avatar

Forkers

jbinkleyj

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.