MICROMACHINA

Crank the gain. 60 seconds. Hyper-velocity dialogue at 250–800 words per minute, spliced into 15 four-second Veo 3.1 clips with a Lyria score. An ad that shocks people into hitting “buy now” before they blink.

Veo 3.1 LiteLyria 3MAI-Voice-2 Turbo$1.89/render116 hermetic tests

The Algorithm

Prompt in. Shockwave MP4 out.

Six composed stages turn one pitch into a 60-second music video. Every artifact is checkpointed to disk, every retry is classified, every dollar is confirmed before spend.

MicroMachina generation pipelineP01 · Script Directorgemini-3.5-flash~$0.0002 · Word Budgeterformulaic03 · Turbo VoiceoverMAI-Voice-2~$0.0104 · Silent Veo Clipsveo-3.1-lite$1.8005 · Lyria Scorelyria-3-clip$0.0806 · ffmpeg Muxnormalize → concat → mixlocal
01gemini-3.5-flash
Script Director

LLM writes a structured epoch-by-epoch spec: camera, lighting, background, foreground, action, and dialogue for 15 contiguous 4s epochs.

~$0.00

02formulaic
Word Budgeter

Words per epoch capped at ⌊(W/60)·4·0.80⌋. Dialogue fills 80% of the budget so lines breathe and never need aggressive stretching.

03MAI-Voice-2
Turbo Voiceover

Each line synthesized at native speed up to 2.0×, then a pitch-preserving ffmpeg atempo chain hits 250–800 WPM.

~$0.01

04veo-3.1-lite
Silent Veo Clips

15×4s silent clips (720p) with optional first-frame character anchors, generated 6-in-parallel. Music + voice are mixed in later.

$1.80

05lyria-3-clip
Lyria Score

Two 30s music clips with a continuity prompt, generated in parallel and concatenated into a 60s bed.

$0.08

06normalize → concat → mix
ffmpeg Mux

Clips normalized to 720p (tpad-cloned to exact length), concatenated, mixed with a 20% music bed + slot-faded voice, and muxed to final.mp4.

local

generateClipWithRetry

Retry classification distinguishes transport failures from safety-filter failures — surfaced in two structurally different shapes by the provider — and escalates each attempt with a fresh seed, a sanitized prompt, and (from the second attempt) no reference anchor.

generateClipWithRetry — classification-driven retry with backoffattemptseedpromptfirst-frame anchork = 0s + 0sanitize(p, 0)reference ✓k = 1s + 1sanitize(p, 1)dropped — provider rejected inputfilteredk = 2s + 2sanitize(p, 2)droppedClassifier catches both safety-filter forms; backoff sleep(1000·k); filter ⇒ re-submit, never hard-fail.

Failure taxonomy

  • Transport — connection resets, truncated downloads. Retryable as-is.
  • Safety-filter (A) — completed job, no output URL.
  • Safety-filter (B) — failed job carrying “content may have been filtered”. Both forms need prompt changes, not just a seed change.
  • Reference-image rejection — a first-frame anchor the provider refuses. Correct response: drop the anchor.
  • Provider outage — persistent 5xx. Non-retryable within a bounded budget.

Benchmarks

Numbers with receipts

Reliability-critical logic is benchmarked hermetically — the provider is mocked, so no paid API call is made. Local ffmpeg timings are measured; end-to-end latency is clearly labeled as projected.

Per-asset cost

Estimated per-asset spend — $1.89 total$1.89 total · confirmed before spend$1.80Video$0.08Music$0.01TTS$0.00ScriptVideo dominates — $0.03/s silent Veo, music $0.04/clip, TTS ~$0.000022/token.

Projected latency

Projected wall-clock ≈ 7.7 min (no retries)Video — 15 clips, 6 parallel≈90s each at 720p225sMusic — 2×30s Lyria clipsgenerated in parallel120sTTS — 44 lines, concurrency 3≈8s per line117sTotal ≈ 7.7 min projected wall-clockFormulaic estimate, not a production measurement — provider jitter dominates.

Dialogue tempo

Dialogue tempo — 250 to 800 WPMRelaxed250 WPMClear400 WPMRecord-Breaker600 WPMLudicrous800 WPMWords per epoch = ⌊(W/60)·4·0.80⌋ — dialogue fills 80% of each 4s slot.
MetricDetailResult
Hermetic test suiteReliability-critical logic, provider mocked, no paid calls116 tests
Wall time (suite)Runs on 2.4 GHz Apple M1 / 16 GB≈6.2s
ffmpeg battle testNormalize 8 mixed clips → concat 32s → mux (local, no API)4.6s
Retry classificationBoth safety-filter forms detected, zero false hard-failures100%
ResumabilityNon-terminal stages checkpointed before consumption100%
⚡ Measured locally — reproducible, free🕐 Projected — provider latency model, not a production run🔒 No paid API calls in any benchmark

The Studio

Crank the gain.

The Maker Studio turns a one-sentence pitch into a full epoch-by-epoch spec: camera grammar, lighting, character anchors, and word-budgeted dialogue across 15 four-second slots. Pick 250, 400, 600, or 800 WPM, see the estimated cost before any spend, and render the whole spot in one crank.

250 / 400 / 600 / 800 WPM15 × 4s epochs~$1.89 est. / render

GitHub Pages is static-only

The live Studio drives multi-minute background jobs, polls OpenRouter, and runs ffmpeg — it needs a long-running Node process, so it can't run on this static site. Clone the repo, runnpm run dev, and open /maker.

MicroMachina Maker Studio: pitch textarea, tempo selector, character cards, epoch timeline grid, and render control

The Paper

Read the preprint

An ACM-style industrial paper documents the pipeline discipline: checkpointed resumability, classification-driven retries, and a financial-safety layer that makes a flaky hosted-AI stack behave like a deterministic build.

ACM-style industrial paper · sigconf

MicroMachina: A Production-Grade, Resumable Pipeline for Programmatic Fast-Talk Music-Video Commercial Generation

Composes five hosted generative models (LLM script director, TTS, text-to-video, music, ffmpeg mux) into a deterministic build. Contributions: a disk-backed checkpoint manifest, a classification-driven retry policy, and a financial-safety layer.

Download PDF8 pp. preprint

Your browser can't preview PDFs inline.

Open PDF in new tab