Level 1 audio, video, and nested sequences
Placement timing, nested scene clocks and audio mixing.
A sequence positions a source in time. Picture and sound play at unit
speed. Each placement maps parent time into its source and maps the
source picture's local coordinates into its parent. Those maps are
independent. Document contract · Spatial composition
Sequence
A sequence places content on its parent's timeline. It is a timed child
of a scene, shape, group, or inline sequence. Each placement has exactly one source.
| Form | Source |
|---|---|
| Referenced | href identifies an audio file, movie footage, or a complete .nothing scene. A placement filter, mask and placement-property tracks may accompany the reference. |
| Inline | The element owns its content, which may include shapes, groups, and further sequences. The element omits href. |
Placing a composition inside another composition creates a compound clip. Either form admits property animations, one optional source filter, one optional backdrop filter and one optional mask on the placement. A placement with a backdrop filter requires that mask. The placement's properties, filter operations, and the shape inside its mask use the enclosing composition's time and frame rate. Inline drawable children and a referenced scene’s contents use mapped source time. An inline sequence passes the enclosing geometry host through to its children. Those children read the host geometry at the host’s own sample. A referenced scene establishes a fresh host at its resolved viewport. Attached drawables Slipping the source leaves an aperture keyed on the placement at its original key times. The parent positions and trims it as one item. The child retains its editable contents and local timeline. Each placement of the same source has independent timing. An element supplying both a reference and inline source content requires a diagnostic on the placement.
| Required attribute | Meaning |
|---|---|
begin | Start of the placement in parent time |
dur | Positive duration in parent time |
source-start | Instant on the source's local timeline at the start of the placement |
All three attributes accept exact seconds with an s suffix, including
0s, 0.5s, and integer fractions such as 1/48000s with a positive denominator.
begin and dur also accept an integer frame count followed by f. Each
attribute chooses its unit independently. A frame count n resolves to
n / R seconds at the authored rate R of the scene containing that
sequence. Inline sequences inherit this rate. Placements inside a
referenced scene use that scene’s rate. Preserve exact instants through nesting.
For example, begin="48f" dur="12f" places a clip on parent frames
48 through 59. At 24 fps this is the interval [2s, 2.5s). Editing the scene
to 30 fps gives [1.6s, 2s). A clip authored with begin="2s" dur="0.5s"
stays at [2s, 2.5s) through that edit. Writers preserve each authored unit.
Changing only the export rate changes the sample grid and preserves the cut.
source-start always uses seconds so an in-point can address the same
source picture or audio sample across parent rate edits.
Resolving a composition at time t
A placement needs an instant to select its source. Base evaluation exposes
the placement's authored properties and its source for inspection. A picture
or mix request that encounters a placement at Base requires a diagnostic
requesting a sample time. A consumer can request 0s explicitly to render
the opening frame. A still without placements can render at Base.
A composition resolves at an explicit sample time t. For a fixed document
and resources, direct seeking, forward playback, and backward scrubbing to
the same instant must produce the same visual state. Sampling preserves the
authored values.
- Evaluate each placement in its parent's time. It contributes during
begin <= t < begin + dur. Outside that interval it contributes transparent pixels and silence. - For an active placement, compute
source-time = source-start + (t - begin). For footage, select the frame whose presentation interval containssource-time, measured from the start of the movie's presentation timeline. - For a referenced scene or an inline source, evaluate its drawable
children with
source-timeas their parent time. Spatial groups pass this time to every child. Nested placements perform their own time mapping. - Start each scene with its own viewport background, transparent by default. Inline compositions start transparent. Composite active children in document order, later children over earlier ones. The child composition contributes one composited visual result to the placement. Apply the placement's source filter, then its mask and opacity (using the backdrop replacement rule when present) in its local coordinates, then place the picture using its sampled transform and layer blend mode. A placement can multiply or screen its completed source against its parent. A shape or group can contribute throughout its enclosing interval.
Resolve relative references from the file that declares them. Repeated uses
of the same source are valid. For a placement with finite source media,
the requested source interval is [source-start, source-start + dur).
An interval extending beyond the available media, a reference cycle, or a
missing source produces a diagnostic identifying the placement and source.
The exclusive end may coincide with the exclusive end of the media.
Source coordinates
A movie's local image starts at (0, 0) in its display orientation. Use the decoded picture's natural display dimensions as its extent, with one display unit per local unit. For an upright square-pixel frame these dimensions equal its decoded width and height. Resolve clean aperture, orientation, and pixel aspect information as part of the media input. A reader unable to establish its display geometry reports the placement and source. The placement paints transparent pixels outside the source image.
A referenced scene paints within its own fixed canvas or, when its dimensions are absent, the viewport supplied by its enclosing scene. A group's transform and mask leave this supplied viewport unchanged. In both cases, place the source scene's origin at local (0, 0) and use one source unit per local unit before applying the placement transform. For inline content, children draw directly in placement-local coordinates. The enclosing scene supplies the viewport for references. Inline content gains a clipping boundary from an explicit mask or an enclosing finite scene.
A smaller source at identity occupies its native dimensions in the parent's top-left corner. A larger source can extend beyond the parent canvas. The parent's visible extent clips the result. Scale and translate a placement to fit a shot, and put a geometry mask on its parent for a stationary window. The same mappings apply to a still, moving picture, and a referenced composition. Worked pan and resize
Audio sampling and mixing
An audio file, a movie soundtrack, and the audio mix of a nested scene all use the same active interval and source-time mapping. A movie's picture and sound share its presentation timeline, preserving their relative timing when the placement moves or its source is trimmed.
For an output interval [a, b), evaluate each instant on the output audio
sample grid that falls within the interval. At output rate R, root
sample n has time n / R from the shot's time origin. Splitting an
export into intervals preserves that grid. For matching source and output
channel layouts and aligned sample grids, sum the contributions per
channel. Each active placement contributes its source sample at mapped
source time multiplied by its gain at parent time. A child with only
visual content contributes zero. A compound clip's source sample is the
sum for its child composition. Apply the compound clip's own gain once
to that sum. A nested mix can exceed unit amplitude. Output encoding and
resampling are separate from this sum.
Web Audio gain
For example, two overlapping mono sources with sample values 0.75 and 0.75 and gains of 1 yield 1.5. Placing their inline composition at gain 0.5 gives a contribution of 0.75 to its parent. The same values apply when seeking directly to that sample.
<sequence href="./voice.wav" begin="2s" dur="3s" source-start="10s"/>This placement maps parent time 2s to source time 10s and 3s to 11s. At 5s
its contribution is silence. If its enclosing compound clip begins at shot
time 4s with source-start="0s" and lasts 6s, the voice is active on
[6s, 9s) in the shot.
Example and expected samples
In this illustrative shot.nothing, all sources share the shot's dimensions and
origin. The movie starts ten seconds into its footage. The graphic appears
two seconds into the shot.
<scene frame-rate="24">
<sequence href="./take.mp4" begin="0s" dur="8s" source-start="10s"/>
<sequence href="./graphic.nothing" begin="2s" dur="3s" source-start="0s"/>
</scene>The referenced graphic.nothing can itself contain a sequence. Here its first
half-second is transparent. The rectangle stays editable in its own file.
Graphic source
<scene frame-rate="24">
<sequence begin="12f" dur="60f" source-start="0s">
<shape>
<rect anchor-u="0" anchor-v="0" offset-x="32" offset-y="32" width="160" height="12"/>
<fill>
<paint>
<solid color="#3366FFFF"/>
</paint>
</fill>
</shape>
</sequence>
</scene>| Shot time | Sample from the movie | Sample from the graphic | Visible result |
|---|---|---|---|
| 2s | 12s | 0s | Footage alone |
| 2.5s | 12.5s | 0.5s | Rectangle over footage |
| 3s | 13s | 1s | Rectangle over footage |
| 5s | 15s | Placement ended | Footage alone |
| 8s | Placement ended | Placement ended | Transparent |
At shot time 3s, the graphic receives 1s and its inner sequence receives 0.5s. An animation on the rectangle would therefore be sampled at 0.5s. Resolving that single shot instant exercises both levels of time mapping.
Changing the graphic placement's begin moves it in the shot. Changing
its source-start slips the content inside the same placement. A change
to the rectangle is visible wherever graphic.nothing is referenced.
A patch to begin alone keeps any keys authored directly on the placement
at their original addresses in parent time. A fade authored on a shape
inside the graphic travels with the graphic's local timeline.
For a placement beginning at 2s with source-start="10s", suppose the
opacity of its alpha-mask source rises linearly from 0 at parent time 2s
to 1 at 3s. At shot time 2.5s the mask opacity is 0.5 and the footage
sample is 10.5s. Patching source-start to 10.25s advances the footage
sample to 10.75s and keeps the mask opacity at 0.5.
Open questions
Persistent fitting constraints on resize or source replacement, export defaults, and declared scene duration remain open. Other open topics include audio stream selection, channel routing, resampling, clip time remapping, clip looping, and media color management. Property animation
What the precedents establish
| System | How it handles the shot |
|---|---|
| OpenTimelineIO | A Track arranges items in succession. A Stack layers them. Both can nest, and a parent can select a range of a nested composition just as it can trim a clip. The source range and the item's range in its parent describe different coordinates. Timeline structure · Time ranges |
| After Effects | A composition can serve as the source of a layer alongside footage. Editing the source updates its uses. Each layer can have its own transforms and timing. Preserving the nested composition's frame rate is a separate setting. Precomposing and nesting |
| Blender | A Movie Strip brings in footage. A Scene Strip can take another scene's camera output or Sequencer edit as input. A Meta Strip groups strips locally and can itself be nested. This distinguishes editing a local group from editing a source shared by several placements. Movie strips · Scene strips · Meta strips |
| SVG | An image can reference an entire SVG document by href and place its output in a rectangle. Later siblings normally paint above earlier ones. SVG animation uses begin and dur for timing and from for a starting value. These supply precedents for references, painter order, and timing vocabulary. Embedded content · Rendering order · Animation |