Skip to main content

Module spec

Module spec 

Source
Expand description

The compose spec: a video described by intent, which crate::compile turns into a project document.

Times are seconds (a tick is 1/120 000 s; each time rounds to the nearest one), lengths are pixels of the canvas, and colors are CSS hex strings or the project’s {red, green, blue, alpha} object. Nodes are tagged by type. A node with an id can be named by another (a music bed ducks under it).

Structs§

Audio
A sound file.
CaptionedVideo
A video under its captions.
Captions
Timed text.
ColorFill
An area painted one color.
ComparisonGrid
Clips in a labeled grid.
Cue
Text over an interval.
CustomCanvas
A canvas by its parts.
EndCard
A closing card.
Grid
Children in grid cells.
Layout
A layout generator.
Logo
A picture in a corner.
LowerThird
A name and role in the lower left.
Media
A video or still file.
MusicBed
Music under the video.
Raw
Part of a project at its own times.
Reframe
A video over a blurred copy of itself.
Sequence
Children one after another.
Slideshow
Stills or clips in turn.
Stack
Children over each other.
Text
Text in one of the theme’s styles.
Theme
How text, panels and timings look. Every part left out is the base theme’s. Sizes are fractions of the canvas’s shorter side, so a theme looks the same on a wide and a tall canvas.
Title
A title and subtitle.
Transition
The transition between two neighbours of a sequence.
VideoSpec
A whole video: a body, what is drawn over it, and what plays under it.

Enums§

Align
A point of an area: its center, an edge’s middle or a corner.
Canvas
The canvas: a preset name, or its parts.
CaptionStyle
How captions look.
FileKind
What a media file holds, when its extension does not say.
Fit
How a picture fills its area.
FrameRateChoice
A frame rate, as a number or exactly.
GridLength
How long a grid of clips of different lengths lasts.
Inset
Space kept clear inside an area.
Loudness
The loudness an export normalizes to: a target, or a target and a ceiling.
MediaItem
A file given by its path alone, or a media node.
Node
One part of a video.
TextRole
A theme text style.
ThemeChoice
A theme by name, or one built on a named theme.
TransitionChoice
A sequence’s transitions: none, the theme’s, or one given.

Constants§

COMPOSE_VERSION
The newest compose spec version this build reads.