{
  "slug": "video-target-filesize-encoder",
  "name": "gizza-ai/video-target-filesize-encoder",
  "version": "0.1.0",
  "title": "Compress Video to a Target File Size (MB) — gizza.ai",
  "description": "Set an MB budget and it computes the H.264 bitrate from your clip's length to fit under it — for Discord, email or WhatsApp. Runs in your browser, nothing uploaded.",
  "tags": [
    "video",
    "compress",
    "file size",
    "target size",
    "mb",
    "discord",
    "email",
    "bitrate",
    "mp4"
  ],
  "category": "video",
  "urls": {
    "page": "https://gizza.ai/tools/video-target-filesize-encoder/",
    "markdown": "https://gizza.ai/tools/video-target-filesize-encoder/index.md",
    "descriptor": "https://gizza.ai/tools/video-target-filesize-encoder/tool.json",
    "deep_link_example": "https://gizza.ai/tools/video-target-filesize-encoder/?url=https://example.com/input&target_mb=10&audio_kbps=128&scale=keep"
  },
  "cli": "gizza tool video-target-filesize-encoder 'url=https://example.com/input' 'target_mb=10' 'audio_kbps=128' 'scale=keep'",
  "tool": {
    "description": "Re-encode a video so its file lands UNDER a chosen size budget (target_mb, e.g. 10 for Discord or 25 for email). Provide either url (HTTP/HTTPS) or ref (id from a prior tool call). The tool probes the clip duration, computes the H.264 video bitrate that fits the budget minus the audio (audio_kbps: none/64/96/128/192/320), optionally caps the height (scale: keep/1080/720/480/360), and outputs MP4 (H.264/AAC). Single-pass bitrate targeting — highly-compressible clips land comfortably under, never over. Not true two-pass VBR.",
    "parameters": {
      "additionalProperties": false,
      "oneOf": [
        {
          "required": [
            "url"
          ]
        },
        {
          "required": [
            "ref"
          ]
        }
      ],
      "properties": {
        "audio_kbps": {
          "default": "128",
          "description": "Audio bitrate in kbps, or \"none\" to drop audio and spend the whole budget on video: none / 64 (voice) / 96 / 128 (default) / 192 / 320.",
          "enum": [
            "none",
            "64",
            "96",
            "128",
            "192",
            "320"
          ],
          "type": "string"
        },
        "ref": {
          "description": "Reference id from a prior tool call. Use either url or ref.",
          "type": "string"
        },
        "scale": {
          "default": "keep",
          "description": "Cap the output height (shrink only, keeps aspect): keep (default, source size) / 1080 / 720 / 480 / 360. Lower it when the target can't be met at full resolution.",
          "enum": [
            "keep",
            "1080",
            "720",
            "480",
            "360"
          ],
          "type": "string"
        },
        "target_mb": {
          "description": "Target maximum output size in MB, e.g. 10 (Discord) or 25 (email). The tool computes the H.264 bitrate from the clip duration so the MP4 lands just under this budget. Range 0.1-25 MB.",
          "maximum": 25,
          "minimum": 0.1,
          "type": "number"
        },
        "url": {
          "description": "Video URL (HTTP/HTTPS). Use either url or ref.",
          "type": "string"
        }
      },
      "required": [
        "target_mb"
      ],
      "type": "object"
    }
  }
}