trim_video
Cut a video clip to an exact duration or start/end times. Useful for fitting b-roll to a voiceover segment length. Returns verified actual duration.
Instructions
Frame-accurately cut a clip to an exact span (re-encode, not -c copy).
Provide EITHER duration_s (keep [0, duration_s]) OR start_s+end_s.
Use this to cut a generated b-roll clip down to a voiceover segment's
length. Resolution/fps/aspect are preserved; a silent clip stays silent.
Returns the ffprobe-verified actual duration.
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": {
"video_path": "<video_path>",
"output_path": "<output_path>"
},
"name": "trim_video"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| end_s | No | ||
| start_s | No | ||
| duration_s | No | ||
| video_path | Yes | ||
| output_path | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||