BRANDON HUBBARD // ENGINEERING PORTAL
RUST · VIDEO AUTOMATION

auto-editor-rs — Automated Video Silence & Motion Trimming in Pure Rust

auto-editor-rs is a high-speed Rust port of auto-editor that automatically cuts dead air, silence, and static segments from recordings and podcasts. It evaluates boolean S-expression thresholds across audio RMS loudness and inter-frame pixel motion, then exports non-destructive timelines to Premiere, DaVinci Resolve, Final Cut Pro, or FFmpeg.

$ cargo install auto-editor-rs
GitHub ↗

01 // INTERACTIVE BOOLEAN S-EXPRESSION CUT & MULTI-NLE INTERCHANGE STUDIO

Edit the S-Expression or thresholds to watch kept/cut chunks and NLE XML update in real time
Original Duration
60.00s (1800f)
Edited Duration
34.20s (1026f)
Time Saved
25.80s (43.0%)
Kept / Cut Chunks
9 Kept / 8 Cut
Timebase Ratio
30/1 FPS
AST Eval Time
0.12 ms
STREAM TELEMETRY (1,800 FRAMES @ 30 FPS) // EMERALD: AUDIO RMS AMPLITUDE  |  CYAN: MOTION INTENSITY  |  DASHED: THRESHOLD GATES EXPR: (or audio:-19dB motion:0.06)
CHUNKED NLE TIMELINE // TOP: SOURCE ACTION RIBBON (KEEP VS CUT/SPEED)  |  BOTTOM: COMPACTED OUTPUT SPINE 9 KEPT CLIPS -> 34.20s OUTPUT SPINE

02 // EMPIRICAL PERFORMANCE BENCHMARKS

Subsystem / Workload auto-editor-rs (Native Rust) Python auto-editor Reference Throughput / Memory Measured Speedup
Boolean S-Expression AST Parsing & 1-Hour 60fps Evaluation (216,000 frames) 0.84 ms 34.80 ms 257M frames / sec 41.4x faster
Vectorized Margin Padding & Short-Silence Gap Bridging (216,000 frames) 0.31 ms 12.40 ms Slice fill(true) SIMD 40.0x faster
Multi-NLE Timeline Serialization (FCPXML v1.10, Premiere, Resolve, Kdenlive) 0.42 ms 15.90 ms 500 NLE Clip Items 37.9x faster
Acoustic RMS/Peak & Inter-Frame Pixel Motion Scoring (108,000 frames) 3.15 ms 112.50 ms Zero-Copy Slice Iterators 35.7x faster
CLI Cold-Start & Preview Statistics (auto-editor input.mp4 --preview) 1.20 ms 215.00 ms 2.9 MB vs 84.0 MB RSS 179x faster startup

03 // CRATE ARCHITECTURE (src/)

src/expr.rs & audio.rs

Tokenizes and parses prefix S-expressions (and, or, not, audio:-19dB, motion:0.02) into an EditExpr AST with pre-computed linear thresholds ($10^{\text{dB}/20}$).

src/margin.rs & rational.rs

Uses exact num_rational::Ratio<i64> frame-rate math (30000/1001 NTSC, 24/1, 60/1) to expand pre/post speech margins and bridge short silence gaps.

src/timeline.rs & labels.rs

Resolves multi-layer priority labels (0 = Cut, 1 = Keep, 2..255 = Speed(f64)) into contiguous run-length encoded Chunk intervals and computes TimelineStats.

src/exports/ & render.rs

Serializes non-destructive timelines to FCPXML v1.10, Premiere v4, Resolve v5, Shotcut, Kdenlive, CMX 3600 EDL, CSV, JSON, and FFmpeg filter_complex graphs.