How to make a product demo video for an AI app launch with Claude Code
A launch demo has to show an AI app doing its job in under a minute, and AI apps wait: a run that takes two minutes is most of a recording and none of the demo. This guide follows one real run in which Claude Code recorded Cutfac, our app, with a Playwright script, found where things happen in the recording, sped up the waits with a badge that says so, and cut a 53.5-second demo and a 29-second one at 1920 × 1080. Each step shows the script or command and what it printed.
Published:
Where a launch demo goes, and what each place takes
A launch demo usually ends up on the landing page, on YouTube, on X and in a Product Hunt gallery. Their own pages, checked on October 27, 2026, say:
- YouTube recommends MP4 with H.264, AAC audio at 48 kHz, 4:2:0 chroma and the moov atom at the front (fast start). For 1080p at 24 to 30 fps it suggests 8 Mbps, and 16:9 is the standard ratio on a computer.
- X's developer docs recommend H.264 High Profile at 30 or 60 fps, AAC LC audio and 16:9. Subscribed accounts get 1080p playback; others get 720p. A post can carry one video of 0.5 seconds to 20 minutes and up to 8 GB on a regular account.
- Product Hunt takes video only as a YouTube link: a full URL, not a short link, to a video that isn't private. Gallery images are recommended at 1270 × 760.
- So one file covers all three: 1920 × 1080, H.264, 30 fps, AAC at 48 kHz, fast start. Upload it to YouTube for Product Hunt, post it to X, and put it on the landing page.
What we're making
The app in the demo is Cutfac, a Mac app we make that runs Claude Code to make videos. Its main loop takes two agent runs: describe a video and get a first cut, then box a part of it, ask for a change and get three versions to compare. Each run took over two minutes, which is the problem a demo of any AI app has.
The goal is a 16:9 demo under a minute that shows both runs honestly: the real waits, sped up and labeled with how long they took, and the moments around them at normal speed. Then a 29-second cut of the same scenes for X.
Every script, output and frame below comes from that run. The video Claude Code made inside the app is a teaser for Driftnote, a note-taking app we made up for the brief.
What you need
A Mac with Homebrew and Bun, Claude Code signed in with your own account, and the app you want to show running locally. Here's what each part does:
- Claude Code: the agent. It writes the recording script, reads the recording and writes the edit.
- Playwright: drives a browser from a script and records what it shows. A script clicks in the same places every take, so a retake is one command.
- ffmpeg: cuts, crops, speeds up and joins the scenes and mixes the music. ffprobe, which comes with it, reads what's in a file.
- ImageMagick: renders the captions, badges and cards as images.
- Music you're allowed to use. This run uses Placid Ambient by MusicLFiles from Wikimedia Commons, under CC BY 4.0, which needs a credit.
Step 1: Install the tools and run the app
Homebrew installs ffmpeg and ImageMagick, and Bun adds Playwright to the folder with the script:
brew install ffmpeg imagemagickbun add playwright@1.56.1Cutfac's board is a web page served by the app, so a browser can show it. From a checkout of the open-source app, these build the board, make an empty workspace for the demo and serve it. An empty workspace means the recording starts from nothing, as a new user would:
bun run buildbun run src/cli.ts init --no-connect --name "Launch demo" demobun run src/cli.ts serve --workspace demo --port 4519Your app goes here instead: any page that runs at a local address. If it needs sign-in, sign in once and save the session with Playwright's storage state, so every take starts signed in.
Step 2: Brief Claude Code and script the recording
Open Claude Code in the script's folder. The brief names the flow to show and leaves the selectors to Claude Code:
Claude Code
Cutfac's board runs at http://127.0.0.1:4519. Write a Playwright script that records it at 1920 × 1080 while it: - makes a new video from a one-line brief and waits for the agent to finish - draws a box on the video, asks for a change with 3 versions and waits again - opens Compare versions, plays them all and keeps one - writes the time of each step to marks.txt Then cut a 16:9 demo under a minute from the recording, with the waits sped up and labeled.
Claude Code first made one video by hand in the board to learn its controls, then wrote record.mjs. It finds buttons by their role and label, the way a screen reader does, so a layout change doesn't break it. The board's API says whether an agent is running, so the script waits on that instead of a fixed time:
// Drives the Cutfac board through one launch-demo flow and records it.// usage: node record.mjs BOARD_URL OUT_DIR [ITEM_ID]// With ITEM_ID it skips making the first video and starts from that item.import { writeFileSync } from "node:fs";import { chromium } from "playwright";const [board, out, item] = process.argv.slice(2);const chrome = `${process.env.HOME}/Library/Caches/ms-playwright/chromium-1228/chrome-mac-arm64/` + "Google Chrome for Testing.app/Contents/MacOS/Google Chrome for Testing";const brief = "A 10-second 16:9 launch teaser for a note-taking app called Driftnote: three short lines of big white text on a dark background, one after another, ending on the name.";const change = "Have the name build in letter by letter, with a soft glow";const marks = [];const t0 = Date.now();const mark = (name) => { marks.push(`${((Date.now() - t0) / 1000).toFixed(1)} ${name}`); console.log(marks.at(-1));};/** Waits until no agent run is going on the board, checking the API every 2 s. */async function idle(limitMs) { const start = Date.now(); await new Promise((r) => setTimeout(r, 3000)); while (Date.now() - start < limitMs) { const items = await (await fetch(`${board}/api/items`)).json(); if (items.length > 0 && items.every((item) => !item.running)) return; await new Promise((r) => setTimeout(r, 2000)); } throw new Error("the agent didn't finish in time");}async function makeFirstVideo() { await page.goto(`${board}/#/board`); await page.getByRole("button", { name: "New video" }).last().click(); mark("new video dialog"); await page.getByRole("textbox").first().pressSequentially(brief, { delay: 25 }); mark("brief typed"); await page.getByRole("button", { name: "Create and start" }).click(); mark("agent started"); await idle(15 * 60_000); mark("first video ready");}const browser = await chromium.launch({ executablePath: chrome });const context = await browser.newContext({ viewport: { width: 1920, height: 1080 }, recordVideo: { dir: out, size: { width: 1920, height: 1080 } },});const page = await context.newPage();try { if (item === undefined) await makeFirstVideo(); else await page.goto(`${board}/#/item/${item}`); await page.waitForTimeout(2000); const video = page.locator("video").first(); const box = await video.boundingBox(); if (box === null) throw new Error("no video on the stage"); // Click the timeline at 80%, where the name is on screen, then box the name. await page.mouse.click(box.x + box.width * 0.8, box.y + box.height + 50); mark("playhead moved"); await page.waitForTimeout(1200); await page.mouse.move(box.x + box.width * 0.18, box.y + box.height * 0.36); await page.mouse.down(); await page.mouse.move(box.x + box.width * 0.82, box.y + box.height * 0.64, { steps: 25 }); await page.mouse.up(); mark("box drawn"); // The box opens its own request field next to it, with its own version count. const ask = page.getByRole("textbox", { name: "Request for this box" }); await ask.pressSequentially(change, { delay: 30 }); const pop = ask.locator("xpath=ancestor::div[.//*[@role='combobox']][1]"); await pop.getByRole("combobox", { name: /Versions to make/ }).click(); await page.getByRole("option", { name: "3 versions" }).click(); mark("3 versions picked"); await ask.press("Enter"); mark("change sent"); await idle(25 * 60_000); mark("versions ready"); await page.waitForTimeout(2000); await page.getByRole("button", { name: "Compare" }).first().click(); mark("compare open"); await page.waitForTimeout(1500); await page.getByRole("button", { name: /Play all from/ }).click(); mark("playing all"); await page.waitForTimeout(11_000); await page.getByRole("button", { name: "Use this" }).nth(1).click(); mark("kept one"); await page.waitForTimeout(4000);} finally { await page.screenshot({ path: `${out}/last.png` }); writeFileSync(`${out}/marks.txt`, `${marks.join("\n")}\n`); await context.close(); await browser.close();}executablePath points at a Chromium Playwright had already downloaded on this Mac; without it, Playwright uses the one npx playwright install chromium fetches. It took three takes and a retry. In the first, the script typed the change into the chat field, because drawing a box opens a field of its own next to the box. In the second, after one retry to tell that field from the chat field, the box went over an empty frame at 0 seconds, so the third clicks the timeline at 80% first, where the name is on screen. The ITEM_ID argument let the second take start from the video the first one made, without another first run.
node record.mjs http://127.0.0.1:4519 take30.6 new video dialog 5.2 brief typed 5.2 agent started 140.5 first video ready 142.5 playhead moved 144.1 box drawn 146.3 3 versions picked 146.3 change sent 295.6 versions ready 297.6 compare open 299.1 playing all 310.2 kept one
By the script's clock, the first run took 135 seconds from Create and start to idle, and the three versions took 149. That includes up to 2 seconds of polling.
Step 3: Find the moments in the recording
Playwright saves the recording as WebM. ffprobe shows something to watch for:
ffprobe -v error -show_entries stream=codec_name,width,height,r_frame_rate:format=duration -of compact=p=0 take.webmcodec_name=vp8|width=1920|height=1080|r_frame_rate=25/1 duration=342.720000
The recording is 342.7 seconds, but the script ran for about 315. Its timeline runs about 9% long: the compare dialog opens at 297.6 seconds by the script's clock and at 324 in the recording. So the times in marks.txt don't work as cut points, and the badges use the script's clock, the real one. One frame every 30 seconds shows how little the screen changes while the agent works:
ffmpeg -i take.webm -vf "fps=1/30,scale=384:-1,tile=4x3:padding=12:color=white" -frames:v 1 sheet.png
To find exact times, Claude Code measured the average brightness of the stage, the area where the video plays, twice a second with signalstats, and printed where it jumps. changes.py reads ffmpeg's output:
# Prints the times where the stage's brightness jumps, from ffmpeg's signalstats output.# usage: changes.py yavg.txtimport reimport systime, prev = 0.0, Nonefor line in open(sys.argv[1]): if m := re.search(r"pts_time:([\d.]+)", line): time = float(m.group(1)) elif m := re.search(r"YAVG=([\d.]+)", line): y = float(m.group(1)) if prev is not None and abs(y - prev) > 1: print(f"{time:.1f} {prev:.1f} -> {y:.1f}") prev = yffmpeg -i take.webm -vf "fps=2,crop=1238:696:240:68,signalstats,metadata=print:key=lavfi.signalstats.YAVG:file=yavg.txt" -f null -python3 changes.py yavg.txt | head -6python3 changes.py yavg.txt | tail -30.5 36.5 -> 33.3 6.0 33.7 -> 36.6 75.0 36.6 -> 51.9 77.0 51.9 -> 31.9 77.5 31.9 -> 35.7 80.5 35.9 -> 32.1 324.0 38.5 -> 32.2 326.0 31.7 -> 32.7 338.5 33.5 -> 40.8
The jump at 6 seconds is the dialog closing and the agent starting. At 75 the first render appears and plays on the stage, and by 77.5 it shows its first line. At 324 the compare dialog darkens the stage, and at 338.5 it closes after Use this. Frames at those times, checked by eye, gave the rest: the box drawn at 156 and the request sent at 160.5.
Step 4: Plan the scenes
The demo opens on the result, three versions playing side by side, then tells the story in order. Ten scenes, with where each comes from in the recording:

The speeds are set so each wait fits a few seconds. The badge on those scenes says how long the run really took, so nobody watching thinks the agent is that fast.
- 0 to 4 s, the hook: 333 to 337 in the recording, the three versions building the name.
- 4 to 7 s: a title card.
- 7 to 12.4 s: typing the brief, at normal speed.
- 12.4 to 15.4 s: the first run until its first render, 71.5 seconds at 24x.
- 15.4 to 22.4 s: the first render playing on the board, at normal speed.
- 22.4 to 24.4 s: the rest of the run, where the agent checks frames and fixes them, 65.5 seconds at 33x.
- 24.4 to 29.9 s: moving the playhead, drawing the box and asking for three versions, at normal speed.
- 29.9 to 35 s: the three versions being made, 162.5 seconds at 32x.
- 35 to 49.5 s: Compare versions, Play all and Use this, at normal speed.
- 49.5 to 53.5 s: an end card with the address.
Step 5: Make the words on screen
Most autoplay is muted, so the demo says everything in captions. ImageMagick renders each as a PNG: a dark pill for the caption, a yellow badge for the run times, and two cards:
F=Pretendard-Bold.otfHOOK="One change, three versions. Keep the best."T1="Describe the video"; T2="Claude Code makes it"; T3="The first cut plays on the board"T4="It checks its own work"; T5="Box what to change, ask for 3 versions"T6="Three versions at once"; T7="Compare side by side, keep one"SUB="The Mac app for making videos with Claude Code"B1="A 2 min 15 s run, sped up"; B2="$B1"; B3="A 2 min 29 s run, sped up"B4="$B1"; B5="$B3"# A caption pill for the bottom, and a smaller badge for the top right.cap() { magick -background "rgba(11,11,12,0.78)" -fill white -font $F -pointsize 52 label:"$2" -bordercolor "rgba(11,11,12,0.78)" -border 36x22 "$1"; }badge() { magick -background "rgba(255,200,61,0.92)" -fill "#0b0b0c" -font $F -pointsize 34 label:"$2" -bordercolor "rgba(255,200,61,0.92)" -border 20x10 "$1"; }cap c0.png "$HOOK"; cap c1.png "$T1"; cap c2.png "$T2"; cap c3.png "$T3"cap c4.png "$T4"; cap c5.png "$T5"; cap c6.png "$T6"; cap c7.png "$T7"badge b1.png "$B1"; badge b2.png "$B2"; badge b3.png "$B3"; badge b4.png "$B4"; badge b5.png "$B5"magick -size 1920x1080 xc:"#0b0b0c" -font $F -fill white -gravity center \ -pointsize 180 -annotate +0-60 "Cutfac" -pointsize 56 -fill "#b8b8bd" -annotate +0+110 "$SUB" title.pngmagick -size 1920x1080 xc:"#0b0b0c" -font $F -fill white -gravity center \ -pointsize 180 -annotate +0-90 "Cutfac" -pointsize 56 -fill "#b8b8bd" -annotate +0+70 "$SUB" \ -pointsize 72 -fill "#ffc83d" -annotate +0+200 "cutfac.com" end.pnglabel: sizes each image to its text, and -border adds the padding in the same color, so every pill fits its words. Pretendard has Latin and Korean letters, so the Korean version only swaps the words.
Step 6: Cut, crop and speed up each scene
A full 1920-pixel board is small on a phone, so most scenes crop to the part that matters and scale it back to 1920 × 1080. Each crop is 16:9 and scales up by 1.3 to 1.6 times, little enough that the text stays sharp:

seg cuts one scene: from START to END in the recording, cropped, sped up by SPEED, with the caption at the bottom and the badge, if there is one, at the top right. setpts=(PTS-STARTPTS)/SPEED is what speeds it up, and fps=30 turns the recording's 25 frames a second into 30. A scene without a badge overlays a transparent 2 × 2 pixel instead, so one filter graph does both:
FULL=1920:1080:0:0; DIALOG=1280:720:320:180; STAGE=1238:696:240:68; BOX=1480:832:20:40; COMPARE=1280:720:318:180# seg OUT START END CROP SPEED CAPTION [BADGE]seg() { local badge=(-f lavfi -i color=c=black@0:s=2x2,format=rgba) [ -n "$7" ] && badge=(-loop 1 -i "$7") ffmpeg -v error -y -ss "$2" -to "$3" -i take.webm -i "$6" "${badge[@]}" -filter_complex " [0:v]crop=$4,scale=1920:1080:flags=lanczos,setpts=(PTS-STARTPTS)/$5,fps=30[m]; [m][1:v]overlay=(W-w)/2:H-h-64[c]; [c][2:v]overlay=W-w-48:48:shortest=1,format=yuv420p" -c:v libx264 -crf 18 -an "$1"}card() { ffmpeg -v error -y -loop 1 -framerate 30 -t "$3" -i "$2" -vf "fade=in:d=0.4,format=yuv420p" -c:v libx264 -crf 18 "$1"; }seg m0.mp4 333 337 $COMPARE 1 c0.pngcard m1.mp4 title.png 3seg m2.mp4 0.6 6 $DIALOG 1 c1.pngseg m3.mp4 6 77.5 $FULL 24 c2.png b1.pngseg m4.mp4 77.5 84.5 $STAGE 1 c3.pngseg m5.mp4 84.5 150 $FULL 33 c4.png b2.pngseg m6.mp4 155 160.5 $BOX 1 c5.pngseg m7.mp4 160.5 323 $FULL 32 c6.png b3.pngseg m8.mp4 324 338.5 $COMPARE 1 c7.pngcard m9.mp4 end.png 4The first build came out at 42.6 seconds instead of 52. The three badge scenes were one frame each: a PNG input is a single frame, and shortest=1 ended them there. -loop 1 repeats the badge for as long as the scene runs.
Step 7: Join them with music, and cut a short version
The 29-second version reuses the hook and runs the rest faster, with the first run in one scene:
seg h2.mp4 0.6 6 $DIALOG 1.8 c1.pngseg h3.mp4 6 150 $FULL 48 c2.png b4.pngseg h6.mp4 155 160.5 $BOX 1.4 c5.pngseg h7.mp4 160.5 323 $FULL 54 c6.png b5.pngseg h8.mp4 324 338.5 $COMPARE 1.6 c7.pngcard h9.mp4 end.png 3join lists the scenes for the concat demuxer, which joins files with the same codec and size without encoding them again (-c:v copy). The music is trimmed to the demo's length, faded in over 1 second and out over 2, and brought to −18 LUFS with loudnorm:
# join OUT DURATION PARTS...: the parts in a row, with the music faded in and out under them.join() { local out=$1 len=$2; shift 2 printf "file '%s'\n" "$@" > parts.txt ffmpeg -v error -y -f concat -i parts.txt -i placid.ogg -filter_complex " [1:a]atrim=0:$len,afade=in:d=1,afade=out:st=$(echo "$len - 2" | bc):d=2,loudnorm=I=-18:TP=-1.5,aresample=48000[a]" \ -map 0:v -map "[a]" -c:v copy -c:a aac -b:a 192k -shortest -movflags +faststart "$out"}join demo.mp4 53.5 m0.mp4 m1.mp4 m2.mp4 m3.mp4 m4.mp4 m5.mp4 m6.mp4 m7.mp4 m8.mp4 m9.mp4join demo30.mp4 29 m0.mp4 h2.mp4 h3.mp4 h6.mp4 h7.mp4 h8.mp4 h9.mp4Step 8: Check the file
ffprobe reads back what the platforms ask for, and ebur128 measures the loudness of the whole file:
ffprobe -v error -show_entries stream=codec_name,width,height,r_frame_rate,pix_fmt,sample_rate:format=duration -of compact=p=0 demo.mp4ffmpeg -nostats -i demo.mp4 -af ebur128 -f null - 2>&1 | grep -E "^ +I:" | tail -1codec_name=h264|width=1920|height=1080|pix_fmt=yuv420p|r_frame_rate=30/1
codec_name=aac|sample_rate=48000|r_frame_rate=0/0
duration=53.500000
I: -17.5 LUFSH.264 at 1920 × 1080 and 30 fps, yuv420p, AAC at 48 kHz, 53.5 seconds. The integrated loudness is −17.5 LUFS, close to the −18 target. The file is 7.9 MB, and the 29-second one 5.3 MB.
Where it gets hard
Every take ran the agent for real, two runs and about five minutes each, and the agent's output differs every time, so a retake changes what's on screen. Finding the moments meant reading brightness and frames, and the recording's own clock was off by 9%. A demo for a real launch has more flows, more retakes, and a teammate asking for one scene to be shorter.
Cutfac is a Mac app we make for that part. It runs Claude Code or Codex for each video, lets you select a range or draw a box on the frame and say what to change, and keeps versions side by side to compare and pick from. You can do everything in this guide without it.
Free tools for this
Sources
- YouTube Help: YouTube recommended upload encoding settings
- X Developer Platform: Media upload best practices
- Product Hunt Help Center: How to post a product
- Claude Code overview
- Playwright: Videos
- FFmpeg filters: crop, scale, setpts, fps, overlay, signalstats, afade and loudnorm
- FFmpeg formats: concat
- Wikimedia Commons: Placid Ambient by MusicLFiles (CC BY 4.0)
- Pretendard (SIL Open Font License)
Questions
Long enough to show the main flow once. None of the platforms here sets a minimum. This one is 53.5 seconds, with a 29-second cut for X. Start on the result, keep the moments people need to see at normal speed and speed up the waits.
1920 × 1080 at 30 fps, H.264 in an MP4 with AAC audio at 48 kHz and fast start. That matches YouTube's recommended settings and X's recommendations, and Product Hunt takes it as a YouTube link.
Upload it to YouTube first, make sure it isn't private, and add the full YouTube URL to the gallery. Product Hunt supports only YouTube links for video, and short links won't load.
Speed the wait up so it fits a few seconds, and label it with how long it really took. This demo shows a 2 minute 15 second run at 24x and 33x with a badge that says so.
A script clicks in the same places every take, so a retake is one command and the cuts line up. It also writes down when each step happened. Here that took three takes, each fixed in the script.