Skip to main content

Cross-platform command-line WebM converter

Project description

webm.py PyPI version Build Status

Cross-platform command-line WebM converter.

Features

  • No Python dependencies, single source file
  • Supports encoding to VP8, VP9 and AV1, with Opus or Vorbis
  • 2-pass encoding, user-friendly defaults, flexible set of options
  • Provides graphical interactive mode to cut/crop input video with mpv
  • Can burn subtitles, fit to limit, use external audio track and many more

Requirements

  • Python 2.7+ or 3.2+
  • FFmpeg 2+ compiled with libvpx and libopus
  • mpv 0.17+ compiled with Lua support, for interactive mode only

Make sure to set Add to PATH option in Python for Windows installer.

FFmpeg and mpv executables must be in PATH or set their location with WEBM_FFMPEG and WEBM_MPV environment variables.

Installation

pip install webm

Or just save https://raw.githubusercontent.com/Kagami/webm.py/master/webm.py and put in your PATH.

Windows, Python 2 and non-ASCII filenames

Unicode filenames won't work on Windows with Python 2 due to Python bugs. Use Python 3 if you can but if not an option set PYTHONIOENCODING environment variable to utf-8 and run:

pip install subprocessww

Usage

Show help:

webm -h

Examples:

# VP9 with default quality
webm -i in.mkv

# Fit to 10 megabytes
webm -i in.mkv -l 10

# Set 1000kbps video bitrate
webm -i in.mkv -vb 1000

# Change quality
webm -i in.mkv -crf 20

# Encode to AV1
webm -i in.mkv -av1

# Encode to VP8 & Vorbis
webm -i in.mkv -vp8

Interactive mode

Pass -p flag to interactively select cut frargment and crop area with mpv. Show help for interactive mode:

webm -hi

Related links

webm.py wiki contains some encoding tricks and links to documentation on WebM/VPx.

License

webm.py is licensed under CC0.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

webm-0.12.0.tar.gz (20.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

webm-0.12.0-py2.py3-none-any.whl (20.7 kB view details)

Uploaded Python 2Python 3

File details

Details for the file webm-0.12.0.tar.gz.

File metadata

  • Download URL: webm-0.12.0.tar.gz
  • Upload date:
  • Size: 20.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.11.0 pkginfo/1.4.2 requests/2.18.4 setuptools/36.7.2 requests-toolbelt/0.8.0 tqdm/4.23.3 CPython/3.6.6

File hashes

Hashes for webm-0.12.0.tar.gz
Algorithm Hash digest
SHA256 31ff78595b3dc49e4b68b086831b47afb28034e860613a9a849d28236ceed256
MD5 7092efac6bd868e1c4fcfca6da436307
BLAKE2b-256 184361afdc1bcf98ca744c1fa0e61af0ce5d626c4db189074c44527ef03de20d

See more details on using hashes here.

File details

Details for the file webm-0.12.0-py2.py3-none-any.whl.

File metadata

  • Download URL: webm-0.12.0-py2.py3-none-any.whl
  • Upload date:
  • Size: 20.7 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.11.0 pkginfo/1.4.2 requests/2.18.4 setuptools/36.7.2 requests-toolbelt/0.8.0 tqdm/4.23.3 CPython/3.6.6

File hashes

Hashes for webm-0.12.0-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 0e831f249ee96087c61af44b6d6e8d3577897df1d4e604d879de2a8a3664b469
MD5 45956401a9056efcd0e730c857019fbc
BLAKE2b-256 72fc8c9f7a57651eed21d6f75803c1ab3e92b285844a43344f4979881ec3815d

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page