プロトタイプ · プレビュー版:公式レジストリのすべてのサーバーを掲載し、30分ごとに同期しています。Google でログインするとレビューを書けます。プロトタイプ · 30分ごとに更新
PopNx MCPAIを使う人のためのMCPサーバー · やさしい言葉で解説

halfsize

作者:YKLovePythonバージョン 0.2.0i★ 112iパソコンで動く公式サイト ↗
レジストリ名io.github.YKLovePython/halfsize

インストール方法

What it does

Compress a video to an exact byte size locally with FFmpeg, then measure VMAF and SSIM.

  • Connects パソコンで動く
  • Account or key No key needed
  • Category デザイン・画像・音声

一緒に使える

この種の作業を AI に教える Skill。これと一緒に使えます

impeccable

The design vocabulary for your coding agent. Steer with polish and bolder, review with critique and audit, catch AI slop before it ships.

作者:pbakaus★ 113,0421 個の skill

Skill · 手順書

diagram-design

Editorial diagram design for Claude Code, Codex, GitHub Copilot, Cursor, Factory Droid, Qoder, and Pi. 45 diagram types. Self-contained HTML + SVG. No shadows. No Mermaid slop.

作者:cathrynlavery★ 68,2961 個の skill

Skill · 手順書

frontend-slides

Create beautiful slides on the web using a coding agent's frontend skills

作者:zarazhangrui★ 32,5791 個の skill

Skill · 手順書

この順位の理由

一覧は利用スコア(100 点満点)で並びます。内訳は次のとおり

人気25/80GitHub スターか週間ダウンロード数。大きい方を 60、小さい方を 20 で数えます
新しさ12/1230 日以内のリリースかコード更新で満点
応答中0/8前回の確認でクラウドのエンドポイントが応答
利用スコア37/100

品質: 基本チェック 3/3 項目に合格(表示のみ、並び順には不使用) · 勢い: データなし (「急上昇」タブでのみ使用)

インストール

使っているAIアプリを選んで、設定をコピーしてください。

ひとことで AI にインストールしてもらう

halfsize をインストールして。https://mcp.popnx.com/i/yklovepython-halfsize.md に従い、コマンドを見せて、私が OK するまで実行しないで。

パソコンで作業できる AI(Claude Code や Cursor など)に貼り付けます。手順を読み、コマンドを見せて、あなたの OK を待ちます。キー不要・登録不要。 · AI が読む全文を見る

チェック 3/3 合格 · あなたのパソコンで動きます · ✓ コマンド確認済み 2026年11月19日

まず:どの AI を使っていますか?

使っているアプリを選ぶと、下に手順が表示されます。

Claude につなげますが、先に準備が必要です

先にパソコンへ Node.js を入れてください(1 回だけ) · パソコン版 Claude アプリ(Windows または Mac)のみ。Web やスマホでは使えません

AI にインストールしてもらう

このメッセージを Claude のチャットに貼り付けます。AI がパソコンを確認し、変更するファイルを伝え、毎回あなたの了承を待ちます。

このパソコンの Claude に MCP server halfsize を入れてください。順番に:1) node -v で Node.js があるか確認。なければ https://nodejs.org/en/download から入れるよう私に伝え、自分では入れない。2) この設定だけを使う(PopNx MCP の確認済み):{ "mcpServers": { "halfsize": { "command": "npx", "args": [ "-y", "halfsize", "--mcp" ] } } } 3) 変更するファイルのフルパスか実行するコマンドを伝えて、私の了承を待つ。4) キーは不要。5) 了承した内容を実行し、halfsize のツールが本当に表示されるか確認する。

このメッセージにあなたのキーは含まれません。キーが必要な場合は、AI がファイルやアプリの入力欄にご自身で貼るよう案内します。

  1. Node.js を入れる(まだなければ)

    もう入っていますか?先に確認 · ターミナルを開き、このコマンドを入力して Enter

    node -v
    • バージョン番号(例 v26.13.1)が出る = 入っています。この手順は飛ばせます
    • "command not found"(Windows では "is not recognized")が出る = まだ入っていないか、入れた直後でターミナルを開き直す必要があります
    ターミナルの開き方

    Mac:⌘ + Space を押し、Terminal と入力して Enter

    Windows:スタートメニューを開き、Windows PowerShell と入力して「開く」

    まだ入っていない場合: 公式ダウンロードページで LTS 版と、クリックで進むインストーラーを選びます:Mac は .pkg、Windows は .msi。ダブルクリックして最後まで進めるだけで、curl コマンドは不要です

    Node.js のダウンロードページを開く ↗

    入れ終わったらターミナルを閉じて開き直し、同じコマンドをもう一度実行します。バージョン番号が出れば完了です: node -v

    一度入れれば、Node.js を使うすべてのツールで使えます

  2. パソコン版 Claude アプリの設定ファイルを開く

    SettingsDeveloperEdit Config

  3. この設定を貼り付けて保存

    {
      "mcpServers": {
        "halfsize": {
          "command": "npx",
          "args": [
            "-y",
            "halfsize",
            "--mcp"
          ]
        }
      }
    }
  4. Claude を終了してもう一度開く

  5. 試してみる

    halfsize を使って、私に何ができるか教えて、1 つやってみせて

    ✓ Claude が halfsize を使っていると言うか、回答に halfsize のツール名が出れば接続成功です

メニュー名は 2026年11月11日 に Anthropic のヘルプページで確認 · アプリのバージョンにより画面が少し違うことがあります

ChatGPT はまだ halfsize につなげません

halfsize はパソコンに入れて使うものですが、ChatGPT は Web 上で動くサーバーにしかつなげません

代わりにできること

A · halfsize につなげるアプリを使う

  • 先にパソコンへ Node.js を入れてください(1 回だけ) · パソコン版 Claude アプリ(Windows または Mac)のみ。Web やスマホでは使えません
  • 先にパソコンへ Node.js を入れてください(1 回だけ)
  • 先にパソコンへ Node.js を入れてください(1 回だけ)
  • 先にパソコンへ Node.js を入れてください(1 回だけ)

B · デザイン・画像・音声 の中で ChatGPT につなげる別のサーバー

同じカテゴリでよく使われているものから、キーなしでアドレスだけでつなげるものを選びました

Claude Code につなげますが、先に準備が必要です

先にパソコンへ Node.js を入れてください(1 回だけ)

AI にインストールしてもらう

このメッセージを Claude Code のチャットに貼り付けます。AI がパソコンを確認し、変更するファイルを伝え、毎回あなたの了承を待ちます。

このパソコンの Claude Code に MCP server halfsize を入れてください。順番に:1) node -v で Node.js があるか確認。なければ https://nodejs.org/en/download から入れるよう私に伝え、自分では入れない。2) この設定だけを使う(PopNx MCP の確認済み):claude mcp add --scope user halfsize -- npx -y halfsize --mcp 3) 変更するファイルのフルパスか実行するコマンドを伝えて、私の了承を待つ。4) キーは不要。5) 了承した内容を実行し、halfsize のツールが本当に表示されるか確認する。

このメッセージにあなたのキーは含まれません。キーが必要な場合は、AI がファイルやアプリの入力欄にご自身で貼るよう案内します。

  1. Node.js を入れる(まだなければ)

    もう入っていますか?先に確認 · ターミナルを開き、このコマンドを入力して Enter

    node -v
    • バージョン番号(例 v26.13.1)が出る = 入っています。この手順は飛ばせます
    • "command not found"(Windows では "is not recognized")が出る = まだ入っていないか、入れた直後でターミナルを開き直す必要があります
    ターミナルの開き方

    Mac:⌘ + Space を押し、Terminal と入力して Enter

    Windows:スタートメニューを開き、Windows PowerShell と入力して「開く」

    まだ入っていない場合: 公式ダウンロードページで LTS 版と、クリックで進むインストーラーを選びます:Mac は .pkg、Windows は .msi。ダブルクリックして最後まで進めるだけで、curl コマンドは不要です

    Node.js のダウンロードページを開く ↗

    入れ終わったらターミナルを閉じて開き直し、同じコマンドをもう一度実行します。バージョン番号が出れば完了です: node -v

    一度入れれば、Node.js を使うすべてのツールで使えます

  2. ターミナルを開く

    Mac:Command+スペースで Terminal と入力 · Windows:PowerShell を開く

  3. このコマンドを貼り付けて Enter

    claude mcp add --scope user halfsize -- npx -y halfsize --mcp
  4. Claude Code で /mcp と入力

    halfsize が一覧にあり、接続済みと表示されれば OK です

  5. 試してみる

    halfsize を使って、私に何ができるか教えて、1 つやってみせて

    ✓ Claude Code が halfsize を使っていると言うか、回答に halfsize のツール名が出れば接続成功です

メニュー名は 2026年11月11日 に Anthropic のヘルプページで確認 · アプリのバージョンにより画面が少し違うことがあります

Cursor につなげますが、先に準備が必要です

先にパソコンへ Node.js を入れてください(1 回だけ)

AI にインストールしてもらう

このメッセージを Cursor のチャットに貼り付けます。AI がパソコンを確認し、変更するファイルを伝え、毎回あなたの了承を待ちます。

このパソコンの Cursor に MCP server halfsize を入れてください。順番に:1) node -v で Node.js があるか確認。なければ https://nodejs.org/en/download から入れるよう私に伝え、自分では入れない。2) この設定だけを使う(PopNx MCP の確認済み):{ "mcpServers": { "halfsize": { "command": "npx", "args": [ "-y", "halfsize", "--mcp" ] } } } 3) 変更するファイルのフルパスか実行するコマンドを伝えて、私の了承を待つ。4) キーは不要。5) 了承した内容を実行し、halfsize のツールが本当に表示されるか確認する。

このメッセージにあなたのキーは含まれません。キーが必要な場合は、AI がファイルやアプリの入力欄にご自身で貼るよう案内します。

  1. Node.js を入れる(まだなければ)

    もう入っていますか?先に確認 · ターミナルを開き、このコマンドを入力して Enter

    node -v
    • バージョン番号(例 v26.13.1)が出る = 入っています。この手順は飛ばせます
    • "command not found"(Windows では "is not recognized")が出る = まだ入っていないか、入れた直後でターミナルを開き直す必要があります
    ターミナルの開き方

    Mac:⌘ + Space を押し、Terminal と入力して Enter

    Windows:スタートメニューを開き、Windows PowerShell と入力して「開く」

    まだ入っていない場合: 公式ダウンロードページで LTS 版と、クリックで進むインストーラーを選びます:Mac は .pkg、Windows は .msi。ダブルクリックして最後まで進めるだけで、curl コマンドは不要です

    Node.js のダウンロードページを開く ↗

    入れ終わったらターミナルを閉じて開き直し、同じコマンドをもう一度実行します。バージョン番号が出れば完了です: node -v

    一度入れれば、Node.js を使うすべてのツールで使えます

  2. このボタンで Cursor を開く

    Cursor で開く

    Cursor がインストールの確認をするので Install を押します

  3. Cursor の AI チャットを Agent モードで開く

  4. 試してみる

    halfsize を使って、私に何ができるか教えて、1 つやってみせて

    ✓ Cursor が halfsize を使っていると言うか、回答に halfsize のツール名が出れば接続成功です

メニュー名は 2026年11月11日 に Cursor のヘルプページで確認 · アプリのバージョンにより画面が少し違うことがあります

VS Code につなげますが、先に準備が必要です

先にパソコンへ Node.js を入れてください(1 回だけ)

AI にインストールしてもらう

このメッセージを VS Code のチャットに貼り付けます。AI がパソコンを確認し、変更するファイルを伝え、毎回あなたの了承を待ちます。

このパソコンの VS Code に MCP server halfsize を入れてください。順番に:1) node -v で Node.js があるか確認。なければ https://nodejs.org/en/download から入れるよう私に伝え、自分では入れない。2) この設定だけを使う(PopNx MCP の確認済み):{ "servers": { "halfsize": { "type": "stdio", "command": "npx", "args": [ "-y", "halfsize", "--mcp" ] } } } 3) 変更するファイルのフルパスか実行するコマンドを伝えて、私の了承を待つ。4) キーは不要。5) 了承した内容を実行し、halfsize のツールが本当に表示されるか確認する。

このメッセージにあなたのキーは含まれません。キーが必要な場合は、AI がファイルやアプリの入力欄にご自身で貼るよう案内します。

  1. Node.js を入れる(まだなければ)

    もう入っていますか?先に確認 · ターミナルを開き、このコマンドを入力して Enter

    node -v
    • バージョン番号(例 v26.13.1)が出る = 入っています。この手順は飛ばせます
    • "command not found"(Windows では "is not recognized")が出る = まだ入っていないか、入れた直後でターミナルを開き直す必要があります
    ターミナルの開き方

    Mac:⌘ + Space を押し、Terminal と入力して Enter

    Windows:スタートメニューを開き、Windows PowerShell と入力して「開く」

    まだ入っていない場合: 公式ダウンロードページで LTS 版と、クリックで進むインストーラーを選びます:Mac は .pkg、Windows は .msi。ダブルクリックして最後まで進めるだけで、curl コマンドは不要です

    Node.js のダウンロードページを開く ↗

    入れ終わったらターミナルを閉じて開き直し、同じコマンドをもう一度実行します。バージョン番号が出れば完了です: node -v

    一度入れれば、Node.js を使うすべてのツールで使えます

  2. このボタンで VS Code を開く

    VS Code で開く

    VS Code がインストールの確認をするので Install を押します

  3. VS Code の AI チャットを Agent モードで開く

  4. 試してみる

    halfsize を使って、私に何ができるか教えて、1 つやってみせて

    ✓ VS Code が halfsize を使っていると言うか、回答に halfsize のツール名が出れば接続成功です

メニュー名は 2026年11月11日 に VS Code のヘルプページで確認 · アプリのバージョンにより画面が少し違うことがあります

Windsurf、Zed、Gemini CLI など MCP を使える他のアプリは追加方法がそれぞれ違います。アプリ一覧で確認してください

MCP を使えるアプリをすべて見る →

JSON 設定は下の「開発者向け」にあります

つまずいたら?halfsize を使っている人に聞いてみましょう💬 ディスカッション →
開発者向け:ターミナルのコマンドと JSON 設定

パソコンにインストール

Claude Code

claude mcp add --scope user halfsize -- npx -y halfsize --mcp

Claude Desktop (claude_desktop_config.json)

{
  "mcpServers": {
    "halfsize": {
      "command": "npx",
      "args": [
        "-y",
        "halfsize",
        "--mcp"
      ]
    }
  }
}

Cursor (~/.cursor/mcp.json)

{
  "mcpServers": {
    "halfsize": {
      "command": "npx",
      "args": [
        "-y",
        "halfsize",
        "--mcp"
      ]
    }
  }
}

VS Code (mcp.json)

{
  "servers": {
    "halfsize": {
      "type": "stdio",
      "command": "npx",
      "args": [
        "-y",
        "halfsize",
        "--mcp"
      ]
    }
  }
}

この設定は、作者のレジストリ登録情報から作成しています。READMEと違う場合は、READMEに従ってください。

ひと目でわかる

週あたりのダウンロードi
303/週
接続方法
パソコンで動く
最新バージョンi
0.2.0
レジストリ公開日i
2026年11月19日
コードの最終更新i
2026年11月19日
作者
YKLovePython
パッケージ
npm: halfsize
ウェブサイト
yklovepython.github.io
レジストリでの状態
有効

使えるアプリ

このサーバーのつなぎ方と、各アプリの公式ドキュメントに基づきます。2026年11月10日に確認。

パソコン上で動かせるアプリ

ClaudeGooseLM StudioMsty StudioCherry StudioCursorVS Code + GitHub CopilotVisual StudioWindsurf (Devin Desktop)ZedKiroClineContinueJetBrains AI AssistantClaude CodeCodex CLIGemini CLIOpenCodenodecodeWarpLibreChatRaycast

すべてのアプリと長所・短所 →

できること

パソコンで動くサーバーです。インストールすると、ツール一覧がAIアプリに表示されます。

基本チェックi

誰でも見られる情報をチェックしており、コードは読んでいません。当てはまらない項目は数に入れていません。 · 2026年11月20日にチェック

  • ✓ 合格

    作者とリポジトリが一致

    レジストリ名は、リポジトリを所有するGitHubアカウント YKLovePython で確認済みです

  • ✓ 合格

    今もメンテナンスされている

    コードの最終更新:昨日

  • ✓ 合格

    ライセンスがある

    MITを使用

  • – 対象外

    エンドポイントが応答する

    これはパソコンで動くため、インターネット上のエンドポイントはありません

  • – 対象外

    OAuthでサインイン

    パソコンで動き、代わりにローカルの設定を使います

  • … 未チェック

    ツールの説明に隠れた指示がない

    パソコンで動くサーバーです。ツール一覧を読み取れるのは、インターネット上のエンドポイントがある場合だけです

公開済みの脆弱性(OSV.dev)

まだ確認していません

確認していること → · JSON

作者の方へ:再確認の依頼・情報の誤りの報告
作者向け:README にバッジを付ける

作者の方は、このコードを README に貼れます。バッジはこのページにリンクします。

[![Featured on PopNx MCP](https://mcp.popnx.com/badge/yklovepython-halfsize.svg)](https://mcp.popnx.com/en/servers/yklovepython-halfsize)

話し合い

質問、コツの共有、使えないことの報告ができます。「役に立った」の多い順です。

まだ投稿はありません。最初の質問や共有をどうぞ。

ここの投稿は利用者によるもので、PopNx チームのものではありません。

ログインして投稿

ユーザーレビュー

まだレビューはありません

ログインしてレビューを書く

デザイン・画像・音声のほかのサーバーとの比較i

  • このカテゴリのほかの3313件のうち97%よりスターが多い
  • このカテゴリのほかの3313件のうち97%より最近レジストリに公開
  • 基本チェックの結果が、このカテゴリのほかの3313件のうち99%と同じかそれ以上

レジストリでこのカテゴリにある有効なすべてのサーバーと比較しています。スターは、公開者がリポジトリの所有者である場合だけ数えます。

よくある質問

halfsizeは安全ですか?

当てはまる基本チェック3項目のうち3項目に合格しました。コードは読んでいません。キーやトークンを追加する前に、サーバーがどんなアクセスを求めているかを確認し、必要な権限だけを持つキーを使ってください。

どんなキーやコードが必要ですか?

レジストリには必須のキーは載っていません。ただし、最初に使うときにサインインを求めるサーバーもあります。

パソコンで動きますか、それともクラウドですか?

あなたのパソコンで動きます。必要なときにAIアプリが起動し、データは作者のサーバーを通りません(サーバー自体がオンラインサービスを呼び出す場合を除きます)。

今もメンテナンスされていますか?

GitHubリポジトリの最終更新は昨日、最新バージョン(0.2.0)がレジストリに届いたのは昨日です。

どのアプリで使えますか?

Claude Desktop、Claude Code、Cursor、VS CodeなどのMCP対応アプリで使えます。パソコンにNode.jsも必要です。

代わりに使えるものは?

同じカテゴリには:HyperFrames by HeyGen, Pascal 3D Editor, draw.io, Figma MCP Server, Remocn: Remotion MCP server

似た働きのほかの候補

同じカテゴリでほかの作者のもの。コマンドは確認済み。公式を先に、次にスター順。

カードの見方:↓ 週あたりのダウンロードi★ GitHubスターi3つの柱:レビュー · チェック · 利用状況i更新=最新バージョンをレジストリに公開した日i

HyperFrames by HeyGen

Official HyperFrames by HeyGen: the best AI video editor in chat. Captions, motion graphics, MP4.

作者:heygen-com広く使われている★ 8.7万 リポジトリ全体のスター一昨日更新

クラウドで動く✓ heygen.com

Pascal 3D Editor

Create, inspect, validate, and save editable 3D building scenes with Pascal's MCP server.

作者:pascalorg広く使われている↓ 1037/週★ 2.6万 リポジトリ全体のスター一昨日更新

パソコンでもクラウドでも✓ 提供元 · pascal.app

draw.io

Create draw.io diagrams in chat from Mermaid or XML, shown live and interactive. 10,000+ shapes.

作者:jgraph広く使われている★ 58543 日前更新

クラウドで動く✓ 提供元 · draw.ioPopNx チームが実際に試用

Figma MCP Server

The Figma MCP server brings Figma design context directly into your AI workflow.

作者:figma広く使われている★ 221113 か月前更新

クラウドで動く✓ 提供元 · mcp.figma.com
似たものと比べる
これ
halfsize
HyperFrames by HeyGenPascal 3D Editordraw.ioFigma MCP ServerRemocn: Remotion MCP server
動く場所パソコンにインストールが必要クラウドで動き、インストール不要クラウドでもパソコンにインストールでも使えるクラウドで動き、インストール不要クラウドで動き、インストール不要クラウドで動き、インストール不要
キーが必要いいえいいえいいえいいえいいえいいえ
Claude で + から追加いいえはいいいえいいえはいいいえ
基本チェック3/34/45/54/44/44/4
ライセンスMITApache-2.0MITApache-2.0–MIT
料金登録情報に費用の記載なし登録情報に費用の記載なし登録情報に費用の記載なし登録情報に費用の記載なし登録情報に費用の記載なし登録情報に費用の記載なし

作者のREADME

READMEを開く

作者のリポジトリから書かれたとおりにコピーしたものです。PopNx MCPは内容を確認・推奨していません。HTML、画像、スクリプトは取り除いています。リンクはこのサイトの外へ移動します。

halfsize

Compress any video to any size. Locally. And keep the quality.

中文说明 · Website & guides · Quick start · How it works · FAQ

As featured in 阮一峰《科技爱好者周刊》第 418 期 · 2,500+ downloads on npm

New in 0.2.0: Windows users can download one halfsize.exe and skip Node.js, npm and the installer entirely — CLI, local web app and MCP server in one file. Release notes


WeChat and Discord both stop at 20 MB. Email chokes around the same. So you open a video editor, guess a bitrate, export, check the size, export again, and still can't tell whether the picture got worse.

halfsize turns that into one command:

npx halfsize wedding.mp4 --to 25mb

It computes the bitrate, picks the resolution that actually fits, encodes twice, then measures the result with SSIM and VMAF so you know whether it still looks the same.

  halfsize 0.2.0

source.mp4 23.2 MB 8s 1920x1080 30.00 fps h264

target 2.00 MB plan H.264 960x540 1.81 Mbps audio 128 kbps 2-pass scale 1920x1080 -> 960x540 estimate 1.94 MB (12x smaller) output source.2mb.mp4

measuring quality done in 1s

23.2 MB -> 1.99 MB 12x smaller 0.4% under target VMAF 84.4 SSIM 0.968 slight softening

-> C:\Videos\source.2mb.mp4

Why this exists

"Make it smaller" is a solved problem. "Make it fit in exactly 20 MB, and tell me if it still looks right" is the part every tool makes you guess at.

  • HandBrake is excellent, but it asks you to think in codecs, RF values, and presets.
  • Online compressors work until you remember you just uploaded a private video to a stranger.
  • ffmpeg can do all of this. Nobody remembers the 11 flags, and almost nobody checks VMAF afterwards.

halfsize is the missing 5%: a target size you type, and a quality score you can read.

halfsizeHandBrakeOnline compressors
Fit an exact size✅ one flagmanual bitrate mathusually re-encodes blindly
Tells you the quality cost✅ VMAF + SSIM❌❌
Your file stays on your machine✅✅❌
Scriptable / CI friendly✅ CLI + JSON❌ GUI❌
Learns a new UInoyesyes

Quick start

Windows, without Node.js

Download [`halfsize-0.2.0-win-x64-full.zip`](https://github.com/YKLovePython/halfsize/releases/download/v0.2.0/halfsize-0.2.0-win-x64-full.zip) (82 MB, includes FFmpeg), unzip it anywhere, and run:

halfsize.exe video.mp4 --to 25mb

The smaller halfsize-0.2.0-win-x64.zip (33 MB) is the same program without FFmpeg: run halfsize --fix once and it downloads FFmpeg into your user cache.

The executable is not code-signed — a certificate costs money and this project is free — so Windows may show a SmartScreen warning on first launch.

With Node.js

Requires Node.js 18+. FFmpeg is bundled on first install; if it cannot be downloaded, halfsize uses your system install instead.

# compress to a size

npx halfsize video.mp4 --to 25mb

or just name the app you are uploading to

npx halfsize video.mp4 --for discord

several files in one go

npx halfsize clip1.mp4 clip2.mp4 clip3.mp4 --to 10mb

smaller file, same quality budget

npx halfsize video.mp4 --to 10mb --codec h265

quality-first mode when size does not matter

npx halfsize video.mp4 --crf 23

preview the plan without encoding

npx halfsize video.mp4 --to 25mb --dry-run

machine-readable, for scripts

npx halfsize video.mp4 --to 25mb --json

Install it globally if you will use it more than once:

npm install -g halfsize
In CI

The same compression runs in GitHub Actions, and the quality report lands in the build log:

- uses: YKLovePython/halfsize-action@v1

with: files: artifacts/recording.mp4 args: --to 20mb

halfsize-action on the GitHub Marketplace.

The local web app
npx halfsize --web

Opens http://127.0.0.1:4174 — drag a video in, pick 20 MB / 16 MB / 5 MB or type your own limit, and watch the encode. The file goes to a temporary folder on your own machine; nothing is sent anywhere.

After each run you can download a share card (the image at the top of this README) with the real numbers on it.

Step-by-step guides with measured quality numbers: Discord 20 MB · WhatsApp 16 MB · WeChat 20 MB · email attachments · X / Twitter · any 20 MB limit · FFmpeg target size · compress without uploading.

Which size do I need?
Where it is goingThe capCommand
Discord (free)20 MB per file--for discord
WeChat chat video20 MB--for wechat
WhatsApp, sent as media16 MB--for whatsapp
Gmail attachment25 MB message → 18 MB file--for gmail
Outlook / corporate mail20 MB message → 15 MB file--for outlook
X / Twitter512 MB--for twitter
Anything elsewhatever you type--to 700mb

The email rows are smaller on purpose: base64 makes the attachment about 37% bigger than the file, so an 18 MB MP4 is what fits in a 25 MB message. Caps change; --to always overrides the preset. Full table, with what each cap counts and the measured VMAF at each size: size limits by platform · every target size explained · video size calculator.

Use it from an agent

The repo ships a skill in skills/halfsize/SKILL.md. Install it with the skills CLI so Claude Code, Codex, Cursor, OpenCode and the rest pick it up automatically:

npx skills add YKLovePython/halfsize

Or copy the folder into your agent's skills directory by hand (for Claude Code: .claude/skills/halfsize/). Either way the agent can turn "make this fit in 25 MB" into a compression plus a measured quality report, instead of guessing a bitrate.

If your client speaks MCP instead, halfsize is also a single-tool MCP server:

{

"mcpServers": { "halfsize": { "command": "npx", "args": ["-y", "halfsize", "--mcp"] } } }

That gives the agent one tool, compress_video(input, target, output?, codec?, verify?), backed by the same CLI and the same JSON report. It is stdio only: no port, no daemon, nothing listening. Per-client setup (Claude Code, Claude Desktop, Cursor, VS Code) is on MCP server.

How it works

  1. Probe. Read duration, resolution, frame rate, audio bitrate, rotation, and HDR metadata.
  2. Budget. Total bitrate = target bytes × 8 ÷ duration, minus audio, minus a small container overhead.
  3. Pick a resolution. Walk a ladder from the source size down to 240p and choose the largest one whose pixels fit the budget at that codec's bits-per-pixel target (H.264: 0.072 bpp, H.265: 0.045 bpp). This is why a 12× shrink still looks reasonable: the encoder gets to spend its bits on fewer pixels.
  4. Encode twice. Two-pass ABR with libx264 or libx265. Pass one learns where the bits are needed; pass two spends them. Output is yuv420p, AAC audio, +faststart, and tagged hvc1 for H.265 so it plays on Apple devices. HLG/PQ sources are tone-mapped to SDR BT.709 in the same pass; without that, 8-bit pixels keep their HDR tags and look grey.
  5. Prove it. Sample three points in the video, compute SSIM at each, and VMAF at the midpoint. Compare against thresholds and print a verdict in plain language.
VMAF ≥ 95  indistinguishable

VMAF ≥ 90 looks the same VMAF ≥ 80 slight softening VMAF ≥ 70 visible loss below 70 clearly degraded

VMAF is Netflix's perceptual metric; it correlates with human judgement far better than PSNR or bitrate. It is not magic, but it is a much better answer than "trust me".

What each size costs

Same 60-second 1080p clip, default settings, measured on a normal laptop:

TargetOutputResolutionVideo bitrateVMAFVerdict
20 MB19.45 MB1280×7202.46 Mbps88.3slight softening
16 MB15.59 MB960×5401.94 Mbps84.8slight softening
10 MB9.77 MB960×5401.17 Mbps82.9slight softening
5 MB4.93 MB640×3600.55 Mbps72.0visible loss

Source: 60 s, 1920×1080, 30 fps, 18 Mbps H.264 (136 MB). VMAF is measured against the source at the midpoint, SSIM at three points. Real numbers move with content: a talking head does much better than confetti.

At 20 MB the tool picked 720p on purpose. Sixty seconds of 1080p at 2.4 Mbps looks worse than 720p at the same bits. --no-downscale overrides that, and --codec h265 buys roughly 30% more quality at the same size if your player supports it.

CLI reference

halfsize <file> [options]

--to Target size: 25mb, 700k, 1.5gb --for Target cap for discord, whatsapp, wechat, gmail, outlook, email, twitter --crf Quality mode instead of size mode (18 best, 23 balanced, 28 small) --codec h264 (default, maximum compatibility) or h265 (about 30% smaller) --preset ultrafast .. veryslow (default: medium) --out Output path --no-audio Drop the audio track --no-verify Skip SSIM/VMAF --no-downscale Never reduce resolution (the target may then be missed) --force Encode even when the target is below the minimum for this duration --json Machine-readable result --dry-run Print the plan, do not encode --web Start the local web app --port Port for the web app (default 4174) --doctor Show

冒頭だけを表示しています。続きはリポジトリで読めます