convert_video
Convert video files to different formats and codecs. Choose from MP4, MKV, WebM, AVI, MOV, and codecs like H.264 or VP9. Control quality with CRF or bitrate.
Instructions
Convert a video to a different container format and/or codec. Supports format changes (mp4, mkv, webm, avi, mov) and codec changes (h264, h265, vp9, av1). Quality can be controlled via CRF or target bitrate.
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": {
"file_path": "<file_path>",
"output_format": "<output_format>"
},
"name": "convert_video"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| crf | No | Constant Rate Factor for quality (0-63; lower = better quality, larger file). Typical values: 18-28 for h264/h265, 28-40 for vp9. | |
| codec | No | Video codec: h264, h265, vp9, av1, or copy (re-container without re-encode) | |
| bitrate | No | Target video bitrate (e.g. '2000k', '5M'). Cannot be used together with crf. | |
| file_path | Yes | Absolute path to the input video file | |
| output_path | No | Absolute path for the output file. Defaults to same directory as input with '_converted' suffix. | |
| output_format | Yes | Output container format: mp4, mkv, webm, avi, or mov |