Set transform
clip.set_transformPosition, scale, rotate, fade, flip, crop or fit a video clip over the tracks below (picture-in-picture, overlays, punch-ins). fit none shows a graphic at its own pixel size, so scale 1 is its real size; the default contain scales it to touch the frame edges. Any number takes a constant or {keyframes: [{frame, value, ease}]} with frames from the clip start; a keyframe's ease shapes the move from it to the next one (sine_in_out, cubic_out, back_out, hold and more). Overlays that must follow a zoom or pan: put the clip and its overlays in a timeline of the same shape, nest it with clip.add {nested_timeline_id} and transform the nested clip, so everything moves together. Omitted fields keep their value; null resets one. To pin an overlay to a moving subject, use media.analyze track boxes as keyframes: for each box, frame = timeline frame of the box time (where the tracked clip plays that media second) minus this clip's start, x = box x + w/2 and y = box y + h/2 (add your offset). That holds when the tracked clip fills the frame as is; if it is scaled, moved or cropped, map the box through its transform first. Skip boxes with found false. The result's placements say where the clip now shows, in sequence pixels: its picture box, the part visible after crop and mask inside the frame, and the source pixels that show there. corners pins the picture's four corners to four points in the frame instead (a screen, sign or page seen at an angle, or a tilt in 3D), keyframable the same way; it replaces x, y, scale, scale_x, scale_y, rotation and fit, while opacity, flip, crop and masks still apply. Returns the new timeline_id (edit that one next), what changed, and where each changed clip now sits.
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": {
"clip_id": "<clip_id>",
"timeline_id": "<timeline_id>"
},
"name": "clip.set_transform"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| x | No | Centre x, 0 = left edge, 1 = right edge (default 0.5); -4 to 5 | |
| y | No | Centre y, 0 = top, 1 = bottom (default 0.5); -4 to 5 | |
| fit | No | ||
| crop | No | ||
| flip | No | ||
| scale | No | Size relative to the fit (default 1); 0 to 20 | |
| clip_id | Yes | ||
| corners | No | Corner pin: where the picture's four corners land, as [x, y] in fractions of the frame (-1 to 2), in the order top left, top right, bottom right, bottom left; or {keyframes: [{frame, corners, ease}]}. Replaces x, y, scale, scale_x, scale_y, rotation and fit; null removes it | |
| opacity | No | Opacity (default 1); 0 to 1 | |
| preview | No | inline: image in the result; link: URI that renders on read; none | link |
| scale_x | No | Extra horizontal stretch (default 1); 0 to 20 | |
| scale_y | No | Extra vertical stretch (default 1); 0 to 20 | |
| rotation | No | Degrees clockwise (default 0); -36000 to 36000 | |
| timeline_id | Yes | Timeline handle; every edit returns a new one |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| parent | Yes | The version this edit started from | |
| changed | Yes | What the edit added, removed or modified; a clip or transition says its track and where it now sits (frames, end exclusive) | |
| clip_id | No | The clip this edit made or acted on (each tool says which) | |
| preview | Yes | ||
| clip_ids | No | Every clip this edit made or acted on, linked ones included (each tool says which) | |
| track_id | No | ||
| warnings | Yes | ||
| placements | No | Where each clip the edit moved, cropped, masked or animated shows, sequence pixels; for a title or caption, the area it can draw in, not the text itself | |
| timeline_id | Yes | The new version: edit this one next (older ids stay valid) |