RUST · AGENTIC VIDEO PRODUCTION

openmontage-rs — Agentic Video Production & Non-Linear Timeline Sequencer in Rust

openmontage-rs is a pure Rust programmatic video production engine designed for both human editors and autonomous AI agents. It compiles declarative JSON/YAML storyboards, automated B-roll placement, and kinetic typography into frame-accurate multi-track video masters.

$ cargo install openmontage-rs
GitHub ↗
01 // Interactive Sequencer, Pacing Gate & Budget Ledger

6-Track NLE Timeline & Shotlist Pacing Studio

Simulating Timeline + PacingValidator + PipelineRegistry + CostTracker
Primary Video Overlaps: 0 Overlaps (Valid)
Slideshow Risk Gate: LOW (Dynamic Camera)
Framing Variety Score: 100% (4+ ShotTypes)
Avg Shot // Total Duration: 3.50s // 28.0s
Estimated Cost // Remaining: $3.95 // +$6.05 USD
PIPELINE STAGE-GATE DAG // CINEMATIC NARRATIVE (v1.0.0) 1920×1080 @ 30.0 FPS // -16.0 LUFS Master
CLI Equivalent: openmontage plan -s "Reel" -p cinematic --budget 10.0 -o playbook.json Playhead: 00:00.000
02 // Modular Rust Workspace

openmontage-core & openmontage-cli Architecture

openmontage_core::timeline 6-Track NLE Sequencer

Millisecond-accurate non-linear editing timeline (Timeline, TimelineClip) across 6 track types (Video, BRoll, Voiceover, Music, SoundEffects, Subtitles) with validate_primary_video_overlaps().

assert!(timeline.validate_primary_video_overlaps());
openmontage_core::shot Pacing & Slideshow Gate

Analyzes sequences of Shot definitions across 8 ShotType framings and 9 CameraMotion trajectories, computing average cut length, short/long cut counts, consecutive static slideshow risk, and framing variety score.

let report = PacingValidator::analyze(&shots); assert!(!report.slideshow_risk);
openmontage_core::pipeline Stage-Gate DAGs

Built-in and YAML-configurable production pipelines (cinematic, animated-explainer, avatar-spokesperson) with per-stage required inputs, artifacts, automated verification gates, and cost estimates.

let reg = PipelineRegistry::standard_pipelines();
openmontage_core::audio -12dB Ducking & LUFS

Broadcast audio stem mixer (AudioMixer::mix_tracks) with a 100 ms sliding-window voiceover activity detector that attenuates music stems by ducking_db (-12.0 dB) and normalizes the master to -16.0 LUFS with soft-knee limiting.

let mixed = AudioMixer::mix_tracks(&vo, &music, &AudioMixConfig::default());
openmontage_core::cost Multi-Provider Ledger

Tracks LLM tokens, video diffusion seconds, and TTS character spend across providers (CostTracker, CostRecord, CostSummary) with real-time budget overrun gates.

tracker.record("VideoDiffusion", "Shots", 32.0, "seconds", 0.12);
openmontage_core::manifest Playbook Serialization

Serializes and loads reproducible ProductionManifest playbooks and RenderedAsset inventories to pretty-printed JSON.

manifest.save_to_file("playbook.json")?;
openmontage_core::config Aspect Ratio & Config

Strongly-typed ProductionConfig and AspectRatio (16:9 Landscape, 9:16 Portrait, 1:1 Square) resolution calculators.

let (w, h) = AspectRatio::Landscape16x9.dimensions(1080); // (1920, 1080)
openmontage-cli 6 CLI Subcommands

The openmontage command-line interface supporting plan, render, pipelines, validate, cost, and bench.

openmontage bench --clips 500 --sample-rate 44100
03 // Verified Performance Telemetry

Empirical Benchmarks: openmontage-rs vs Reference Python Pipeline

Full BENCHMARKS.md Report ↗
Subsystem / Kernel Rust Module Workload openmontage-rs (Rust) Reference Python Pipeline Speedup & Engineering Advantage
NLE Timeline Validation timeline::Timeline 1,000 clips primary video overlap check 48.0 µs 1.82 ms (moviepy) 37.9x faster + Zero-copy slice sort
Pipeline DAG Deserialization pipeline::PipelineRegistry 4-stage YAML pipeline & stage-gate parse 62.0 µs 2.15 ms (PyYAML) 34.7x faster + Strongly-typed stage gates
Shotlist Pacing & Variety shot::PacingValidator 500 shots slideshow-risk & framing variety 14.2 µs 490.0 µs (Python validator) 34.5x faster + O(N) single-pass scan
Manifest & Cost Ledger manifest + cost Playbook JSON + multi-provider cost summary 19.0 µs 610.0 µs (Python JSON) 32.1x faster + Deterministic budget gate
44.1 kHz Audio Ducking + LUFS audio::AudioMixer 60s @ 44.1kHz 100ms window ducking + -16 LUFS 1.84 ms 58.40 ms (pydub + numpy) 31.7x faster + Soft-knee tanh limiter
04 // Reproducible Workflows

CLI & Rust SDK Quickstart

TERMINAL // CLI PLANNING, VALIDATION & AUDIO MIXING
# Clone and run all workspace unit & integration tests
git clone https://github.com/bhubbard/openmontage-rs.git
cd openmontage-rs
cargo test --workspace --release

# 1. Inspect available production pipelines and stage gates
cargo run --release -p openmontage-cli -- pipelines

# 2. Generate a cinematic production playbook with a $10 budget cap
cargo run --release -p openmontage-cli -- plan \
  --script "Autonomous Rust Video Engine" \
  --pipeline cinematic --budget 10.0 --output playbook.json

# 3. Run the 500-clip NLE timeline & 44.1 kHz audio mixing benchmark
cargo run --release -p openmontage-cli -- bench --clips 500 --sample-rate 44100
RUST SDK // NLE TIMELINE, PACING VALIDATOR & MIXER
use openmontage_core::{
    AudioMixConfig, AudioMixer, CameraMotion, PacingValidator, Shot, ShotType,
    Timeline, TimelineClip, TrackType,
};

fn main() {
    // 1. Assemble a non-overlapping primary video timeline
    let mut tl = Timeline::new("Launch Reel", 30.0);
    tl.add_clip(TimelineClip {
        id: "shot_1".into(),
        track_type: TrackType::Video,
        source_path: "intro.mp4".into(),
        in_point_ms: 0,
        out_point_ms: 3500,
        timeline_start_ms: 0,
        volume: 1.0,
        opacity: 1.0,
    });
    assert!(tl.validate_primary_video_overlaps());

    // 2. Validate camera motion pacing & framing variety
    let shots = vec![Shot {
        id: "s1".into(),
        shot_type: ShotType::AerialDrone,
        motion: CameraMotion::Orbit,
        description: "Establishing shot".into(),
        duration_seconds: 3.5,
        visual_prompt: "Aerial sunrise".into(),
    }];
    let report = PacingValidator::analyze(&shots);
    assert!(!report.slideshow_risk);
}