media_convert
Convert video and audio files between formats using presets for MP4, WebM, GIF, Instagram Reels, and YouTube Shorts, with dry-run planning and output verification.
Instructions
Convert video and audio files between formats. Includes presets for web MP4 (H.264/AAC), WebM (VP9/Opus), animated GIF, Instagram Reels (9:16), and YouTube Shorts (9:16). Supports dryRun plan inspection and verified output probing.
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": "media_convert"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| crf | No | Quality factor from 0 to 51. Lower numbers mean higher quality. Default: 23 for MP4, 30 for WebM. | |
| fps | No | Target frame rate in frames per second, such as 30, 60, or 15 | |
| dryRun | No | Plan-before-encode: returns planned FFmpeg command, parameters, and target output without writing files. | |
| preset | No | Encoding preset: 'web_mp4' for browser playback, 'webm' for WebM video, 'gif' for animated GIF, 'instagram_reel' (9:16 vertical 30fps), 'youtube_shorts' (9:16 vertical 60fps), or 'auto'. Default: 'auto'. | |
| inputPath | Yes | Path to the source media file to convert | |
| outputPath | Yes | Destination path for the converted file (e.g. ./output.mp4, ./output.webm, ./animation.gif) | |
| resolution | No | Target size formatted as 'WIDTHxHEIGHT', such as '1920x1080' or '1280x720' | |
| hardwareAcceleration | No | Use hardware-accelerated video encoding (VideoToolbox, NVENC, QSV, etc.) when available. Default: true. |