# halfsize

halfsize is an MCP server for Claude Code that compresses videos to a specified size and measures the result with VMAF and SSIM. Files stay local and FFmpeg handles the encoding.

- MCP server · `type=mcp` · Claude Code, Codex, Cursor, GitHub Copilot, Windsurf (Devin Desktop), Cline, Zed, Gemini CLI · ★ 123 repo stars
- Author: YKLovePython
- License: MIT · policy=link-only · description only; the file stays with the author
- Source: https://github.com/YKLovePython/halfsize
- Updated: 2026-11-15
- Security check: automated, 2026-11-24 (text) — no signs of malicious code found.
- HTML: https://affpapa.org/en/nevibecode/mcp/halfsize

## What it does

halfsize compresses a video to a target size, then reports quality scores from VMAF and SSIM. It chooses a bitrate and resolution before encoding in two passes. Processing happens locally; the video is not uploaded to a third-party server.

Running it through `npx` requires Node.js 18 or later. FFmpeg comes with the install; if it cannot be downloaded, halfsize uses a system installation instead. On Windows, `halfsize.exe` from the archive that includes FFmpeg runs without Node.js.

## Requirements
- Needs: Node.js (commands run via npx)

## Install

### Claude Code (native platform)

**Platform CLI**
```bash
claude mcp add halfsize -- npx -y halfsize
```

### Codex

**Platform CLI**
```bash
codex mcp add halfsize -- npx -y halfsize
```

### Cursor

**Config file**
File `.cursor/mcp.json`:
```json
{
    "mcpServers": {
        "halfsize": {
            "command": "npx",
            "args": [
                "-y",
                "halfsize"
            ]
        }
    }
}
```

### GitHub Copilot

**Config file**
File `.vscode/mcp.json`:
```json
{
    "servers": {
        "halfsize": {
            "type": "stdio",
            "command": "npx",
            "args": [
                "-y",
                "halfsize"
            ]
        }
    }
}
```

### Gemini CLI

**Platform CLI**
```bash
gemini mcp add halfsize npx -y halfsize
```

## When to use it
- compressing video to a target size
- checking video quality after compression
- fitting a video within a Discord or WhatsApp limit
- getting a JSON compression report

## Example prompts
- Compress `video.mp4` to 25 MB and report its quality scores.
- Prepare `recording.mp4` for Discord’s file limit.
- Compress several videos to 10 MB and return the results as JSON.

## Similar
- [Search Google Flights](https://affpapa.org/en/nevibecode/mcp/search-google-flights.md) — MCP server · 2595 installs
- [Gmail](https://affpapa.org/en/nevibecode/mcp/gmail-gmail.md) — MCP server · 57738 installs
- [OneSignal](https://affpapa.org/en/nevibecode/mcp/onesignal.md) — MCP server · 22491 installs
- [Google Calendar](https://affpapa.org/en/nevibecode/mcp/googlecalendar-google-calendar.md) — MCP server · 15718 installs
- [Slack](https://affpapa.org/en/nevibecode/mcp/slack-slack.md) — MCP server · 12110 installs
- [Framesail](https://affpapa.org/en/nevibecode/mcp/framesail.md) — MCP server · 11533 installs

From the same set: [yklovepython/halfsize](https://affpapa.org/en/nevibecode/by/yklovepython/halfsize.md) — 2 cards

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
