video_trim
Cut a segment from a longer video by specifying start time and duration or end time, then save the resulting clip to an output path.
Instructions
Trim a video clip by start time and duration. Returns JSON {success, output_path} pointing at the rendered clip. Use to cut a segment out of a longer video. Pass input_path as the absolute path to the source video (e.g. from video_info), start as a timestamp, and duration or end to define the segment.
Args: input_path: Absolute path to the input video. start: Start timestamp (e.g. '00:02:15') or numeric seconds (e.g. 10.5). duration: Duration to keep (e.g. '00:00:30' or '30'). Exclusive with end. end: End timestamp. Exclusive with duration. output_path: Where to save the trimmed video. Auto-generated if omitted. accurate: Frame-accurate seeking (slower). Default False uses fast input seeking which may land on the nearest keyframe.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| end | No | ||
| start | No | 0 | |
| accurate | No | ||
| duration | No | ||
| overwrite | No | Explicitly allow replacing existing media. Existing non-media files are protected. | |
| input_path | Yes | ||
| output_path | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||