Loading WURK...
RomanMotion
RomanMotion
Product ad & launch videos · 3D product visuals · app & AI builder. Concept to final cut in days. Open for projects.

Build an AI Video Editing Workflow With a Coding Agent and Local Tools

Hand a coding agent one folder and three prompts: it transcribes, cuts pauses, captions and levels your clip, then waits for your GO to render.

Published on November 7, 202610 min read

Originally published on the Jack Gross blog.

A step-by-step pipeline you can hand to any coding agent. It transcribes your clip, cuts the pauses, burns in captions, balances the loudness and renders a vertical short - with an explicit storyboard-approval step before the final render.

At a glance

  • One coding agent with file access (ZCode, or any agent that can read a folder and run commands) becomes your editor. Everything else is free and open source.
  • Four tools and one style file do the work: FFmpeg cuts and encodes, whisper.cpp transcribes, yt-dlp fetches reference clips, HyperFrames renders titles and graphics, and a plain text file called STYLE.md remembers your style.
  • The whole system is one folder, three prompts and a single rule: no render without your yes on the storyboard.
  • The FFmpeg checks below are commands you run on your own clip. The full pipeline is a starting point, not a benchmark; the source note explains the limits.

What you are building

The workflow is an editing folder on your own machine: you drop a raw clip into a folder, type one sentence, and an agent does the mechanical bulk of editing - silence removal, captions, punch-ins, music level, export - while you keep the creative calls: taste, structure and the final yes.

The aim is to reduce guesswork about your style. You teach it once, from clips you pick, and it writes that style down as a document it must follow. Require a shot-by-shot plan before the final render. This is a prompt-level instruction, not a technical sandbox or a guaranteed approval interlock. Inspect the proposed commands and keep publishing credentials out of the project.

Four free local tools, plus your coding agent

PieceJobGet it
ZCode (desktop), or another coding agent with file accessThe agent. Reads your folder, runs commands, writes fileszcode.z.ai
FFmpegCutting, encoding, captions, loudnessffmpeg.org
whisper.cppSpeech to text, local inferencegithub.com/ggml-org/whisper.cpp
yt-dlpDownloading reference clips you have rights togithub.com/yt-dlp/yt-dlp
HyperFramesTitles, motion graphics, rendered to MP4 from HTMLgithub.com/heygen-com/hyperframes

ZCode is real desktop software, not a browser tab: its installer covers macOS, Windows and Linux, and it connects to GLM Coding Plans. Any other coding agent works if it can read the folder and run commands. Everything else on the list costs nothing. HyperFrames is the newest piece and the most agent-friendly: an Apache-2.0 framework whose whole pitch is "write HTML, render video," built so coding agents can drive it from the CLI.

Step 1: Give the agent a workbench

Create one folder. This is the entire infrastructure:

editing-bay/
  inbox/        raw clips land here, straight from the camera
  references/   3-5 clips whose style you want to keep
  brand/        STYLE.md - your editing style guide, written by the agent
  review/       storyboard.md waits for your yes before any render
  done/         finished, captioned, normalized videos

Open your coding agent, start a new session and point it at editing-bay/ as the working directory. In ZCode you pick the project folder at session start; other agents have an equivalent "open folder" step. From that moment the agent sees every clip, note and render inside it. FFmpeg and whisper.cpp can process footage locally. That does not make the coding agent local-only: prompts, file excerpts, transcripts, screenshots and tool outputs it reads may be sent to its model provider. Check the agent's settings and data policy before using private footage. Do not upload clips to optional cloud rendering or paid generation services in this workflow.

Step 2: Install the tools with one prompt

Ask the agent to plan the setup first. Review the proposed installs before authorizing changes:

You are my video-editing assistant. Set up my workbench. Use only free local processing. List proposed installs
and downloads first; wait for my approval before changing the machine.
1. Make sure these tools are installed and working: ffmpeg, yt-dlp,
   whisper.cpp with the base.en model, and the HyperFrames CLI
   (npx hyperframes). After approval, install only the listed missing dependencies.
2. Prove each one works - run its version command, and for whisper.cpp
   convert two seconds of an approved inbox clip to 16 kHz mono PCM WAV,
   then transcribe that WAV. Do not upload footage or transcripts.
3. Report back a table: tool, version, status, and what you will use it for.
If anything needs my password or a paid account, stop and ask first.

Two details matter here. "Prove each one works" forces a real check instead of a confident guess, and the last line keeps the agent from quietly spending money or escalating permissions. Keep both habits in every prompt you write for it.

Step 3: Teach your style once

This is the step every demo skips, and the reason their output looks generic. Collect three to five clips whose editing you like - your own past videos, or other clips you have permission to download and analyze - and put them in references/. Then:

Study every clip in ./references/. Analyze each one for:
- captions: font, size, position, colors, word-by-word or line-by-line
- tempo: average shot length, how aggressively pauses are removed
- framing: punch-ins, crops, when they happen
- color and sound: music mood, music volume under voice, ducking
Measure what you can with ffmpeg and whisper.cpp instead of guessing.
Then write ./brand/STYLE.md: a one-page style guide with concrete values
(font names, hex colors, seconds, LUFS targets) that you must follow for
every future edit. Show it to me before you edit anything.

The output is a plain markdown file, your brandbook. Read it, fix what is wrong, approve it. From now on every edit prompt references this file, which helps keep later edits consistent. Check the output instead of assuming that the agent followed every value.

Step 4: Run an edit

Film as usual. Drop the raw take into inbox/. Then:

Edit the raw clip in ./inbox/ into a vertical short, following ./brand/STYLE.md.
1. Transcribe it with whisper.cpp. Propose cuts for silences longer than 0.4 seconds
   and suspected failed takes; do not delete source footage.
2. Add captions as an SRT, then burn them in with the subtitle style from
   STYLE.md.
3. Normalize the voice to -16 LUFS integrated, true peak -1.5 dBTP.
   If STYLE.md calls for music, duck it at least 12 dB under the voice.
4. Build any titles or graphics with HyperFrames.
5. FIRST write ./review/storyboard.md - a shot-by-shot plan with timestamps,
   the caption text, and where every zoom and graphic lands - and stop.
   Render into ./done/ only after I reply GO.
If anything is ambiguous, ask before rendering, not after.
Keep originals unchanged. Do not publish, upload or use paid services.

The storyboard gate is one part of the quality check. Preview frames, listen to the audio and inspect the final captions too. The agent hands you a text plan: 00:00-00:03 hook line, caption "...", punch-in 1.2x at 00:05, music in at 00:08. You read it and reply with changes in plain words, exactly as you would with a human editor: "tighter at the top, caption the second line word by word, lose the zoom at 12 seconds." Ask it to revise the plan, then inspect the changes. When the plan reads right, say GO, then check the rendered file in done/. A successful command is not proof of a good edit.

Step 5: When something breaks

It will. A tool update breaks a flag, a model file goes missing, a render fails on a font. A useful first move is: paste the error back to the agent and say "fix this, then show me the working command." Ask it to explain the change and rerun the failing command; do not accept a claimed fix without output. One current example from the field: HyperFrames v0.9.19 (released November 6, 2026) fixes a missing-local-font failure in cloud render: it falls back to the next font in the stack and names the missing font, as local rendering already did. That release note is not a promise that every font problem is fixed. This tutorial uses local rendering, not the optional cloud service.

Quality gates: measure, don't trust

Do not take the pipeline's word for anything. Run these checks yourself on the raw clip and again on the export:

Silence detection. ffmpeg -i clip.mp4 -af silencedetect=noise=-30dB:d=0.35 -f null - prints every pause with its start, end and length. If it finds one pause where you expected ten, try a lower noise floor (-35dB) and compare. Dense speech can genuinely have few pauses; a noisy room can hide many. Inspect the intervals before applying cuts; a pause count alone does not tell you whether a threshold is right or wrong.

Loudness. ffmpeg -i clip.mp4 -af loudnorm=print_format=summary -f null - prints integrated loudness (LUFS) and true peak (dBTP). On the input those are measurements, not a quality score. Here -16 LUFS and -1.5 dBTP are chosen editing targets, not a universal platform requirement. Measure the exported file again and listen for distortion; a high true-peak reading on the input alone does not prove clipping.

Caption burn. Burn a short two-line test SRT with FFmpeg's subtitles filter and a force_style block (font, size, outline, bottom alignment), then look at a frame: it should sit inside the safe area of a vertical frame. Record the style values in STYLE.md, then check that later commands actually use them.

Contact sheet. ffmpeg -i clip.mp4 -vf fps=1 frames/f_%03d.jpg turns any clip into one frame per second, which is how the agent "watches" your footage and how you spot-check its claims in seconds.

If a step reports a number, ask for the command that produced it and re-run it yourself once. Trust, then spot-check.

Troubleshooting

SymptomLikely causeFix
Agent says a tool is missing right after installing itNew install not on PATH in the current sessionTell it to open a fresh shell or restart the session
Whisper transcription is slowModel too big for the machineSwitch to base.en or tiny.en in STYLE.md
Captions drift out of syncLong segments without word timingAsk for shorter segments or word-level timestamps
Render fails on a fontFont not installed locallyInspect the font and render mode; v0.9.19 fixes this specific cloud-render case
Output sounds quiet on socialSkipped loudnorm gateRe-run with I=-16, TP=-1.5, LRA=11

For agents: the whole tutorial in one block

task: ai_video_editing_pipeline
workspace: editing-bay/   # inbox/ references/ brand/ review/ done/
tools: [ffmpeg, whisper.cpp, yt-dlp, hyperframes]
style_source: brand/STYLE.md   # written from references/, human-approved
edit_loop:
  - transcribe with whisper.cpp
  - cut silences > 0.4s
  - captions: SRT, burn with force_style from STYLE.md
  - loudness: -16 LUFS integrated, -1.5 dBTP
  - music: duck >= 12 dB under voice
  - graphics: HyperFrames
review_gate: write review/storyboard.md, stop, render only after human says GO
output: done/
on_error: read the error, fix, show the working command

Source and uncertainty note

The commands and prompts here are starting points, checked against the tools' own documentation (FFmpeg, whisper.cpp, yt-dlp, HyperFrames and ZCode), not a reproducible end-to-end benchmark. Output quality depends on your machine and footage, so expect to tune thresholds like the 0.4-second silence cut to your own material. Tool versions and install commands change; the links below are the current sources of truth.

Sources: HyperFrames and its v0.9.19 release notes · whisper.cpp · yt-dlp · FFmpeg · ZCode install docs

Related on WURK: Burned-in captions vs SRT files: which one to deliver when.

This tutorial was originally published on the Jack Gross blog. If it saved you an afternoon of manual cutting, a small tip on this post helps us write the next one.


Advertisement / referral links: for the agent harness in this tutorial, try ZCode free through this invitation - complete the invitation onboarding steps and check current eligibility. Heavier usage pairs with the GLM Coding Plan invitation. These are referral links. Check the current price, terms and eligibility before subscribing.

Conversation

Join the conversation

Share your thoughts with the author and other readers.

Comments0

Checking your account…

Latest comments

0
No comments yet. Be the first to share your thoughts.