No Capture
I hate recording my screen. It’s the most annoying part of putting anything online. You open QuickTime, start typing a terminal command, hit a typo four seconds in, and now you’re on take six. You end up with an opaque .mov you can’t edit, diff, or script.
I started hacking together little scripts just so I wouldn’t have to touch a screen recorder again. Then agents entered the picture. AI coding agents can’t hold a mouse or hit the red button in QuickTime anyway. With @raquezha/nocapture,1 an agent writes an HTML file, steps through keyframes, and compiles the video straight into your repo.
nocapture video. Unmute to hear the keystrokes, the click, and the swooshes. Switch sounds are from the Mechvibes CherryMX Blue pack (MIT).Try it
You only need Node and Chrome or Chromium. I browse in Zen, but nocapture just borrows Chrome to render frames, so your daily browser doesn’t matter. On macOS that’s it: no FFmpeg, no React, no cloud account. On Linux you also need ffmpeg for video.
Install it globally and point it at a local file:
npm install -g @raquezha/nocapture
# A 2x PNG from any HTML file with a #capture element
nocapture image --scene card.html --width 1200 --height 675 --output card.png
# A 60fps MP4 from a scene that exposes window.renderAt(seconds)
nocapture video --scene demo.html --duration 6 --fps 60 --width 1280 --height 720 --output demo.mp4
# Same video with your own voiceover or sound track
nocapture video --scene demo.html --duration 6 --fps 60 --width 1280 --height 720 --audio voice.m4a --output demo.mp4
Everything runs on your machine. You give it a local HTML scene or SVG, and headless Chrome renders the pixels.
Run the same command tomorrow on another box and you get the exact same pixels. Change a string in the HTML, run it again. That’s the whole idea.
| The manual way | With nocapture |
|---|---|
| Five video takesOne backspace at second four means starting over from zero. | Zero retakesTyping runs from code at 60fps, perfectly paced on every run. |
| Nudging PNGs in FigmaDragging screenshots by hand to align 1px window borders. | Two DOM cardsClean CSS flexbox compiled directly to a 2x retina figure. |
| Holding your breathTrying to narrate live voiceover while clicking without a fumble. | Mux any audioFeed a .wav or TTS file; it syncs to AAC down to the frame. |
| Broken font fallbacksSystem fonts reflowing when someone opens the SVG in Linux or Obsidian. | Embedded WOFF2Base64 fonts verified so diagrams look identical across systems. |
| Re-exporting ten figuresRe-taking every screenshot when a brand palette or token updates. | One batch commandnocapture batch rebuilds every figure for the post from media.json. |
Why not a recorder?
If you want to record a real desktop app, your screen, a webcam, or a live walkthrough, use a screen recorder. OpenScreen (open source) and Screen Studio are great at that. For automated screenshots of live websites, Simon Willison’s shot-scraper2 is fantastic.
For full timeline editing with React and motion graphics, Remotion3 is the standard. For multi track HTML video with AI agents, there is HyperFrames.
Those tools solve different problems.
A screen recorder captures live human input. You hit record and pray. A cursor jitter, a Slack notification, or one typo at minute two, and the take is gone. Even the perfect take is a recording of a desktop, not code. You can’t rebuild it on a headless CI server.
Studio frameworks are whole video runtimes. Remotion and HyperFrames give you timelines, compositions, and tracks, but they also bring bundlers, big dependency graphs, and multi file projects. Both are great. They’re just more than I need for a 6 second terminal loop.
nocapture sits in the gap. It’s just a tiny CLI that turns DOM state into repeatable media assets.
Instead of capturing wall-clock time like a screen recorder, it freezes CSS and drives window.renderAt(t) directly. At 60fps, it steps 60 distinct frames per second, so a dropped frame on a slow machine doesn’t ruin the clip. If you typo a command or want to change a button color, you edit one line of CSS or text and re-run.
On macOS, it skips FFmpeg entirely and pipes straight through Apple’s native AVFoundation and ImageIO Swift APIs. On Linux, it falls back to ffmpeg. It also sanity-checks the output: PNGs get hashed to confirm determinism, and SVGs get checked to make sure fonts are embedded as WOFF2 so they don’t break when opened on Arch or Obsidian.
Garbage in, garbage out
nocapture is a compiler, not an art director. It doesn’t invent layouts or rescue bad CSS. Whatever you feed into Chrome is exactly what comes back.
I learned this the hard way. I asked an agent to recreate the Outline comparison sketch from Self-hosting Outline using CSS flexbox cards with an SVG overlay of hardcoded Bezier arrows.
It looked great. Then a card grew by a few pixels.
The flexbox reflowed. The SVG coordinates did not. Every arrow now pointed confidently at window title bars and empty air
That wasn’t a renderer bug haha. Mixing dynamic DOM boxes with hardcoded SVG coordinates is broken input, and nocapture rendered that broken input faithfully, every single time. Either keep a diagram pure SVG with fixed coordinates, or measure real DOM bounds with getBoundingClientRect() at render time.
That bug also changed the package. Until v0.5, nocapture init shipped starter templates with my fonts, doodles, and card layouts baked in. I (and the agents) started treating the compiler like a designer. In v0.6 I deleted init and every template. The creative side now lives in each project, like the scenes for this post living in my site repo. nocapture only compiles what it’s given.
media/scenes/, and nocapture verifies and compiles the retina asset.Under the hood
Everything runs locally on playwright-core and your system Chrome, with network requests blocked:
nocapture imagefreezes CSS transitions, waits fordocument.fonts.ready, checks#capturefor scroll overflow, then captures twice and compares SHA-256 hashes.nocapture svg --checkverifiesviewBox, numericwidthandheight, zero external URLs, and embedded base64 WOFF2@font-facerules for everyCaveatorInterweight used.nocapture videostepswindow.renderAt(seconds)frame by frame, muxes an optional audio track, then encodes through SwiftAVFoundationon macOS orffmpegon Linux.nocapture batchrebuilds every figure and video for an article from onemedia.jsonmanifest.
Frame 66
Silent loops are fine for UI embeds, but tutorial clips feel dead without sound. Following the compiler rule, I kept TTS and audio generation out of nocapture and added one flag in v0.5: --audio <file>. You bring a voiceover, TTS file, or sound track (.wav, .m4a, .mp3, .aac), and it gets muxed into AAC trimmed to --duration.
Even the audio proved the input rule.
My first attempt synthesized keystrokes from math noise in JavaScript. It sounded like a fax machine having a bad day.
The second attempt used real recorded switches from Mechvibes.4 Better, but the space bar landed late and every letter sounded identical. Turns out each recording has 25ms to 40ms of key travel before the actual click, and I was starting each sample on the exact frame the letter appeared. Aligning each sample’s loudest peak to that frame, switching to Cherry MX Blue, and adding small thumb pauses around the space bar fixed it.
None of that touched nocapture. Better audio in, better MP4 out.
Then came the real bug.
My unit test used a 0.3 second sine wave. 18 frames. Encoded instantly. Passed in CI. Ship it.
Confident, I queued up an 8.5 second article demo. The progress bar counted up.
And stopped.
No error. No crash. 0% CPU. Just frame 66, 1.1 seconds in, hanging indefinitely.
At first I blamed Chrome. Maybe Playwright hung on a websocket call, or headless Chromium hit an out-of-memory wall. I checked Activity Monitor: Chrome was completely idle. The terminal wasn’t throwing an unhandled rejection either. The Node process was just parked on a Swift sub-process that refused to die or finish.
On macOS, nocapture encodes through a compiled Swift helper (encode.swift) that drives Apple’s AVAssetWriter with two inputs: one for video, one for audio. To write an interleaved MP4, AVAssetWriter expects both tracks to arrive with roughly synchronized presentation timestamps. It tolerates about one second of skew between them.
My video loop was written like a normal synchronous script:
// Broken: pushing all video frames in a tight synchronous loop
while frameIndex < totalFrames {
if videoInput.isReadyForMoreMediaData {
let pixelBuffer = loadPixelBuffer(frame: frameIndex)
pixelBufferAdaptor.append(pixelBuffer, withPresentationTime: pts)
frameIndex += 1
}
}
// Audio was only fed afterward!
See the last line.
Video kept pumping frames at 60fps while audio sat at 0.0 seconds. At frame 66, video reached 1.1 seconds and the one second skew window was full. isReadyForMoreMediaData returned false until audio caught up.
But audio couldn’t catch up, because my code was stuck in the video loop waiting for isReadyForMoreMediaData to turn true. Each side was politely waiting for the other. Forever.
And the unit test? 0.3 seconds of video never got close to the one second window. It finished before the trap could close.
The fix was switching from a synchronous push loop to pull queues with Apple’s requestMediaDataWhenReady(on:using:).5 I gave videoInput and audioInput their own dispatch queues. Whenever either track has room, AVFoundation asks for the next sample, so video and audio interleave on demand until both reach the end (v0.5.1).
Lesson: a 0.3 second test proves your code works for 0.3 seconds.
Working with agents
I’m lazy, I suck at color theory, and honestly I’m not great at making polished media by hand.
I’d rather spend an evening coding or fixing real bugs than fighting palettes, nudging screenshots in Figma, or recording terminal demos over and over. When a PR needs a quick visual walkthrough, I usually just skipped it because screen recording felt like such a chore.
Agents make this problem worse before they make it better: they can refactor entire subsystems in three minutes, but ask them for a demo video or a before-and-after graphic and they hit a wall. They don’t have a display server or a mouse.
That’s the real reason I use nocapture.
I drop the skill into whatever agent workspace I’m using (Pi, Claude, Cursor, Antigravity) and tell it what I want:
“Make a 60fps video showing our new PR flow, add keyboard clicks, and check the video.”
The agent writes the HTML, renders the keyframes, and compiles the MP4 right into the repo. When a UI element changes next week, I don’t record anything new. The agent just edits the HTML and recompiles.
Media becomes actual code in git instead of binary bloat or outdated Loom links.
Every image and video in this post came from chatting with an agent and compiling through nocapture. No screen recording. No mouse dragging. No retakes.
If you also hate recording the same 5 second clip five times to fix one typo, point it at an HTML file. It’s MIT licensed on npm and GitHub. If it breaks on your machine, open an issue. I want to know.
Footnotes
-
Source and examples live in
raquezha/nothing/packages/nocapture. ↩ -
Simon Willison’s
shot-scraperautomates browser screenshots and JavaScript scraping from YAML configs in Python. ↩ -
Remotion renders React compositions frame by frame into MP4 and WebM. ↩
-
Keyboard sounds come from the CherryMX Blue (ABS) soundpack in Mechvibes by Hai Nguyen, released under the MIT License. I sliced and retimed the samples. I didn’t record them. ↩
-
Apple’s
AVAssetWriterInput.requestMediaDataWhenReady(on:using:)pulls video and audio samples in interleaved order so neither track starves the muxer. ↩