Skip to main content

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

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

License

webm.py is licensed under CC0.

Metadata

Release files for webm 0.12.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for webm 0.12.1
File Size Uploaded
webm-0.12.1.tar.gz 20.6 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for webm 0.12.1
File Interpreter ABI Platform
webm-0.12.1-py2.py3-none-any.whl Python 2, Python 3 none any Details

Total release size: 41.4 kB

Release files / webm-0.12.1.tar.gz

Download URL webm-0.12.1.tar.gz
Size 20.6 kB
Tags Source
SHA-256 checksum
How to use checksums
72673601608981bede50afc13252f09d22681affff77711ed448bf847c431478
BLAKE2b-256 checksum
How to use checksums
36c0212cd62c2373a757b02614c4a9cd3c2b6a02851f9de02ca1b1cce4096182
Upload date
Uploaded using Trusted Publishing?
What is 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

Release files / webm-0.12.1-py2.py3-none-any.whl

Download URL webm-0.12.1-py2.py3-none-any.whl
Size 20.7 kB
Tags Python 2 Python 3
SHA-256 checksum
How to use checksums
105e347c669a119c9d5f7e68078c5bdc4105928630a01da968851a81af881963
BLAKE2b-256 checksum
How to use checksums
efbde40ea9011461276fc7613c71d8402084595bb1895135e7c3fd079da2481a
Upload date
Uploaded using Trusted Publishing?
What is 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

Release history Release notifications | RSS feed

This release

0.12.1 This release

2 release files

0.12.0

2 release files

0.11.0

1 release file

0.10.0

1 release file

0.9.1

1 release file

0.9.0

1 release file

0.8.2

1 release file

0.8.1

1 release file

0.8.0

1 release file

0.7.1

1 release file

0.7.0

1 release file

0.6.1

1 release file

0.6.0

1 release file

0.5.1

0.5.0

1 release file

0.4.1

1 release file

0.4.0

1 release file

0.3.4

1 release file

0.3.3

1 release file

0.3.2

1 release file

0.3.1

1 release file

0.3.0

1 release file

0.2.1

1 release file

0.1.2

1 release file

0.1.1

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page