Giter Site home page Giter Site logo

webmgen's Introduction

README

This script converts the given input file to webm. It's a wrapper around ffmpeg with the purpose of being easier to use when doing simple conversions. Files are encoded with VP8/Vorbis (two-pass).

Features

  • Set video and audio bitrate
  • Downscale resolution
  • Limit output size
  • Split output into multiple files of given size
  • Cut video before encoding

Examples

Convert to webm using default encoding settings (-b 1M, -a 128K):

webmgen input.mp4

Set video and audio bitrate to 2 Mb/s and 256 Kb/s respectively:

webmgen -b 2M -a 256K input.mp4

Limit file size to 5 MB:

webmgen -s 5M input.mp4

Cut first 30 seconds of video before converting:

webmgen -c ,00:00:30 input.mp4

Split into multiple files of size 500 KB:

webmgen -p -s 500K input.mp4

Downscale resolution to 720p, keeping aspect ratio:

webmgen -r 720 input.mp4

Usage

Usage: webmgen [OPTIONS] FILE
Convert FILE to VP8-encoded webm.
Output is saved in the same directory of FILE, unless -d option is used.
Where appropriate, options accept the following unit prefixes: K, M, G.

Options:
  -r RESOLUTION     vertical RESOLUTION (keeps aspect ratio)
  -b BITRATE        video BITRATE (default: 1M)
  -a BITRATE        audio BITRATE (default: 128K)
  -s SIZE           SIZE of output file(s), expressed in bytes. Actual size can be slightly more
                    or less than requested size. If -p is not set, bitrate specified by -b is ignored.
  -p                split output into multiple files. Requires -s.
  -c [START],[END]  cut input file from START to END before encoding.
                    START, END are formatted as HH:MM:SS; only one can be omitted.
  -d DIRECTORY      output DIRECTORY (default: directory of input FILE)
  -t THREADS        number of threads to use for encoding (default: one less than the number of CPUs)
  -v                verbose mode
  -h                show help and exit

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.