compress_video
Compress video files to meet upload limits by specifying a target size or CRF quality level; optionally plan with dryRun and verify output after encoding.
Instructions
Compress video files to fit upload limits (such as GitHub PRs under 10MB or Discord under 25MB) using target file sizes or CRF quality levels. Supports dryRun and post-flight verification.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"inputPath": "<inputPath>",
"outputPath": "<outputPath>"
},
"name": "compress_video"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| crf | No | Quality value between 18 (higher quality) and 45 (smaller file). Overrides preset. | |
| dryRun | No | Plan-before-encode: returns planned FFmpeg command, parameters, and target output without writing files. | |
| preset | No | Preset when targetSizeMB is not set: 'github_pr', 'discord', 'email', 'balanced', or 'high_quality'. Default: 'balanced'. | balanced |
| maxWidth | No | Maximum video width in pixels, such as 1280 for 720p. Keeps aspect ratio. | |
| inputPath | Yes | Path to the source video file (e.g. './recordings/demo.mov') | |
| outputPath | Yes | Destination path for the compressed MP4 file (e.g. './recordings/demo_compressed.mp4') | |
| targetSizeMB | No | Target output size in megabytes, such as 9.5 for GitHub or 24 for Discord. Computes bitrates from duration. | |
| hardwareAcceleration | No | Use hardware-accelerated video encoding (VideoToolbox, NVENC, QSV, etc.) when available. Default: true. |