pub struct Media {Show 30 fields
pub id: Option<String>,
pub path: String,
pub kind: Option<FileKind>,
pub trim_start: Option<f64>,
pub trim_end: Option<f64>,
pub speed: Option<f64>,
pub speed_points: Vec<SpeedPoint>,
pub preserve_pitch: Option<bool>,
pub pitch_cents: Option<f32>,
pub loop: bool,
pub reverse: bool,
pub frame_interpolation: Option<FrameInterpolation>,
pub when_short: Option<WhenShort>,
pub when_long: Option<WhenLong>,
pub volume: Option<f32>,
pub muted: bool,
pub opacity: Option<f32>,
pub fade_in: Option<f64>,
pub fade_out: Option<f64>,
pub zoom: Option<Anim<f32>>,
pub blur: Option<f32>,
pub label: Option<String>,
pub at: Option<f64>,
pub duration: Option<f64>,
pub inset: Option<Inset>,
pub fit: Option<Fit>,
pub align: Option<Align>,
pub enter: Option<Motion>,
pub exit: Option<Motion>,
pub motion_blur: bool,
}Expand description
A video or still file.
Fields§
§id: Option<String>The node’s name, for other nodes to refer to.
path: StringThe file. It becomes the source’s locator and the export’s asset.
kind: Option<FileKind>What the file holds. Default: by its extension.
trim_start: Option<f64>Where in the file a video starts, in seconds.
trim_end: Option<f64>Where in the file a video ends, in seconds. Default: its end.
speed: Option<f64>Playback speed of a video: 2 plays it twice as fast. Default 1. A video that loops takes only speed 1.
speed_points: Vec<SpeedPoint>Speeds of a video over the node’s time, for a speed that changes: linear between
points, the first point’s before it and the last point’s after it. A speed of 0 holds
the frame. The video’s own length is the time its speeds take to play the trimmed range,
or the last point’s time when they end at 0 before that. Not with a speed other than
1, reverse, a loop, or stretch in when_short or when_long.
preserve_pitch: Option<bool>Keeps a video’s sound at its pitch when speed is not 1 (time-stretched instead of
resampled). Default true.
pitch_cents: Option<f32>Shifts the pitch of a video’s sound by this many cents (100 to a semitone), within 2,400 either way, without changing its length. It suits speech and intervals of a few semitones; music and wide intervals sound rougher. Default 0. A video that loops takes none.
loop: boolPlays a video again from its start while the node lasts. Its speed must be 1.
reverse: boolPlays a video’s trimmed range backward, from trim_end to trim_start, at its speed
or stretched to fit; a node that outlasts it then holds the frame at trim_start. Not
with speed_points or a loop.
frame_interpolation: Option<FrameInterpolation>What a video shows at a time between two of its frames: hold keeps the earlier frame,
mix blends the two by how far the time is between them, which smooths slow motion and a
frame rate that differs from the output’s. Default hold. A still takes neither.
when_short: Option<WhenShort>What a video does when the node outlasts it. Default: what its parent asks (a grid’s
length rule), else freeze.
when_long: Option<WhenLong>What a video does when it outlasts the node. Default trim.
volume: Option<f32>Linear gain of a video’s sound. Default 1.
muted: boolSilences a video’s sound.
opacity: Option<f32>Opacity, 0..=1. Default 1.
fade_in: Option<f64>Seconds of fade in from transparent.
fade_out: Option<f64>Seconds of fade out to transparent.
zoom: Option<Anim<f32>>How large it shows, as a multiple of its fitted size: a constant, a ramp
({"from": 1, "to": 1.2} is a slow zoom over the node), or keys. Default 1.
blur: Option<f32>A Gaussian blur’s radius, as a fraction of the picture’s shorter side.
label: Option<String>A label a comparison grid shows on the cell.
at: Option<f64>Seconds from the parent’s start (an overlay’s: the video’s). Ignored in a sequence.
duration: Option<f64>Length in seconds. Default: the node’s own length, else what its parent gives it.
inset: Option<Inset>Pixels kept clear inside the parent’s area: one number, or [top, right, bottom, left].
fit: Option<Fit>How a picture fills its area. Default contain.
align: Option<Align>Where in its area the picture or text lies. Default center.
enter: Option<Motion>How it comes in at its start.
exit: Option<Motion>How it goes out, ending at its end.
motion_blur: boolDraws its movement (entrance, exit, zoom) with motion blur, averaged over the video’s
shutter. What moves inside a video’s own picture is not blurred.