Expand description
Wavyte is a programmatic video composition and rendering engine.
Wavyte v0.2.1 focuses on a stable and performant CPU-first pipeline that turns a
timeline (Composition) into pixels (FrameRGBA) via a backend-agnostic render IR (RenderPlan).
§Pipeline overview
- Evaluate:
Composition + FrameIndex -> EvaluatedGraph(what is visible, in what order) - Compile:
EvaluatedGraph -> RenderPlan(backend-agnostic passes over explicit surfaces) - Render:
RenderPlan -> FrameRGBA(CPU backend) - Encode (optional): stream frames to the system
ffmpegbinary for MP4 output
The key design constraints in v0.2.1:
- No unsafe:
unsafeis forbidden in this crate. - Deterministic-by-default: evaluation/compilation are pure and stable for a given input.
- No IO in renderers: external IO is front-loaded in
PreparedAssetStore. - Premultiplied RGBA8 end-to-end: renderers output premultiplied pixels.
§Getting started
- For end-user usage, see the repository README.
- For a detailed, standalone walkthrough of the API and architecture, see
crate::guide.
Modules§
- guide
- High-level, standalone documentation for Wavyte’s concepts and architecture.
- transform
- Shared transform helpers (linear, affine, non-linear utilities).
Structs§
- Affine
- A 2D affine transform.
- AssetId
- Stable hashed identifier used for prepared assets.
- Asset
Key - Normalized identity key used to derive deterministic
AssetIdvalues. - Audio
Asset - Audio asset configuration including trims and fades.
- Audio
Input Config - External raw PCM audio input fed into ffmpeg.
- Audio
Manifest - Audio rendering plan for a timeline frame range.
- Audio
Pcm - Decoded interleaved floating-point PCM.
- Audio
Segment - One scheduled audio contribution in timeline sample space.
- BezPath
- A Bézier path.
- Canvas
- Output canvas dimensions in pixels.
- Clip
- A clip places an asset on the timeline and specifies how it is rendered.
- Clip
Builder - Builder for
Clipvalues. - Clip
Props - Per-clip render properties (animated).
- Composite
Pass - Composite multiple surfaces into a target surface.
- Composition
- A complete timeline composition.
- Composition
Builder - Builder for
Composition. - CpuBackend
- CPU renderer implementation backed by
vello_cpu. - Edges
- Padding edges in pixels.
- Effect
Instance - Raw effect instance attached to a clip.
- Encode
Config - Configuration for MP4 encoding via the system
ffmpegbinary. - Evaluated
Clip Node - Evaluated clip node consumed by the compiler.
- Evaluated
Graph - Fully evaluated frame graph before compilation.
- Evaluator
- Stateless evaluator from composition timeline to frame graph.
- Ffmpeg
Encoder - Streaming MP4 encoder that wraps the system
ffmpegbinary. - Fps
- Frames-per-second represented as a rational
num/den. - Frame
Fingerprint - Deterministic 128-bit fingerprint of an evaluated frame graph.
- Frame
Index - Absolute 0-based frame index in composition timeline space.
- FrameRGBA
- A rendered frame as RGBA8 pixels.
- Frame
Range - Half-open frame range
[start, end)in timeline space. - FxPipeline
- Normalized effect pipeline for one clip.
- Image
Asset - Raster image asset configuration.
- Inline
Fx - Inline effects folded directly into draw operation state.
- Keyframe
- One keyframe in a keyframed animation.
- Keyframes
- Keyframed animation with optional default value.
- Layout
Offsets - Precomputed per-track/per-clip placement offsets from layout solving.
- Offscreen
Pass - Run a post-processing effect producing a new surface from an input surface.
- Path
Asset - Inline path asset configuration.
- Point
- A 2D point.
- Prepared
Asset Store - Immutable store of prepared assets keyed by composition asset keys and hashed IDs.
- Prepared
Audio - Prepared audio clip stored as interleaved
f32PCM. - Prepared
Image - Prepared raster image in premultiplied RGBA8 form.
- Prepared
Path - Prepared vector path asset parsed from SVG path data.
- Prepared
Svg - Prepared SVG asset represented as a parsed
usvgtree. - Prepared
Text - Prepared text asset: shaped layout plus backing font data.
- Prepared
Video - Prepared video asset metadata and optional decoded audio track.
- Rect
- A rectangle.
- Render
Plan - Backend-agnostic render plan for a single frame.
- Render
Settings - Backend-agnostic settings.
- Render
Stats - Aggregated rendering counters.
- Render
Threading - Threading and chunking controls for multi-frame rendering.
- Render
ToMp4 Opts - Options for
render_to_mp4. - Resolved
Effect - Effect instance resolved for a specific evaluated node.
- Resolved
Transition - Transition state resolved for a specific frame.
- Rgba8
Premul - Premultiplied RGBA8 (r,g,b already multiplied by a).
- Sample
Ctx - Sampling context provided to animation evaluators.
- Scene
Pass - Draw operations into a surface.
- Surface
Desc - Surface declaration: dimensions + pixel format.
- Surface
Id - Identifier for a render surface declared in
RenderPlan::surfaces. - SvgAsset
- SVG asset configuration.
- Text
Asset - Text asset configuration.
- Text
Brush Rgba8 - RGBA8 brush color used by Parley text layout.
- Text
Layout Engine - Stateful helper for building Parley text layouts from raw font bytes.
- Track
- A track contains an ordered set of clips with a base Z offset.
- Track
Builder - Builder for
Trackvalues. - Transform2D
- Authoring-space transform components for a clip.
- Transition
Spec - Transition specification attached to clip edge.
- Vec2
- A 2D vector.
- Video
Asset - Video asset configuration including trims and audio controls.
- Video
Source Info - Basic metadata about a source video file.
Enums§
- Anim
- Generic animation node supporting keyframed, procedural, and expression sources.
- Asset
- An asset referenced by clips.
- Backend
Kind - Available backend kinds.
- Blend
Mode - Blend mode used when compositing a clip.
- Composite
Op - A compositing operation between surfaces.
- DrawOp
- Draw operation emitted by the compiler.
- Ease
- Easing functions used to map normalized animation progress.
- Effect
- Parsed effect representation used by compiler normalization.
- Interp
Mode - Interpolation strategy between keyframes.
- Layout
AlignX - Horizontal alignment options for layout.
- Layout
AlignY - Vertical alignment options for layout.
- Layout
Mode - Auto-layout mode for clips within a track.
- Loop
Mode - Looping strategy used by the loop expression variant.
- Pass
- A single pass in a
RenderPlan. - PassFx
- Effects that require explicit offscreen render passes.
- Pixel
Format - Supported pixel formats for render surfaces.
- Prepared
Asset - Union of all prepared asset kinds consumed by evaluator/compiler/renderers.
- Transition
Kind - Parsed transition kind used during compile/composite.
- Wavyte
Error - Top-level error taxonomy used by engine APIs.
- WipeDir
- Wipe direction used by
TransitionKind::Wipe.
Constants§
- MIX_
SAMPLE_ RATE - Internal audio mixing sample rate used across decode/mix/encode pipeline.
Traits§
- Pass
Backend - Backend execution interface for individual render pass kinds.
- Render
Backend - A renderer that can execute a compiled
RenderPlaninto aFrameRGBA.
Functions§
- audio_
asset - Create audio asset configuration with default trims/playback controls.
- audio_
source_ time_ sec - Map clip-local timeline frame to source audio time in seconds.
- build_
audio_ manifest - Build audio mixing manifest for the given timeline range.
- compile_
frame - Compile one evaluated frame graph into backend-agnostic render plan.
- create_
backend - Create a rendering backend implementation.
- decode_
audio_ f32_ stereo - Decode audio from media source to stereo interleaved
f32PCM. - decode_
image - Decode encoded image bytes and convert to premultiplied RGBA8.
- decode_
video_ frame_ rgba8 - Decode a single RGBA frame from source video at
source_time_sec. - default_
mp4_ config - Create the default MP4 encoding config used by Wavyte’s pipeline APIs.
- delay
- Offset an animation in local clip time by
by_frames. - ensure_
parent_ dir - Create the parent directory for
pathif it does not exist. - execute_
plan - Execute all passes in a
RenderPlanagainst aPassBackend. - fingerprint_
eval - Compute a stable fingerprint for an evaluated frame.
- frame_
to_ sample - Convert frame delta to nearest sample index at
sample_rate. - is_
ffmpeg_ on_ path - Check whether
ffmpegappears to be available onPATH. - loop_
- Loop an animation over
period_framesusing the selected loop mode. - mix
- Blend between
aandbusing animated blend factort. - mix_
manifest - Mix all manifest segments into interleaved output PCM.
- normalize_
effects - Fold parsed effects into inline and pass-level representations.
- normalize_
rel_ path - Normalize and validate composition-relative asset paths.
- parse_
effect - Parse a user-provided effect instance into typed effect data.
- parse_
svg - Parse SVG bytes into a prepared
usvgtree. - parse_
transition - Parse a full
TransitionSpecobject. - probe_
video - Probe source video metadata through
ffprobe. - render_
frame - Evaluate + compile + render a single frame.
- render_
frames - Render a range of frames (inclusive start, exclusive end).
- render_
frames_ with_ stats - Render a frame range and return both frame data and rendering stats.
- render_
to_ mp4 - Render a composition to an MP4 by invoking the system
ffmpegbinary. - render_
to_ mp4_ with_ stats - Render a frame range to MP4 and return rendering stats.
- resolve_
layout_ offsets - Resolve per-clip layout offsets for all tracks in a composition.
- reverse
- Reverse an animation over a fixed
duration_frameswindow. - sequence
- Play animation
a, then switch tobat framea_len. - speed
- Speed up (
factor > 1) or slow down (0 < factor < 1) an animation. - stagger
- Chain multiple animations with per-animation start offsets.
- video_
asset - Create video asset configuration with default trims/playback controls.
- video_
source_ time_ sec - Map clip-local timeline frame to source video time in seconds.
- write_
mix_ to_ f32le_ file - Write interleaved
f32PCM samples to raw little-endian file.
Type Aliases§
- Wavyte
Result - Convenience result type used across Wavyte.