Set clip duration
set_clip_durationChange a clip's timeline length to an exact duration by moving only its end, with optional ripple editing to shift later clips and keep tracks in sync.
Instructions
Make a clip exactly duration seconds long by moving its end (the start and source in point stay; speed does not change). ripple=false (default) leaves a gap when shortening and stops at the next clip when lengthening. With ripple=true everything that starts at or after the clip's old end, on all tracks, shifts by the change so the sequence stays in sync (a track where that would make clips collide is left alone and listed in tracks_not_rippled). Video and audio cannot grow past the end of their source media (stills can): the result reports the real duration. include_linked (default true) applies the same to the linked audio/video clips. For many clips use set_clips_duration. Returns the clip.
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": {
"duration": "<duration>"
},
"name": "set_clip_duration"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ripple | No | Shift all later clips on every track by the change. Default false. | |
| clip_id | No | Stable clip id (from get_sequence_structure / list_clips). Preferred. | |
| duration | Yes | New length of the clip on the timeline, in seconds. Snapped to a frame. | |
| clip_index | No | 0-based index of the clip in its track's clip list, as reported by list_clips / get_sequence_structure. Usually time order, but a moved clip can keep its old index, and indices shift after edits: prefer clip_id. | |
| track_type | No | Used with track_index + clip_index when clip_id is not given. Default "video". | |
| sequence_id | No | Stable sequence id (from list_sequences). Omit to use the active sequence. | |
| track_index | No | 0-based track index (0 = V1 or A1). | |
| sequence_name | No | Sequence name; used only when sequence_id is not given. | |
| include_linked | No | Also resize the clips linked to this one (the audio of a video clip, or the video of an audio clip). Default true. |