convert_video
Convert video files between formats, with optional trimming, resizing, bitrate adjustments, subtitle burn-in, and frame extraction.
Instructions
Convert video files. Input: mp4, webm, avi, mov, mkv, flv, wmv, m4v, 3gp, ts, m2ts, vob, ogv, hevc/h265. Output: mp4, webm, avi, mov, mkv, gif, ts, ogv, flv, hevc. Supports: trim, resize, fps, bitrate, CRF, preset, hardware acceleration, subtitle burn-in, frame extraction.
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": "convert_video"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| crf | No | Constant Rate Factor 0-51 (optional, lower=better quality) | |
| fps | No | Frames per second (optional) | |
| preset | No | Encoding preset: ultrafast, fast, medium, slow (optional) | |
| hwAccel | No | Enable hardware acceleration (optional) | |
| noAudio | No | Strip audio (optional) | |
| duration | No | Trim duration e.g. '00:02:00' (optional) | |
| frameRate | No | Frames per second to extract (optional, default 1) | |
| inputPath | Yes | Absolute path to input video file | |
| startTime | No | Trim start e.g. '00:01:30' (optional) | |
| audioCodec | No | Force audio codec e.g. aac, libopus (optional) | |
| outputPath | Yes | Absolute path for output file (include extension) | |
| resolution | No | Output resolution e.g. '1920x1080' (optional) | |
| videoCodec | No | Force video codec e.g. libx264, libx265, libvpx-vp9 (optional) | |
| audioBitrate | No | Audio bitrate e.g. '128k' (optional) | |
| subtitlePath | No | Path to .srt or .ass subtitle file to burn in (optional) | |
| videoBitrate | No | Video bitrate e.g. '2000k' (optional) | |
| extractFrames | No | Extract frames as images (optional) |