:film_strip: Cross-platform command-line WebM converter
Cross-platform command-line WebM converter.
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 withWEBM_FFMPEG
and WEBM_MPV
environment variables.
pip install webm
Or just save https://raw.githubusercontent.com/Kagami/webm.py/master/webm.py
and put in your PATH
.
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
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
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.
webm.py is licensed under CC0.