Compose timelines without clip timing
One rule for clip timing: a clip runs as long as its content does, never past its container, and length end runs it to the container's end. Omit both fields and the engine lays the timeline out.
Every compose clip used to need a start and a length in seconds. That sounds small until you notice what it forces: you cannot write either number without knowing how long the file is, so editing a video you did not create started with an ffprobe job per asset, before a single cut existed.
Both are now optional, and one rule covers every clip in both authoring shapes.
Every clip sits in a container: the scene it belongs to, or the whole video.
- Omit
lengthand the clip runs as long as its content does, never past its container. - Write
length: "end"and it runs to the end of its container, whatever its content says.
Content means the source’s duration, or the trim span, or the source duration divided by speed, or a composition’s own end.
start follows the same shape. Omit it and the clip begins after everything already placed on its track, pulled back by any transition immediately before it. Give it a number and that is seconds from the start of its container.
What that looks like
A two-clip cut with a crossfade, and no timing anywhere:
"clips": [ { "asset": { "type": "video", "src": ".../river.mp4" } }, { "type": "transition", "transition": "crossfade", "duration": 1 }, { "asset": { "type": "video", "src": ".../forest.mp4" } }]Both clips play in full, back to back, overlapping by exactly one second. Overlapping two clips by a transition’s duration was the arithmetic people got wrong most often, and it is now done by construction.
A music bed. The source is three minutes long and the video is not, so "end" is how you say that without totalling the clips above it:
{ "asset": { "type": "audio", "src": ".../music.mp3", "volume": 0.35, "fadeOut": 2 }, "length": "end" }A watermark needs nothing at all. An image has no duration of its own, so it already runs to the end of the video.
What this replaced
Four rules that disagreed with each other:
| Was | Now |
|---|---|
Omitted length meant the whole source on a track | Content length, capped by the container |
Omitted length meant the whole scene in a scene | The same sentence |
length was required on text and image clips | They run to the end of their container |
An overlay’s length was accepted and discarded | It is honoured |
Two of those were hiding bugs. A video shorter than its scene was stretched to the scene’s duration and then rejected for exceeding its own source, so a 3 second clip in a 5 second scene could not be submitted at all. And a scene clip starting partway in was handed the scene’s full duration rather than what was left of it, then silently truncated at render.
Nothing changes for existing timelines
A timeline that states every start and length renders the same file it did before. Not “should”: the two forms of the same edit were rendered through the engine and compared, and the outputs are the same 113,091 bytes. Auto-timing only fills in what you leave out. Every overlay ever submitted here stated the exact composed total, so honouring that field instead of discarding it changes no output either.
What the same render check showed for the new shapes: a 30 second music bed with length: "end" under a 7.4 second video stops on the last frame and stays audible the whole way, and a 3 second clip in a 5 second scene now plays its 3 seconds. That second one could not be submitted at all before, because the old rule stretched it to the scene and then rejected it for outrunning its own source.
Two smaller fixes rode along. A scene with no duration now takes the length of the video inside it, instead of a flat five seconds. And the duration check that guards against a clip outrunning its source now accounts for speed, which it had been ignoring: a 5 second clip at speed: 2 consumes 10 seconds of footage.
Full detail in the compose reference, and the other change to text clips this month is custom fonts.
