Repository navigation
Two new flags, both about getting out of the way.
halfsize --fix
npm install can succeed while the FFmpeg download behind it silently fails (proxy, TLS-inspecting antivirus, blocked GitHub). The result is a CLI that starts and then cannot encode — and reinstalling does not help, because npm has already decided it succeeded.
--fix fetches the same published builds, verifies each archive against the sha256 in the ffmpeg-static release, and unpacks it into a per-user cache:
- Windows
%LOCALAPPDATA%\halfsize\Cache\bin - macOS
~/Library/Caches/halfsize/bin - Linux
~/.cache/halfsize/bin
Global installs, npx runs and local installs all find that one copy. GitHub is tried first, then the npmmirror binary mirror, which is fast in mainland China. A checksum mismatch or a truncated body deletes itself — a failed --fix cannot break a working install.
The missing-FFmpeg error also went from 27 lines to 8: the reason, the one command that fixes it, and where to point HALFSIZE_FFMPEG if downloads are blocked.
halfsize --mcp
A one-tool MCP server on stdio:
{ "mcpServers": { "halfsize": { "command": "npx", "args": ["-y", "halfsize", "--mcp"] } } }The tool is compress_video(input, target, output?, codec?, verify?, dryRun?). It shells out to the same CLI and returns the same JSON report, including the measured VMAF/SSIM, so an agent can say what the size cost instead of guessing a CRF and hoping. No port, no daemon, nothing uploaded. Client setup for Claude Code, Claude Desktop, Cursor and VS Code: https://YKLovePython.github.io/halfsize/mcp/
Also
- Windows on ARM:
ffmpeg-staticpublishes nowin32-arm64build, so halfsize falls back to the x64 binary under the OS emulation layer instead of having none. - Two comparison pages, in both languages: HandBrake and a 20 MB cap (its target-size control was removed in 0.10, so most guides describe a version that no longer ships) and halfsize vs FFmpeg vs HandBrake.
- Scoop and Chocolatey manifests in
packaging/, pinned to this tarball's sha256.
npx halfsize@latest video.mp4 --to 20mb85 tests pass on Windows, macOS and Linux.