halfsize
v0.2.0Compress a video to an exact byte size locally with FFmpeg, then measure VMAF and SSIM.
These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.
compress_video Compress a video to an exact size
Compress a local video file to a target size (for example 20mb for Discord or WeChat, 16mb for WhatsApp, 18mb for email) and return the measured quality loss (VMAF/SSIM). Runs entirely on this machine: nothing is uploaded. Use it when a video will not fit through an upload limit.
| Parameter | Type | Description |
|---|---|---|
input * | string | Path to the local video file. |
target * | string | Target size, e.g. 20mb, 16mb, 800k, 1.5gb. No unit means MB. |
codec | string | h264 (default) or h265 (smaller). |
dryRun | boolean | Only return the plan (bitrate, resolution, warnings) without encoding. |
output | string | Output path. Defaults to <input>.<target>.mp4 next to the input. |
verify | boolean | Measure VMAF/SSIM after encoding. Defaults to true; false is faster. |