{
  "id": "handbrake",
  "name": "HandBrake",
  "homepage": "https://handbrake.fr",
  "description": "HandBrake is an open-source, GPL-licensed, multiplatform, multithreaded video transcoder.",
  "icon": "https://handbrake.fr/img/logo.png",
  "executables": [
    "HandBrakeCLI",
    "ghb"
  ],
  "dotfiles": {
    "paths": [
      "[preferences]/fr.handbrake.HandBrake.plist",
      "~/Library/Application Support/HandBrake/UserPresets.json",
      "~/Library/Containers/fr.handbrake.HandBrake/Data/Library/Application Support/HandBrake/UserPresets.json",
      "~/.config/ghb/presets.json",
      "~/.config/ghb/preferences.json",
      "%APPDATA%/HandBrake/presets.json",
      "%APPDATA%/HandBrake/settings.json"
    ],
    "exclude": [],
    "secret": []
  },
  "commands": {
    "format": 1,
    "label": "Transcode video",
    "description": "Encode a video file or disc with HandBrakeCLI. Covers source, container, video encoder and quality, audio track selection and picture size; filters, subtitles and per-codec tuning are left out.",
    "quality": "ai-draft",
    "parser": {
      "end_of_options": "--",
      "interleave": "permute",
      "long_equals": true,
      "short_attached": true,
      "short_bundles": false
    },
    "source": [
      {
        "id": "help",
        "kind": "manual",
        "url": "https://manpages.debian.org/unstable/handbrake-cli/HandBrakeCLI.1.en.html",
        "revision": "2026-10-27",
        "evidence": "Syntax: HandBrakeCLI [options] -i <device> -o <file>\n  -Z. --preset <string>\n  -i, --input <string>\n  Set input device\n  -t, --title <number>\n  Select a title to encode (0 to scan all titles only, default: 1)\n  -o, --output <string>\n  Set output file name\n  -f, --format <string>\n  Set output format (mp4/mkv, default: autodetected from file name)\n  -m, --markers\n  Add chapter markers (mp4 and mkv output formats only)\n  -e, --encoder <string>\n  Set video library encoder Options: x264 / ffmpeg4 / ffmpeg2 / theora\n  --x264-preset <string>\n  ultrafast / superfast / veryfast / faster / fast / medium / slow / slower / veryslow / placebo\n  -q, --quality <number>\n  Set video quality\n  -b, --vb <kb/s>\n  Set video bitrate (default: 1000)\n  -2, --two-pass\n  Use two-pass mode\n  -r, --rate\n  -a, --audio <string>\n  Select audio track(s), separated by commas (\"none\" for no audio,\n  -w, --width <number>\n  Set picture width\n  -l, --height <number>\n  Set picture height\n  --crop <T:B:L:R>\n  -v, --verbose <#>\n  Be verbose (optional argument: logging level)\n"
      }
    ],
    "field": [
      {
        "id": "input",
        "label": "Input file or device",
        "type": "path",
        "path": {
          "kind": "any",
          "role": "input"
        },
        "option": [
          "--input",
          "-i"
        ],
        "sources": [
          "help"
        ]
      },
      {
        "id": "output",
        "label": "Output file",
        "type": "path",
        "path": {
          "kind": "file",
          "role": "output"
        },
        "option": [
          "--output",
          "-o"
        ],
        "effect": "overwrite",
        "sources": [
          "help"
        ]
      },
      {
        "id": "preset",
        "label": "Preset",
        "description": "Built-in preset name; capitalization matters.",
        "type": "string",
        "option": [
          "--preset",
          "-Z"
        ],
        "sources": [
          "help"
        ]
      },
      {
        "id": "format",
        "label": "Container",
        "type": "enum",
        "choices": [
          {
            "value": "mp4",
            "label": "MP4"
          },
          {
            "value": "mkv",
            "label": "MKV"
          }
        ],
        "option": [
          "--format",
          "-f"
        ],
        "sources": [
          "help"
        ]
      },
      {
        "id": "encoder",
        "label": "Video encoder",
        "type": "string",
        "option": [
          "--encoder",
          "-e"
        ],
        "suggestions": [
          {
            "value": "x264",
            "label": "x264"
          },
          {
            "value": "ffmpeg4",
            "label": "ffmpeg4"
          },
          {
            "value": "ffmpeg2",
            "label": "ffmpeg2"
          },
          {
            "value": "theora",
            "label": "Theora"
          }
        ],
        "sources": [
          "help"
        ]
      },
      {
        "id": "x264_preset",
        "label": "x264 speed preset",
        "type": "string",
        "option": [
          "--x264-preset"
        ],
        "suggestions": [
          {
            "value": "ultrafast",
            "label": "ultrafast"
          },
          {
            "value": "veryfast",
            "label": "veryfast"
          },
          {
            "value": "fast",
            "label": "fast"
          },
          {
            "value": "medium",
            "label": "medium"
          },
          {
            "value": "slow",
            "label": "slow"
          },
          {
            "value": "veryslow",
            "label": "veryslow"
          }
        ],
        "sources": [
          "help"
        ]
      },
      {
        "id": "quality",
        "label": "Video quality",
        "type": "number",
        "option": [
          "--quality",
          "-q"
        ],
        "sources": [
          "help"
        ]
      },
      {
        "id": "bitrate",
        "label": "Video bitrate (kb/s)",
        "type": "integer",
        "option": [
          "--vb",
          "-b"
        ],
        "sources": [
          "help"
        ]
      },
      {
        "id": "two_pass",
        "label": "Two-pass",
        "type": "boolean",
        "option": [
          "--two-pass",
          "-2"
        ],
        "sources": [
          "help"
        ]
      },
      {
        "id": "title",
        "label": "Title",
        "description": "0 scans all titles only.",
        "type": "integer",
        "option": [
          "--title",
          "-t"
        ],
        "sources": [
          "help"
        ]
      },
      {
        "id": "audio",
        "label": "Audio tracks",
        "description": "Comma separated track numbers, or none.",
        "type": "string",
        "option": [
          "--audio",
          "-a"
        ],
        "sources": [
          "help"
        ]
      },
      {
        "id": "width",
        "label": "Width",
        "type": "integer",
        "option": [
          "--width",
          "-w"
        ],
        "sources": [
          "help"
        ]
      },
      {
        "id": "height",
        "label": "Height",
        "type": "integer",
        "option": [
          "--height",
          "-l"
        ],
        "sources": [
          "help"
        ]
      },
      {
        "id": "markers",
        "label": "Chapter markers",
        "type": "boolean",
        "option": [
          "--markers",
          "-m"
        ],
        "sources": [
          "help"
        ]
      }
    ],
    "task": [
      {
        "id": "preset",
        "label": "Encode with a preset",
        "fields": [
          "input",
          "output",
          "preset"
        ],
        "required": [
          "input",
          "output",
          "preset"
        ]
      },
      {
        "id": "x264_crf",
        "label": "x264 constant quality",
        "fields": [
          "input",
          "output",
          "encoder",
          "quality",
          "x264_preset",
          "markers"
        ],
        "required": [
          "input",
          "output",
          "quality"
        ],
        "set": {
          "encoder": [
            "x264"
          ]
        }
      }
    ],
    "group": [
      {
        "id": "basic",
        "label": "Basic",
        "fields": [
          "input",
          "output",
          "preset",
          "format",
          "quality",
          "markers"
        ]
      },
      {
        "id": "advanced",
        "label": "Advanced",
        "fields": [
          "encoder",
          "x264_preset",
          "bitrate",
          "two_pass",
          "title",
          "audio",
          "width",
          "height"
        ]
      }
    ]
  }
}
