Package: purewebm
PureWebMOriginally written forPureMPV, with this utility it is possible to encode webms from a given input, according to a restricted file size or a default CRF (Constant Rate Factor). If the utility is called whilst encoding, additional webm parameters will be put in a queue using Unix sockets.UsageTo encode a quick webm with the defaults:$purewebm-ss00:00:02.268-to00:00:10.310-i"/tmp/Videos/nijinosaki.mkv"Encoding 1 of 1: 100%Only the video stream will be mapped (no audio) with a size limit of 3MB, and saved under$HOME/Videos/PureWebM.To encode a webm with size limit of 6MB, burned subtitles, and opus audio:$purewebm-i"/tmp/Videos/nijinosaki.mkv"--size_limit6-subs--extra_params'-map 0:a -c:a libopus -b:a 128k'Encoding 1 of 1: 100%It is possible to request usage instructions through the--helpor-hoption flags:$purewebm--helpusage: purewebm [-h] [--version] (--status | --kill | --input INPUT) [--name_type {unix,md5}][--subtitles] [--encoder ENCODER] [--start_time START_TIME] [--stop_time STOP_TIME][--lavfi LAVFI] [--size_limit SIZE_LIMIT] [--crf CRF] [--cpu-used {0,1,2,3,4,5}][--deadline {good,best}] [--extra_params EXTRA_PARAMS][output]Utility to encode quick webms with ffmpegpositional arguments:output                the output file, if not set, the filename will be generated according to--name_type and saved in $HOME/Videos/PureWebMoptions:-h, --help            show this help message and exit--version, -v         show program's version number and exit--status              queries the main process and prints the current status--kill                sends the kill command to the main process; this will terminate allencodings immediately, with no cleanups--input INPUT, -i INPUTthe input file to encode (NOTE: several files can be selected adding more-i flags just like with ffmpeg, these will be only for a single outputfile; to encode different files run this program multiple times, the fileswill be queued in the main process using Unix sockets)--name_type {unix,md5}, -nt {unix,md5}the filename type to be generated if the output file is not set: unix usesthe current time in microseconds since Epoch, md5 uses the filename of theinput file with a short MD5 hash attached (default is unix)--subtitles, -subs    burn the subtitles onto the output file; this flag will automatically usethe subtitles found in the first input file, to use a different file usethe -lavfi flag with the subtitles filter directly--encoder ENCODER, -c:v ENCODERthe encoder to use (default is libvpx-vp9)--start_time START_TIME, -ss START_TIMEthe start time offset (same as ffmpeg's -ss)--stop_time STOP_TIME, -to STOP_TIMEthe stop time (same as ffmpeg's -to)--lavfi LAVFI, -lavfi LAVFIthe set of filters to pass to ffmpeg--size_limit SIZE_LIMIT, -sl SIZE_LIMITthe size limit of the output file in megabytes, use 0 for no limit (defaultis 3)--crf CRF, -crf CRF   the crf to use (default is 24)--cpu-used {0,1,2,3,4,5}, -cpu-used {0,1,2,3,4,5}the cpu-used for libvpx-vp9; a number between 0 and 5 inclusive, the higherthe number the faster the encoding will be with a quality trade-off(default is 0)--deadline {good,best}, -deadline {good,best}the deadline for libvpx-vp9; good is the recommended one, best has the bestcompression efficiency but takes the most time (default is good)--extra_params EXTRA_PARAMS, -ep EXTRA_PARAMSthe extra parameters to pass to ffmpeg, these will be appended making itpossible to override some defaultsLogs are saved under$HOME/.config/PureWebM/PureWebM.logConfiguration fileSome of the default options can be changed using a configuration file namedPureWebM.confin the configuration folder. Changeable options aresize_limit,crf, anddeadline. The following is an example of a configuration file:# ~/.config/PureWebM/PureWebM.confsize_limit=4crf=28deadline=goodInstallationIt can be installed using pip:$pipinstallpurewebmor$gitclonehttps://github.com/4ndrs/PureWebM.git
$cdPureWebM
$pipinstall.Alternatively,pipxcan be used ifPEP 668is enforced:$pipxinstallpurewebm