One Change Per Render: Designing a Video Repair Pipeline Around an Instruction-Based AI Editor
We build Univid, an instruction-based AI video editor — that's the disclosure, up front. It is also the reason I have opinions about pipeline design, because our tool is deliberately not a video editor: it changes exactl
We build Univid, an instruction-based AI video editor — that's the disclosure, up front. It is also the reason I have opinions about pipeline design, because our tool is deliberately not a video editor: it changes exactly one thing in one clip per render, and everything else in a real post-production workflow has to happen somewhere else. This article is the engineering case for structuring your video work as a pipeline of narrow stations instead of searching for one do-everything toolbox. Roughly 90% of what follows is general pipeline engineering that applies no matter which repair tool you use; the product only appears where a concrete example helps.
"One change per render" is an architecture, not a limitation
The newest class of video tools — instruction-based editors — accepts a clip and a one-line instruction ("remove the ladder", "golden hour from the left", "light snow"), applies that single change, and returns the same shot with everything else untouched. The obvious first reaction from engineers is disappointment: where are the transitions, the titles, the multi-track timeline? The productive reaction is to recognize the shape of the thing. This is a station: a component with a narrow input contract, one job, and a defined exit format. Unix taught us this lesson forty years ago; microservices re-taught it to a generation; video tooling is just the latest domain where composable single-purpose parts beat monoliths.
The architectural consequence is that you don't ask whether the station can replace your editor. You design the pipeline around it: what feeds it, what it costs per run, how you verify its output, and what re-integrates its results into the finished piece. The rest of this article walks through that design station by station, with the budget math and failure modes that decide whether the pipeline actually saves time.
Station contracts
Every station below has an entry format, a narrow job, and an exit format. State them precisely before you build; every bad pipeline I've seen came from fuzzy station boundaries.
Station 1 — Ingest and normalization. Instruction editors read mainstream delivery formats, not production formats. Ours takes a single MP4 or MOV up to 95 MB and 10 minutes, with aspect ratio between 9:16 and 16:9 — and those numbers are representative of the class, not quirks. Camera masters (BRAW, MXF, ProRes with data layers) must be converted or conformed first, in your editor or a transcode farm. The size ceiling is a real design constraint, not an inconvenience to route around: a 60-second 4K clip at a camera bitrate blows past it. Normalize by exporting the candidate segment at delivery-ish resolution (1080p is a natural fit — most instruction-edit renders come back at 720p anyway), not by uploading masters and praying.
Station 2 — Prep. Trim the seconds that need the fix, crop to delivery aspect, mute if the audio shouldn't leave your machine. In our station these ops are free, which matters for the budget math below. The discipline that matters: renders bill per second of the trimmed segment, so the segment you trim is the segment you pay for. Fix the seconds that need fixing, nothing more.
Station 3 — Task routing. Five task types cover the useful space: Remove (an object gone, background filled in across every frame), Replace (one item swapped for another in the same place, scale and motion), Relight (time of day, hardness, color temperature shift), Weather (sky state, rain, snow, fog), and Extend (the shot continues past its last frame by a fixed increment). Behind the scenes these route to different generative video models — in our case remove/replace, relight/weather, and extend each run on a different engine — but the pipeline-level point is that task selection happens before any pixel is generated. Picking the wrong task is the one error no downstream QA catches cheaply.
Station 4 — Preview gate. The cheapest quality control ever invented for this class of tool: render the edit onto one still frame and look at it, for a token cost (ours is 25 credits, against render runs that cost hundreds). If the instruction was misparsed — wrong object, wrong region — you find out for 25 credits instead of 510. Skip previews only when re-running a near-identical edit that already previewed cleanly.
Station 5 — Render. Server-side generation, billed per second of the trimmed segment, with the total shown on the button before you commit. A shot needing two changes is two renders — there is no "combined" pass, and pretending otherwise is how budgets die.
Station 6 — Finish. The edited segment comes back silent. This is the station boundary that decides whether the pipeline works at all, and it deserves its own section.
The budget math you can actually plan around
Per-second billing makes cost arithmetic embarrassingly concrete, which is a feature. With our published rates: remove/replace at 720p runs 102 credits per second of the trimmed clip (136 at 1080p), with a 3-second minimum; relight/weather runs 46 per second with a 4-second minimum; extend costs 164 credits for +5 seconds or 324 for +10. A preview frame is 25 credits.
Worked example, the kind to run before you promise a client anything: a 5-second object removal at 720p is 5 × 102 = 510 credits. The same fix trimmed to 3 seconds is 306. A relight on those same 5 seconds is 230 — literally half the remove price, which is why task choice belongs in the planning conversation, not just the creative one. A shot needing a remove and a relight is two renders (510 + 230) plus two previews (50): 790 credits total, and every credit of it is visible before you start.
Two rules fall out of the arithmetic. First, previews add 5–10% overhead to a job and routinely save 100% of a misread render — run them on every first attempt. Second, trim discipline is budget discipline: the model doesn't need 40 seconds of context around a 4-second fix, but your credit balance absolutely pays for them.
Writing instructions is interface design
The instruction line is a program interface with a very strict linter. The reliable pattern, in every example worth copying: name the object and its position — "the small rowboat on the water", "the wooden bench at center frame". The failure patterns are just as consistent:
- Vague referents. "Make it look better" parses to a random subset of the frame. If you can't point at the thing in words, you can't route this task.
- Multi-object instructions. "Remove the sign and the cones" invites one change; split it into two renders — which the one-change-per-render contract forces anyway.
- Off-screen requests. The station edits what the camera saw. "Remove the generator we parked behind the building" is not a task, it's a reshoot.
- Identity requests. Face edits, lip-sync, making someone appear to say something — these are refused by policy before any model runs and before any charge. Treat the refusal as a hard API error, not a prompt-engineering challenge; the lawful alternative is a different workflow entirely, not a cleverer sentence.
The silent-output contract
Why would a tool return video without sound? Because the sound was never in scope. The edit operates on frames; the audio track of your original recording is untouched by definition, and shipping a silent segment back is the honest way to say "audio integration is your station, not mine."
Design the return path deliberately: in your timeline editor, lay the original audio back under the returned segment and check sync at the trim boundaries. For removes and weather changes, ambient audio usually survives untouched. For replaces, listen for whether the replaced object had a sonic signature (a bench scraping, a machine humming) and decide whether its absence matters. And since the upload itself carries audio unless you strip or mute it — muting in-station is free in ours — anything you wouldn't upload to a third party should be stripped at export. Make that a rule in your ingest station, not a habit you hope someone remembers.
One more retention detail that pipelines forget: uploads and trims are typically deleted on a short window (ours: 7 days; finished edits: 30). Download keepers immediately and file them in your project archive — re-running an edit after the window means re-uploading, which means your ingest station should keep the normalized candidate segments, not just the masters.
Driving the station programmatically
For teams, the interesting interface isn't the web studio — it's the API surface. Ours exposes an MCP server (list_tasks, import_clip, cut_clip, preview_edit, render_edit, get_edit, list_edits, get_credits) with OAuth 2.1 and API keys on the higher plan tiers, and every serious tool in this class is moving the same direction: stations you can call, not GUIs you must click. The pipeline pattern that works:
-
Watch credit balance before batch jobs (
get_credits), and abort the batch at a floor rather than discovering the wall mid-render. -
Never render without a preview (
preview_edit→ human eyeball →render_edit). The gate stays human even when the loop is automated; auto-approving previews converts your cheapest QA into your most expensive error channel. -
Treat renders as jobs with state (
get_edit/list_edits), because generation is asynchronous and failure is a normal outcome — the API refunds failed renders automatically, but your job queue should still expect a non-zero failure rate and retry with a rewritten instruction, not a blind re-roll. - Log instructions like prompts. The instruction line that produced a clean edit is an asset; version it next to the project, because you will re-run this shot against new takes.
Failure modes you'll meet in week one
The master upload. A 2 GB ProRes file fails the size gate and burns a cycle. The fix is upstream: normalize at ingest.
The context trim. "Give the model room around the fix" reads sensible and bills terrible. 3–15 seconds, chosen tightly.
The skipped preview. Twenty-five credits against a five-hundred-credit render that misread the line. The gate exists because misparsing is common, especially with multiple objects in frame.
The moving-target remove. Object crosses in front of people, or leaves frame and returns: the documented weak case for automated removal. Route it to manual rotoscoping in your editor — that's not a failure of the pipeline, it's the routing working as designed.
The combined fix. "Remove the sign and relight to dusk" — two tasks, one instruction. Split it, preview each, render each, and compare both against the source before stacking.
The missing audio return. The pipeline's output is a silent segment; if nobody owns station 6, the shot never finishes. Assign it.
What belongs in a different station
Boundaries, stated plainly: whole-film cutting, titles, transitions, and music live in your timeline editor. Identity changes are refused outright. On-screen text you want changed is not a task — re-render the graphic or cover it in post. Fast, occluded, or off-screen subjects route to manual tools. And honest ranking of output quality across competing repair tools requires paid renders on your own footage — the preview gate is exactly the mechanism that lets you run that comparison cheaply on your shots instead of trusting anyone's demo reel, including ours.
That's the whole design. The instruction editor is not a threat to your editor and not a magic box; it's a well-specified station with real costs and real limits, and the teams who get value from it are the ones who wrote the pipeline down before the first upload. Six stations, one change per render, previews on everything, audio owned by someone. The work you feed it finishes; the work you don't, doesn't.
Originally published by Dev.to AI. Aggregated on AIWithGhost for educational purposes — full credit and traffic to the original publisher.