Skip to main content

Cross-platform command-line WebM converter

Project description PyPI version Build Status

Cross-platform command-line WebM converter.


  • 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


  • 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.


pip install webm

Or just save 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


Show help:

webm -h


# 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 wiki contains some encoding tricks and links to documentation on WebM/VPx.

License 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.1.tar.gz (20.6 kB view hashes)

Uploaded source

Built Distribution

webm-0.12.1-py2.py3-none-any.whl (20.7 kB view hashes)

Uploaded py2 py3

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Huawei Huawei PSF Sponsor Microsoft Microsoft PSF Sponsor NVIDIA NVIDIA PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page