Edit commands
Every edit the window can make, as a JSON object you send through edit.apply.
{
"method": "edit.apply",
"path": "/edits/Reel",
"command": {
"op": "trimClip",
"clipId": "c2",
"edge": "end",
"delta": -1.5
}
}A command is {"op": "<name>", …fields}. Fields are camelCase. The reply
is an EditorView of the project after the
edit; createdId names what the command made, if anything.
Media
addMediaImports a file into the bin, minting an "m" idremoveMediaRemoves a bin item and every clip referencing it, on all timelines - a clip whose media is gone would linger as a dead referenceupdateMediaPathUpdates a media item's path on disk (relink)setMediaColorRangeSays what levels a media file's picture really spans, over whatever the file claimsreplaceClipMediaPoints a clip at another file - the enhanced or reversed copy of its media - adding the file to the bin first when it is not there
Placing clips
addClipPlaces a clip ofmediaIdon a named track, minting a "c" idaddClipAtFirstFreeaddClipwithout naming a laneaddClipsInSequenceSeveral bin items one after another on one lane, as one stepaddTextClipPlaces a titleaddShapeClipPlaces a shapeaddLayerClipPlaces a layeraddTransitionClipPlaces a transition as a clip of its own (#621)freezeFrameA freeze frame attime
Moving and cutting
moveClipsRepositions any number of clips in one edit - one undo step for a whole multi-selection dragtrimClipDrags one edge of a clipsplitClipsCuts each named clip in two at one playhead timemergeClipsRejoins split pieces into the earliest piece, which keeps its idconsolidateClipsReplaces selected video clips with their host-rendered media, as one undoable editremoveClipsDeletes clips from the active timeline
Changing a clip
updateClipApplies aClipPatchsetClipTransformAdjusts the picture's placementframeClipSizes a picture to the frame in one stepsetClipStabilizeTurns a picture's stabilization on, sets its settings, or takes it offsetClipSpeedChanges playback rate while holding the amount of source covered constant - the clip's timeline duration is what stretches, which is what makes this a speed change rather than a trimsetClipSpeedCurveGives a clip a speed curve, or takes it awaysetClipEnhancedShows a clip's enhanced copy, or its original againsetClipKeyPuts a key on one property at one point of a clip, replacing whichever key on that property was already within a hair of itclearClipKeyTakes the key atatoff one property, if there is one thereclearClipKeysTakes every key off one property, returning it to its constantsetEffectKeyPuts a key on one parameter of one link of a clip's picture chain, replacing whichever key on it was already within a hair ofatclearEffectKeyTakes the key atatoff one parameter of one link, if there is oneclearEffectKeysTakes every key off one parameter of one link, returning it to the value it holdssetMaskKeyPuts a key on one number of one of a clip's masks, replacing whichever key on it was already within a hair ofatclearMaskKeyTakes the key atatoff one number of one mask, if there is oneclearMaskKeysTakes every key off one number of one mask, returning it to the value it holdssetClipCutoutSets or clears a picture's cutoutaddCutoutStrokePaints one stroke onto a clip's cutoutdetachAudioPulls a video clip's sound out into its own audio clip on a free lane (minting one if none is free), muting the video and moving its audio filters to the soundreattachAudioUndoes a detachsetClipVoiceSets a clip's voice isolation - the voice and the rest at levels of their own - or takes it offstyleTextRangeGives some of a title's words a look of their ownclearTextStylesGives a title's words back to its own look
Tracks
Timelines
addTimelineAdds a fresh timeline - four new lanes, "Timeline N" after the highest in use - and makes it activeremoveTimelineDeletes a timeline, moving the active tab to a neighbour if it was this onesetTimelineBackgroundSets what fills a timeline's frame behind the pictures on its lowest picture lanesetTimelineLinkageTurns a timeline's linkage on or offsetTimelineVideoSets a timeline's output frame and raterenameTimelineRenames a timeline tabselectTimelineSwitches which timeline subsequent commands act onmoveTimelineMoves a timeline tab to a new position in the strip
Templates and fonts
Grouping
Rules that apply to every command
- Ids. Clips are
c…, trackst…(the first timeline's starter lanes areT1–T4), timelinestl…(the first isTL1), mediam…. Ids come from the EditorView replies. - Unknown ids are usually a tolerated no-op: the request succeeds, nothing changes, no undo step. Where a command errs instead, its entry says so.
- Times are seconds on the timeline. A start below 0 lands at 0.
- Numbers are clamped, not refused, into the range each field states. A NaN or infinite number is refused: "A number in that edit is not finite."
- A refusal is a
refusederror whose message is the exact sentence the window would show. The project is as it was. - Commands act on the active timeline, except where the entry says "all timelines".
Refusal sentences
| Sentence | Raised by |
|---|---|
| That media is no longer in the bin. | a clip-placing command whose media is gone |
| That track no longer exists. | a clip-placing command whose track is gone |
| There are no tracks. | first-free placement on a timeline with no tracks |
| A timeline needs at least one track. | removeTrack on the last track |
| A project needs at least one timeline. | removeTimeline on the last timeline |
| That template slot no longer exists. | fillSlot with an unknown id |
| That media is not a template slot. | fillSlot on ordinary media |
| A number in that edit is not finite. | any command carrying NaN or infinity |
| (one of several sentences) | mergeClips, saying why the pieces cannot be rejoined |