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.
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 | |||