Nothing

.timeline format specification

The composition index format for placements, tracks, and editorial time.

Read as Markdown

A composition is a folder containing a composition.timeline index. The index defines a frame clock and canvas size. It places scenes, media and other compositions on tracks for specified intervals. The same format applies to the opened index and to every nested index.

ident/
  composition.timeline
  intro.nothing
  strap.nothing
  reprise/
    composition.timeline
    close.nothing

The outer index is ident/composition.timeline.

#timeline 0.9
composition fps 24/1 size 960x540
[0,48) V1 intro.nothing
[8,32) V2 strap.nothing
[48,96) V1 reprise

The nested index is ident/reprise/composition.timeline.

#timeline 0.9
composition fps 24/1 size 960x540
[0,24) V1 ../intro.nothing
[24,48) V1 close.nothing

reprise is a nested composition. Film frame 55 reads local frame 7 of the second use of intro.nothing. Editing the scene affects both uses. Editing a row changes that placement.

Timeline format version

The first line of every new .timeline file, including a nested composition, is exactly #timeline 0.9, followed by LF or CRLF. The # is the first byte. The file is UTF-8. The first content line after the signature declares the composition's frame rate, size and optional name.

Readers check line one for the #timeline token before stripping comments. If line one begins with that token after optional spaces or tabs, the whole line must match the exact signature. A malformed or unsupported signature is an error before any composition settings or placements are read. Outside the signature, an unquoted # starts a comment through the end of the line. A # inside a quoted path, composition name or marker label is literal. Readers skip blank lines and comment-only lines when reading the composition.

The signature identifies the timeline grammar and semantics. Preserve it during film edits. Change it only when migrating the file to another specified format version.

Compatibility. Readers treat an existing index with no signature and a composition fps … size … header as using 0.9 semantics. Source-preserving edits keep that spelling. To migrate such an index, prepend the signature before any existing comments or blank lines. For an unsigned file written with the interim composition version 1 fps … spelling, also remove version 1 from the composition settings. A compatibility reader may accept this interim spelling as input for migration.

What a row places

A row names its target by a slash-separated path relative to the folder containing its index. An extensionless target names a composition folder. A shared scene is written with its path, such as ../intro.nothing or ../shared/logo.nothing. There are no search paths.

TargetWritten asKind
A folder holding composition.timelineThe folder's nameA composition
<name>.nothingThe file's name including .nothingAn editable NCF scene on a picture track
A movie or a soundThe file's name with its extensionMedia, placed as it is

For a target without an extension, each path segment is either .. or a nonempty name made of ASCII letters, digits, underscores and hyphens. Paths to scenes and media use nonempty segments. They allow .. and exclude ., double quotes and control characters. Wrap a path containing spaces or # in double quotes. The quotes delimit the path and the reader takes its contents literally. Report missing targets by path and composition cycles by their folder chain.

Media in a row

Media rows name files as they appear on disk.

[0,128) A1 assets/pings.wav
[128,192) A1 assets/pings.wav in 128
[192,240) V1 "footage/harbour take 2.mov" in 36
  • A movie on V1 contributes its picture. It fills the frame and must have the shape of the film.
  • A file on a sound track contributes its audio. Place a movie on a sound track to use its soundtrack.
  • The source offset comes from the row's in-point, in frames.

The host documents its supported media encodings. N4 film authoring

Composition settings

Write composition fps <numerator>/<denominator> size <width>x<height>. The line may end with one name <string> field.

composition fps 24/1 size 1920x1080 name "Opening Titles"

The frame rate is a positive rational no greater than 240 fps, such as 24000/1001. The numerator and denominator each fit in an unsigned 32-bit integer. Canvas dimensions are integers from 1 through 8192 pixels per axis.

The name is a display label. Write it as a double-quoted JSON string, using escapes such as \" for a quote. The decoded name must be nonblank and free of control characters. The optional field belongs to the composition whose file declares it.

The opened root composition supplies the video project's display name. If the root is unnamed, use its folder's name, even when a child declares a name. A child opened directly follows the same rule as any root. References continue to resolve by path after a rename.

Earlier 0.9 readers require the composition line without the optional name field. Removing that field preserves timing and references.

Rows

Write a placement as [start,end) <track> <path> with an optional in <frames>. Placement rows start at the left margin.

RowMeaning
V1The base picture. A row places artwork, a movie or a composition. Where no V1 row plays, the picture is black.
V2, V3, …Graphics above the base picture. A higher track paints over a lower one. An overlay can cross a base-picture cut.
A1, A2, …Sound. A row names the sound file. The tracks are mixed together.

Intervals are half-open and expressed in unsigned 32-bit integer frames of the containing composition. The start must precede the end. At 24/1 fps, [0,48) lasts two seconds. Order placement rows by start frame.

A composition needs at least one placement. Rows on a track must be disjoint. Any track may have gaps. The greatest end frame across all rows determines the composition length, so sound or artwork can continue over black after the last shot. Number picture tracks from V1 and sound tracks from A1 without leading zeros. Track numbers fit in an unsigned 32-bit integer.

An overlay or sound track is on by default. Write track <track> on or track <track> off after the composition settings and before any rows or markers, with at most one directive per track. The placements on a switched off track still count toward the composition length. Its overlays and sound are omitted from the output. A nested composition keeps its own switches. Only overlays and sound tracks support a switch.

#timeline 0.9
composition fps 24/1 size 960x540
track V2 off
track A2 off
[0,48) V1 intro.nothing

In-point

A row may end with in <frames>, where the count is an unsigned 32-bit integer on the containing composition's clock and defaults to zero. At frame f within the row, the source time in seconds is (f - row-start + in-point) / composition-fps. At 24 fps, in 12 starts half a second into the source, even when a scene authors its keys at 30 fps. [117,326) V1 talk.nothing in 12 samples the same source times as [105,326) V1 talk.nothing with its first 12 frames trimmed. A separate row can use the same file at another offset.

A composition placed in another

A composition's clock starts at zero. A parent frame f inside a row placing a child selects child frame f - row-start + in-point. [64,100) V1 reprise in 12 shows child frames 12 through 47 of reprise. The full authored source window [in-point, in-point + end - start) must lie inside the child composition. Picture and sound are cut to that window.

  • Reuse. A composition can be placed more than once. Each use shows the same edit, and a change to its index reaches every use.
  • Rate and size. Every index declares both, so any composition opens as a film on its own. The frame rate numerator and denominator and both canvas dimensions must match the containing composition's settings.
  • Track. A composition is placed on V1.
  • Reference. The placement names the child by its folder path. The child's optional display name stays with its own index.

Timeline markers

Write a ruler marker at the left margin after the composition settings and any track switches. Indent a placement marker with exactly two spaces beneath its owning row. A ruler marker or the next placement ends that attachment.

#timeline 0.9
composition fps 24/1 size 960x540
marker intro at 0f "Opening beat"
marker sound-check range [24f,72f) "Check the dialogue"
[0,96) V1 opening.nothing in 8
  marker logo at 32f "Logo lands"

An ID consists of ASCII letters, digits, underscores and hyphens and is unique within the file. A point uses at. A range uses range [start,end) and has positive length. Addresses are nonnegative. A time ending in f counts frames at the rate declared by this timeline and fits in an unsigned 32-bit integer. Seconds accept integers, decimals and fractions, for example 1s, 0.5s and 1/48000s. The exact seconds numerator and positive denominator each fit within JavaScript's safe integer range. Labels are optional double-quoted strings with JSON escaping.

A placement marker uses source time. In the example, logo appears at timeline frame 24. Trimming can hide an annotation while keeping its authored time. A nested timeline defines its ruler markers in its own file. Each use maps the child's markers to the parent by adding the row start and subtracting its in-point. A child point projects if it belongs to the half-open source window. A child range projects its intersection with that window if the intersection has positive length. Marker ranges can overlap, share a start, and cover empty space. Markers are annotations with no effect on duration, picture or audio.

NCF scenes

Place an editable NCF scene by its explicit path on V1 or an overlay track. The row chooses the scene's sample time using the in-point rule. The scene's authored frame-rate resolves its own frame-based keys and sequences. Reusing the same file shares artwork. Trimming a row keeps the other uses' timing. NCF sequence timing

#timeline 0.9
composition fps 30/1 size 960x540
[0,60) V1 titles.nothing
[60,120) V1 titles.nothing in 15

Conformance

The conformance cases record inputs and the expected interpretation or diagnostic under this specification. Timeline conformance

On this page