MiaAInow
AI Tutorials·

Make Videos With Claude Code: Remotion vs HyperFrames

A two-minute mini documentary about the barcode, with narration and music, every frame written as code by AI. The prompts are below.

The mini documentary: Beep

Beep · Remotion prompt
<role>
You are a documentary director and a creative coder. Using Remotion (React + TypeScript), make a roughly two-minute, 1920×1080, 30 fps mini documentary with narration and music, rendered to MP4. No external images, footage or image-generation models; draw everything with SVG / CSS / Canvas code.
</role>

<inputs>
I'll give you the narration script (or you write it and I confirm); after the voice-over is recorded you get the start time of every word (timing.json), and everything on screen is aligned to the words.
</inputs>

<direction>
Topic: 25 years of the barcode. Mood: cream / sand / paper backgrounds, black bars, the only accent color in the whole film is the scanner's red; serif for titles, monospace for small text; a faint film grain over everything.
One protagonist runs through the whole film: a line. The red scanner line at the checkout → dots and dashes drawn in beach sand with a finger → the concentric circles of the patent drawing → the UPC barcode → back to the scanner line.
Very few words on screen: usually one or two words or a number, plus a typewriter-style date stamp in the top left (1974.06.26 08:01 TROY, OHIO / 1948–49 MIAMI BEACH / 1952.10.07 US 2,612,994 / UPC-A / TODAY).
Forbidden: dark background + big centered text + everything fading in and out, the narration printed as full sentences on screen, hard cuts, constant-speed slides, seconds where nothing moves, robots or mascots.
</direction>

<structure>
1974: the scanner line draws out from the center, the big date 1974 / 6.26 / 08:01 pops in piece by piece and then shrinks into the top-left corner; the counter and the scanner glass rise; a pack of gum springs onto the line, and on the word "beep" the line flashes, two rings ripple out, a big red "Beep".
Rewind: the camera dives into the barcode on the gum, the full-screen bars shrink back into sand, the background becomes sea and beach; cans, boxes, bottles and a question mark are drawn in the sand and a wave washes them away; a finger draws dots and dashes (camera pushes in), and on "pull them down" each dot and dash stretches into a line of a different thickness.
1952: the picture becomes paper, concentric circles draw themselves inside a patent frame; on "wait" it greys out and a big year rolls from 1952 to 1974; a red laser sweeps across and the circles straighten into a UPC.
Anatomy of the UPC: 12 digits pop in one by one; push in on one digit to see its 7 modules (0/1 and "white 1, black 2, white 3, black 1"); as the laser sweeps, the rising-and-falling signal draws underneath; the check-digit arithmetic appears line by line as it's narrated, with the last digit highlighted; flip one bar and the arithmetic turns red, "scan again"; the whole barcode rotates 180° with the left half marked odd and the right half even.
Ending: back to the gum and the receipt ($0.67), one pack becomes dozens filling the screen, a counter rolls up to 10,000,000,000 scans a day; everything collapses into one red line, one last "beep".
</structure>

<build>
1. One component, one continuous take: const t = useCurrentFrame() / fps; every element's position, opacity and color is a pure function of t; no state from the previous frame.
2. Write a wt("some word") helper that looks up the second a word is first spoken in the word timings. Every entrance uses it; no hand-typed seconds.
3. Springs in closed form (no dependence on the previous frame), in a few flavors: buttons quick and crisp, cards default, big text and lock-ups heavy with almost no overshoot, stickers with a visible bounce.
4. Encode the barcode for real, to the UPC-A standard: left half L codes, right half R codes (L inverted), guard patterns 101 / 01010 / 101, 95 modules in all; check digit = (10 − (sum of odd positions × 3 + sum of even positions) mod 10) mod 10.
5. Synthesize the music in Python with numpy: four slow chords underneath, one pluck per beat; the "beep" is a 2093 Hz square wave lasting 0.16 s; the rustle is band-passed noise; the scanner hum is 120 Hz; the music ducks automatically under speech. Mix voice and music into one wav and bring it in with <Audio>.
6. Render with npx remotion render; after each scene, render 3 stills and look before moving on.
</build>

<gotchas>
- Dead air: when a stretch of narration maps to a single element, the screen sits empty for seconds; add a small motion related to the narration (drawing the goods, a wave, a push-in).
- When the camera pushes in on a detail, labels are easily pushed out of frame: place them within the visible area after zooming.
- The word timings have no spaces between English words; don't include spaces when looking a word up.
</gotchas>

Mia's tips

  • I used Claude Opus 5.5 in Claude Code, with Remotion.
  • Get the order right: record the narration first and get the timing of every word, and only then can the visuals lock to the words. The prompt says how to wire that up. Swap the topic and it's your own mini documentary.
  • I've had Codex make similar films too: drier, with less movement. So this kind of work I now give to Claude.

Barcode sketchpad

ToolBarcode GeneratorOpen →
Barcode sketchpad · prompt
Make a single-file web page, "Barcode sketchpad", in vanilla JavaScript + SVG, no libraries:
1. An input for 11 digits; compute the 12th, the check digit, to the UPC-A standard: (10 − (sum of odd positions × 3 + sum of even positions) mod 10) mod 10.
2. Encoding: the left 6 digits use the L codes (0001101, 0011001, 0010011, 0111101, 0100011, 0110001, 0101111, 0111011, 0110111, 0001011), the right 6 use the R codes (L inverted), plus the guards 101 / 01010 / 101, 95 modules in all; the guards slightly taller than the digit bars.
3. The 12 digits printed under the bars, the check digit in red; below that, the check arithmetic and "✓ a multiple of 10".
4. A red laser line sweeping back and forth across the code; hovering over a bar turns every bar of that digit red and shows which position and digit it is.
5. A "Random" button; a "Flip it" button that rotates the whole code 180°.
Style: cream background, black bars, red as the only accent, a serif title, monospace digits; the page scales to the window.

Mia's tips

  • Type 11 digits, the 12th check digit is worked out for you, and out comes a standard UPC-A barcode. Try any number you like!

Questions? Join the discussion on YouTube