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.
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.
LLM writes a structured epoch-by-epoch spec: camera, lighting, background, foreground, action, and dialogue for 15 contiguous 4s epochs.
~$0.00
Words per epoch capped at ⌊(W/60)·4·0.80⌋. Dialogue fills 80% of the budget so lines breathe and never need aggressive stretching.
—
Each line synthesized at native speed up to 2.0×, then a pitch-preserving ffmpeg atempo chain hits 250–800 WPM.
~$0.01
15×4s silent clips (720p) with optional first-frame character anchors, generated 6-in-parallel. Music + voice are mixed in later.
$1.80
Two 30s music clips with a continuity prompt, generated in parallel and concatenated into a 60s bed.
$0.08
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.
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
Projected latency
Dialogue tempo
| Metric | Detail | Result |
|---|---|---|
| Hermetic test suite | Reliability-critical logic, provider mocked, no paid calls | 116 tests |
| Wall time (suite) | Runs on 2.4 GHz Apple M1 / 16 GB | ≈6.2s |
| ffmpeg battle test | Normalize 8 mixed clips → concat 32s → mux (local, no API) | 4.6s |
| Retry classification | Both safety-filter forms detected, zero false hard-failures | 100% |
| Resumability | Non-terminal stages checkpointed before consumption | 100% |
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.
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.

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.