Command · Track Motion
track.transform
Tracks a region of a clip ("region": {x, y, width, height} 0..1 of the frame, {"mask": id}, or {"detect": "face"} once a detector is installed) and keys a clip's Motion with it (one undo step): "follow" moves "target" with the region (position; with the similarity model also scale and rotation), "stabilize" keys the tracked clip so the region stays still.
- v1
- Capability EditSequence
- Tool
track_transform
Request
{
"command": "track.transform",
"params": {
"clip": 42,
"region": {
"height": 0.2,
"width": 0.2,
"x": 0.4,
"y": 0.3
},
"target": 57
}
}Parameters
clipinteger | object (1..)Required- The tracked clip. A clip id, or {"track", "time"} for the clip there.
direction`forward` | `backward`- Default forward.
framesinteger (1..)- Track at most this many frames (1 = one step). Default to the clip's end.
minConfidencenumber (0.0..1.0)- Stop where the confidence falls below this. Default 0.3.
mode`follow` | `stabilize`- Default follow with a target, else stabilize.
model`translation` | `similarity` | `affine`- What the region may do: move; move, turn and scale; or any affine. Default similarity.
regionobjectRequired- What to track.
sequenceinteger (1..)- Sequence id; only needed when the project has several.
targetinteger | object (1..)- The clip that follows. Default the tracked clip (stabilize). A clip id, or {"track", "time"} for the clip there.
timeinteger | string- Where to start (inside the clip). Default the clip's first frame (backward: its last). Timecode in the sequence's rate ("00:01:02:03") or ticks.
workingWidthinteger (64..4096)- Width of the pictures the tracker looks at. Default 640.
Discussion
Tracks a region of a clip ("region": {x, y, width, height} 0..1 of the frame, {"mask": id}, or {"detect": "face"} once a detector is installed) and keys a clip's Motion with it (one undo step): "follow" moves "target" with the region (position; with the similarity model also scale and rotation), "stabilize" keys the tracked clip so the region stays still. A job: it reports progress and can be cancelled.
Run it with wabcut-cli cmd <project> --json, from an MCP client as track_transform, or from an extension. See Edit commands for requests, references and results.
See also
track.*
- track.mask
Track Mask. Tracks a mask through the clip's media, frame by frame from "time" (forward or backward, to the clip's end or "frames" frames), with pyramidal Lucas-Kanade on features inside the mask and a robust fit of its motion ("model").
- track.setFormat
Set Track Channel Format. An audio track's channel format (Premiere's mono, stereo, 5.1 and adaptive tracks): clips are mixed to it (mono averages, 5.1 to stereo is ITU-R BS.775), and it to the master's format; adaptive passes channels through one to one.
- track.setPan
Set Track Pan. Sets an audio track's panner: -1 = left .. 0 = centre .. +1 = right, a balance on the track's stereo mix (centre leaves it unchanged; towards a side the other side follows the -3 dB constant-power curve down to silence).
- track.setRecordArm
Set Track Record Arm. Arms an audio track for voice-over recording or disarms it (the R button of Premiere's track headers and Audio Track Mixer).
- track.setRole
Set Track Role. What an audio track carries: dialogue, music or effects (Premiere's Essential Sound types), or none. audio.autoDuck lowers music-role tracks under dialogue-role tracks.
- track.setState
Set Track State. Changes track header toggles: lock, target, sync lock, mute, solo, output, name.
- track.setSurroundPan
Set Track 5.1 Panner. The 5.1 panner of a mono or stereo track on a 5.1 master (Premiere's track 5.1 panner): the puck x (-1 left .. +1 right) and y (-1 back .. +1 front; front centre plays stereo on L/R and mono on C) and the LFE send in dB (-144 = off).
- track.setVolume
Set Track Volume. Sets an audio track's fader (Premiere's track Volume): dB, 0 = unity, applied to the track's mix after its effects.