Skip to main content

Crate wavyte

Crate wavyte 

Source
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

  1. Evaluate: Composition + FrameIndex -> EvaluatedGraph (what is visible, in what order)
  2. Compile: EvaluatedGraph -> RenderPlan (backend-agnostic passes over explicit surfaces)
  3. Render: RenderPlan -> FrameRGBA (CPU backend)
  4. Encode (optional): stream frames to the system ffmpeg binary for MP4 output

The key design constraints in v0.2.1:

  • No unsafe: unsafe is 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.
AssetKey
Normalized identity key used to derive deterministic AssetId values.
AudioAsset
Audio asset configuration including trims and fades.
AudioInputConfig
External raw PCM audio input fed into ffmpeg.
AudioManifest
Audio rendering plan for a timeline frame range.
AudioPcm
Decoded interleaved floating-point PCM.
AudioSegment
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.
ClipBuilder
Builder for Clip values.
ClipProps
Per-clip render properties (animated).
CompositePass
Composite multiple surfaces into a target surface.
Composition
A complete timeline composition.
CompositionBuilder
Builder for Composition.
CpuBackend
CPU renderer implementation backed by vello_cpu.
Edges
Padding edges in pixels.
EffectInstance
Raw effect instance attached to a clip.
EncodeConfig
Configuration for MP4 encoding via the system ffmpeg binary.
EvaluatedClipNode
Evaluated clip node consumed by the compiler.
EvaluatedGraph
Fully evaluated frame graph before compilation.
Evaluator
Stateless evaluator from composition timeline to frame graph.
FfmpegEncoder
Streaming MP4 encoder that wraps the system ffmpeg binary.
Fps
Frames-per-second represented as a rational num/den.
FrameFingerprint
Deterministic 128-bit fingerprint of an evaluated frame graph.
FrameIndex
Absolute 0-based frame index in composition timeline space.
FrameRGBA
A rendered frame as RGBA8 pixels.
FrameRange
Half-open frame range [start, end) in timeline space.
FxPipeline
Normalized effect pipeline for one clip.
ImageAsset
Raster image asset configuration.
InlineFx
Inline effects folded directly into draw operation state.
Keyframe
One keyframe in a keyframed animation.
Keyframes
Keyframed animation with optional default value.
LayoutOffsets
Precomputed per-track/per-clip placement offsets from layout solving.
OffscreenPass
Run a post-processing effect producing a new surface from an input surface.
PathAsset
Inline path asset configuration.
Point
A 2D point.
PreparedAssetStore
Immutable store of prepared assets keyed by composition asset keys and hashed IDs.
PreparedAudio
Prepared audio clip stored as interleaved f32 PCM.
PreparedImage
Prepared raster image in premultiplied RGBA8 form.
PreparedPath
Prepared vector path asset parsed from SVG path data.
PreparedSvg
Prepared SVG asset represented as a parsed usvg tree.
PreparedText
Prepared text asset: shaped layout plus backing font data.
PreparedVideo
Prepared video asset metadata and optional decoded audio track.
Rect
A rectangle.
RenderPlan
Backend-agnostic render plan for a single frame.
RenderSettings
Backend-agnostic settings.
RenderStats
Aggregated rendering counters.
RenderThreading
Threading and chunking controls for multi-frame rendering.
RenderToMp4Opts
Options for render_to_mp4.
ResolvedEffect
Effect instance resolved for a specific evaluated node.
ResolvedTransition
Transition state resolved for a specific frame.
Rgba8Premul
Premultiplied RGBA8 (r,g,b already multiplied by a).
SampleCtx
Sampling context provided to animation evaluators.
ScenePass
Draw operations into a surface.
SurfaceDesc
Surface declaration: dimensions + pixel format.
SurfaceId
Identifier for a render surface declared in RenderPlan::surfaces.
SvgAsset
SVG asset configuration.
TextAsset
Text asset configuration.
TextBrushRgba8
RGBA8 brush color used by Parley text layout.
TextLayoutEngine
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.
TrackBuilder
Builder for Track values.
Transform2D
Authoring-space transform components for a clip.
TransitionSpec
Transition specification attached to clip edge.
Vec2
A 2D vector.
VideoAsset
Video asset configuration including trims and audio controls.
VideoSourceInfo
Basic metadata about a source video file.

Enums§

Anim
Generic animation node supporting keyframed, procedural, and expression sources.
Asset
An asset referenced by clips.
BackendKind
Available backend kinds.
BlendMode
Blend mode used when compositing a clip.
CompositeOp
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.
InterpMode
Interpolation strategy between keyframes.
LayoutAlignX
Horizontal alignment options for layout.
LayoutAlignY
Vertical alignment options for layout.
LayoutMode
Auto-layout mode for clips within a track.
LoopMode
Looping strategy used by the loop expression variant.
Pass
A single pass in a RenderPlan.
PassFx
Effects that require explicit offscreen render passes.
PixelFormat
Supported pixel formats for render surfaces.
PreparedAsset
Union of all prepared asset kinds consumed by evaluator/compiler/renderers.
TransitionKind
Parsed transition kind used during compile/composite.
WavyteError
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§

PassBackend
Backend execution interface for individual render pass kinds.
RenderBackend
A renderer that can execute a compiled RenderPlan into a FrameRGBA.

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 f32 PCM.
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 path if it does not exist.
execute_plan
Execute all passes in a RenderPlan against a PassBackend.
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 ffmpeg appears to be available on PATH.
loop_
Loop an animation over period_frames using the selected loop mode.
mix
Blend between a and b using animated blend factor t.
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 usvg tree.
parse_transition
Parse a full TransitionSpec object.
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 ffmpeg binary.
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_frames window.
sequence
Play animation a, then switch to b at frame a_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 f32 PCM samples to raw little-endian file.

Type Aliases§

WavyteResult
Convenience result type used across Wavyte.