Skills/Video Composition/Trimming Video

Trimming Video

Two approaches to show only part of a video source. Choose based on your workflow.

Relative Trimming (trimstart / trimend)

Remove time from the edges. Think: "cut off 2 seconds from the start."

Live

Duration formula: sourceDuration - trimstart - trimend

A 10s source with trimstart="2s" trimend="3s" produces a 5s clip.

Absolute Trimming (sourcein / sourceout)

Specify exact timestamps. Think: "show seconds 2 through 6."

Live

Duration formula: sourceout - sourcein

sourcein="2s" sourceout="6s" produces a 4s clip starting at the 2-second mark.

When to Use Each

ApproachUse when...
trimstart / trimendBuilding UI with drag handles or sliders
Thinking "how much to cut off"
Adjusting existing clip duration
sourcein / sourceoutWorking with known timecodes
Referencing specific moments by timestamp
Frame-perfect accuracy needed

Trimmed Clips in a Sequence

Trimming is most useful when building sequences from different parts of source media:

Live

Note: Both approaches produce the same visual result — they differ in mental model and how currentSourceTimeMs tracks source position. Relative trimming maps as trimstart + ownCurrentTimeMs, absolute as sourcein + ownCurrentTimeMs.

Understanding Video ElementsStep 3 of 4