---
name: word-by-word
description: Makes a vertical word-by-word reel from the user's own clip. A frosted glass card stands behind the person (or the buildings, the car, whatever the shot is of), one big word at a time lands on it on the beat of a song, and the person, cut out, stays in front. One or two clips, 6 to 12 seconds, 9:16, built in HyperFrames (HTML to video), shown live before anything is rendered. Use when the user asks for a word-by-word reel, one word at a time, words or text behind me, words behind the speaker, behind a building or a product, a glass card behind me, text on the beat behind a person, or names this skill.
---

# Word-by-word reel

You make one short vertical video. Three layers, back to front:

1. **The footage**, any calm clip: a person, a street, a car, a product.
2. **A frosted glass card with the words**, standing in the shot behind the person or the thing. A small line stays, and one
   big word at a time replaces the last in the same place, each on a beat.
3. **The same person or thing, cut out**, in front of the card.

On the song's drop the first clip is pushed out to the left by the second, and the card stays. The last screen is a
small line typed over one big word, with two corner brackets. One accent colour, used for the small lines and the full
stops.

The clips stay on the user's computer. Never render before the user says yes.

## What you need on the computer

Check these first and tell the user what is missing, with the install line for their system:

| Tool | Check | Why |
|---|---|---|
| Node.js 22 or newer | `node -v` | runs HyperFrames and the beat finder |
| ffmpeg and ffprobe | `ffmpeg -version` | cuts the clips, reads the song |
| HyperFrames 0.9.104 | `npx --yes hyperframes@0.9.104 --version` | the film, the check, the cut-out, the preview, the render |

`remove-background` downloads its model once (176 MB) and needs about 1.5 GB of memory. It runs on the CPU: about
90 seconds for a 7.4 second clip on a fast desktop. Run one heavy step at a time.

## Ask first, in one message

1. **The clip** (or two). One clip of 8 seconds or more, or two of 4 or more. The wall, sky or ceiling at the top is where
   the words go. If the clean part turns out shorter, make a shorter film with two screens, and say so. Never stretch it.
   Look at it and tell them which kind it is before you plan:
   - **People who stay in frame**: they are cut out (step 2). Several people are cut out together.
   - **No person, a steady shot, something standing under an empty top** (buildings, a car, a product, trees): the card goes
     behind it, along an outline you draw (step 2, No person).
   - **The camera moves and nothing stands under an empty top**: the card goes in front of the picture. Say so first: the words
     will not stand behind anything (step 2, Nothing in front).
   - **They talk in it**: the film plays the song and leaves their voice out. Take a stretch where they do not talk.
2. **The line.** Six to fourteen words. Offer three if they have none.
3. **The song**, a file they may use, and the part they like. No song is fine: one big word every 1.1 seconds.
4. **The accent colour.** Default `#F0764F`.

Then write the beat plan as a table (second, small line, big word) and wait for their yes. Rules for the plan:

- Two or three screens. Each screen is one small line (1 to 3 words, lowercase) and one to three big words (one at a
  time, capitals, 8 letters or fewer).
- A screen stays up at least 0.3 seconds plus its words divided by 3.4. A big word stays at least 0.9 seconds: two beats up
  to 133 bpm, three or four beats on a faster song. Too few beats for the line: fewer big words, longer small lines.
- The first screen is complete on frame 0. The drop lands exactly on the change from screen 1 to screen 2.
- Use the user's own words. Never add a claim they did not make.

## Step 1. Prepare the clips

Make a project, then one 1080 x 1920 file per clip, silent, at 30 fps. Pick a stretch where the person is calm, and open
its first, middle and last frame at full size: eyes open, no blink, not starting or ending a move. A phone clip can report 3840 x 2160 and still stand
upright, because it carries a rotation. ffmpeg turns it by itself, so look at a frame before you crop.

```
npx --yes hyperframes@0.9.104 init word-by-word --skip-skills --non-interactive --resolution=portrait
cd word-by-word
mkdir assets
```

Run every command after this one inside that folder.

Then take the two code blocks of this file out as files, exactly as they are, instead of retyping them. `beats.mjs` is the
beat finder of step 3, and `index.html` is the film of step 4 (it replaces the one `init` made):

```
node -e "const fs=require('fs'),s=fs.readFileSync(process.argv[1],'utf8');for(const [,k,t] of s.matchAll(/\x60{3}(js|html)\r?\n([\s\S]*?)\x60{3}/g))fs.writeFileSync(k==='js'?'beats.mjs':'index.html',t)" ~/.claude/skills/word-by-word/SKILL.md
```

If this file is saved somewhere else, put that path at the end of the line.

The top of the head (or of the thing that stands in front) should sit between y 500 and y 760, so the words fit above it or
just touch it. Read one frame and estimate where that top is. If it is higher, set `D` to the difference, an even number (the empty space above the head
at most, or stretch, below): the top `D` pixels of the picture are mirrored upward and the person moves down.

```
ffmpeg -v error -y -ss START -t LENGTH -i "CLIP" -filter_complex "[0:v]SPEED,scale=1080:1920:force_original_aspect_ratio=increase,crop=1080:1920,split[a][b];[a]crop=1080:D:0:0,vflip[t];[b]crop=1080:1920-D:0:0[m];[t][m]vstack,setsar=1,format=yuv420p[v]" -map "[v]" -an -r 30 -c:v libx264 -crf 14 -g 15 -movflags +faststart assets/clip1.mp4
```

- `SPEED`: 60 or 30 fps footage `fps=30`. 50 fps footage `setpts=N/(30*TB)` (every frame kept, plays at 60 percent, so 4
  seconds of it last 6.7; only when nobody is talking). 23.976, 24 or 25 fps footage: use `fps=24` or `fps=25`, change `-r` to match, and set the same number
  in `data-fps`.
- Less empty space above than `D`, over a plain wall or sky: never mirror the head or the thing. Stretch the top two rows instead (like the mirror, it
  pushes the bottom `D` pixels out of the frame):
  `[a]crop=1080:2:0:0,scale=1080:D,setsar=1,boxblur=20:2[t]`.
- `D = 0`: drop the split and use `[0:v]SPEED,scale=...,crop=1080:1920,format=yuv420p[v]`.
- A person standing to one side of a wide clip: use `crop=1080:1920:X:0` with X that keeps them in frame.
- Never play a clip forward and back to make it longer. A look played backwards reads as an eye roll.

## Step 2. Cut the person out

```
npx --yes hyperframes@0.9.104 remove-background assets/clip1.mp4 -o assets/cut1.webm --quality best
```

Cut it from the prepared clip, never from the original, so the two match frame for frame. Put the first frame, the last and one of
every second on a flat colour and look at them (this is second 1):

```
ffmpeg -v error -y -c:v libvpx-vp9 -ss 1 -i assets/cut1.webm -f lavfi -i color=0x2f6f3f:s=1080x1920 -filter_complex "[1][0]overlay=shortest=1" -frames:v 1 look.jpg
```

Then trim its edge, so no light or colour of the room shows around the person (this is the file the film uses):

```
ffmpeg -v error -y -c:v libvpx-vp9 -i assets/cut1.webm -filter_complex "[0:v]split[a][b];[b]alphaextract,erosion,erosion,gblur=sigma=0.8[m];[a][m]alphamerge" -c:v libvpx-vp9 -pix_fmt yuva420p -b:v 0 -crf 12 -row-mt 1 -deadline good -cpu-used 4 assets/cut1-trim.webm
```

A missing hand, a hole in a shirt or a piece of chair that comes and goes means another stretch of the clip, or another
clip. Do not continue with a broken cut-out.

### No person

`remove-background` finds people only. For anything else, skip it and draw the outline yourself. The layer in front is the same
clip again, seen through that outline, so there is no second file.

1. Save the first, middle and last frame of `clip1.mp4` at full size and open them, then crops of them where the edge is. When the
   same corner sits more than 4 pixels apart on them, the shot drifts (step 4). When it jumps about, or the thing leaves the frame,
   or a light comes on, take another stretch.
2. Write the outline of everything that stands in front, in pixels of the 1080 x 1920 frame: from the left edge along the top of it
   (the roofs, the pole, the car) to the right edge, then `1080px 1920px, 0px 1920px`. For a thing that stands alone, go round it once.
   It matters only where the card is, down to y 1206: below that, go straight to the bottom corners. Use 15 to 40 points: only the
   corners of straight things, a point every 40 pixels on a curve. Stay 3 pixels outside the edge,
   never inside it and never far out, or a wedge of the plain shot shows on the card.
3. The words need y 300 to 552 free of it. A thin pole may stand in a word, a roof may not: use a bigger `D`. Give the two front
   lines the clip itself and the outline (`cutB` too, with clip2, if there are two):

```
<div class="cam" id="cutA" style="z-index:6; clip-path: polygon(0px 1090px, 20px 930px, 130px 930px, 1080px 862px, 1080px 1920px, 0px 1920px)"><video id="meA" class="clip" src="assets/clip1.mp4" ...
```

4. The shot drifts: draw the same points, in the same order, on the middle and the last frame too, and let the outline travel with it
   (`MID` and `END` are the film seconds of those frames):

```
tl.to('#cutA', { clipPath: 'polygon(the middle frame)', duration: MID, ease: 'none' }, 0);
tl.to('#cutA', { clipPath: 'polygon(the last frame)', duration: END - MID, ease: 'none' }, MID);
```

5. Look at what stands in front, on its own: in a copy of `index.html`, delete the lines of `camA`, the shade, the glass, the sheen and the
   words, set `#root` to `background: #0f0`, and snapshot at 0, the middle, the end and two seconds between. Open them at full size, not as a
   contact sheet. Nothing of the thing may be cut off, and no wedge of background may hang on it. Move the points that are off and look
   again. If it is not clean after three rounds, use Nothing in front and tell the user.

### Nothing in front

Delete the lines that hold `id="cutA"` and `id="cutB"`, and take `'#cutA'` and `'#cutB'` out of the script's lists. The card stands
in front of the picture. Put it where the picture is emptiest, and check that nothing that matters is under it.

## Step 3. Find the beats

Copy the song into `assets/` (mp3, m4a or wav), then run `beats.mjs` on it. `from` and `seconds` pick the part to read.

```
node beats.mjs assets/song.mp3 10 30
```

It prints the tempo, the drop, and every beat, all in seconds from `from`. Choose the hook length as a whole number of
beats (four is usual, about two seconds). Then:

- `data-media-start` of the song = `from` + drop - hook length
- every beat in film seconds = beat - drop + hook length
- no drop in the song (`"drop": null`): use any beat as the change to screen 2

```js
// beats.mjs: the beat grid and the drop of a song. Node 18+ and ffmpeg, nothing to install.
//   node beats.mjs song.mp3 [from] [seconds]
import { spawnSync } from 'node:child_process';
const [song, from = '0', secs = '60'] = process.argv.slice(2);
const RATE = 11025, HOP = 128, FPS = RATE / HOP;
const pcm = (filter) => {
  const r = spawnSync('ffmpeg', ['-v', 'error', '-ss', from, '-t', secs, '-i', song, '-af', filter, '-ac', '1', '-ar', String(RATE), '-f', 's16le', '-'], { maxBuffer: 1 << 28 });
  if (r.status !== 0) { console.error(String(r.stderr)); process.exit(1); }
  return new Int16Array(r.stdout.buffer, r.stdout.byteOffset, r.stdout.length >> 1);
};
const level = (x) => Array.from({ length: Math.floor(x.length / HOP) }, (_, i) => {
  let s = 0; for (let j = i * HOP; j < (i + 1) * HOP; j++) s += x[j] * x[j];
  return Math.log1p(Math.sqrt(s / HOP));
});
const rise = (e) => e.map((v, i) => Math.max(0, v - (e[i - 2] ?? v)));
const bass = level(pcm('highpass=f=30,lowpass=f=150')), all = level(pcm('anull'));
const rb = rise(bass), ra = rise(all);
const onset = rb.map((v, i) => v + 0.6 * (ra[i] ?? 0));
// tempo: the lag between 70 and 170 bpm where the onsets line up best (nearer 115 bpm wins a tie with its double or half)
let best = { score: -1 };
for (let bpm = 70; bpm <= 170; bpm += 0.25) {
  const lag = (60 / bpm) * FPS;
  let s = 0, n = 0;
  for (let k = 1; k <= 4; k++) for (let i = 0; i + Math.ceil(k * lag) < onset.length; i += 1) { s += onset[i] * onset[i + Math.round(k * lag)]; n++; }
  const score = (s / n) * Math.exp(-0.5 * (Math.log2(bpm / 115) / 0.9) ** 2);
  if (score > best.score) best = { bpm, lag, score };
}
// the drop: the moment the bass comes in, where the 3 s after are louder in the lows than the 2 s before by the most
const pre = [0];
for (const v of bass) pre.push(pre[pre.length - 1] + v);
const mean = (a, b) => { const i = Math.max(0, Math.round(a)), j = Math.min(bass.length, Math.round(b)); return j > i ? (pre[j] - pre[i]) / (j - i) : 0; };
let drop = null, jump = 0;
for (let i = Math.round(2 * FPS); i + 3 * FPS < bass.length; i++) {
  const d = mean(i, i + 3 * FPS) - mean(i - 2 * FPS, i);
  if (d > jump) { jump = d; drop = i; }
}
if (drop !== null) {           // the attack itself: the sharpest rise in the lows within 0.3 s of that point
  let m = -1, at = drop;
  for (let i = Math.round(drop - 0.3 * FPS); i <= drop + 0.3 * FPS; i++) if ((rb[i] ?? 0) > m) { m = rb[i]; at = i; }
  drop = at;
}
// the grid hangs on the drop; with no drop, on the phase where the bass hits line up
let phase = 0, top = -1;
if (drop !== null && jump > 0.15) phase = drop % best.lag;
else for (let p = 0; p < best.lag; p++) {
  let s = 0; for (let t = p; t < rb.length; t += best.lag) s += rb[Math.round(t)] ?? 0;
  if (s > top) { top = s; phase = p; }
}
const beats = [];
for (let t = phase; t < onset.length; t += best.lag) {
  const c = Math.round(t);
  let m = 0, at = c;           // a beat moves to the bass hit beside it (within 0.023 s), else it stays on the grid
  for (let i = c - 2; i <= c + 2; i++) if ((rb[i] ?? 0) > m) { m = rb[i]; at = i; }
  beats.push(+((m > 0.4 ? at : c) / FPS).toFixed(3));
}
const dropAt = drop !== null && jump > 0.15 ? +(drop / FPS).toFixed(3) : null;
console.log(JSON.stringify({ song, from: +from, bpm: best.bpm, beat: +(60 / best.bpm).toFixed(3), drop: dropAt, beats }, null, 1));
```

## Step 4. Build the film

`index.html` is already a real, tested film: two clips, three screens, 7.5 seconds. Edit it. Change the words, the times, the `BEATS` list, the accent and the file names. Keep the layer order
and the structure.

```html
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=1080, height=1920">
<title>Word-by-word reel</title>
<script src="https://cdn.jsdelivr.net/npm/gsap@3.14.2/dist/gsap.min.js"></script>
<style>
:root { --accent: #F0764F; --text: #F6F4EF; }
* { margin: 0; padding: 0; box-sizing: border-box; }
body { background: #000; }
#root { position: relative; width: 100%; height: 100%; overflow: hidden; background: #0b0b0d; }
.cam { position: absolute; inset: 0; overflow: hidden; }            /* untimed: GSAP moves this, never the video */
.cam video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.shade { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(8,8,10,.62) 0%, rgba(8,8,10,.22) 32%, rgba(8,8,10,0) 56%); }
/* frosted glass: a blur of the footage behind it, darkened so white words read. No parent of it may have a filter,
   an opacity or a clip-path of its own, or it has nothing to frost. */
.glass { position: absolute; left: 56px; top: 196px; width: 968px; height: 1010px; border-radius: 46px;
  -webkit-backdrop-filter: blur(30px) saturate(150%) brightness(.46); backdrop-filter: blur(30px) saturate(150%) brightness(.46);
  background: radial-gradient(120% 70% at 0% 0%, rgba(255,255,255,.10), rgba(255,255,255,0) 60%), rgba(14,14,16,.42);
  box-shadow: inset 0 1.5px 0 rgba(255,255,255,.42), inset 0 0 0 1.5px rgba(255,255,255,.16); }
.sheen { position: absolute; left: 56px; top: 196px; width: 968px; height: 1010px; border-radius: 46px; overflow: hidden; pointer-events: none; }
.sheen i { position: absolute; left: -50%; top: -10%; width: 42%; height: 120%; background: linear-gradient(100deg, rgba(255,255,255,0), rgba(255,255,255,.2), rgba(255,255,255,0)); }
.small, .big { position: absolute; left: 124px; white-space: nowrap; }
.small { top: 300px; font: 700 52px/62px "Space Mono", monospace; letter-spacing: -.01em; color: var(--accent); }
.big { top: 364px; height: 188px; font: 400 176px/188px "Archivo Black", sans-serif; letter-spacing: -.02em; color: var(--text); overflow: hidden; padding-right: 12px; }
.ch { display: inline-block; white-space: pre; }
.dot { color: var(--accent); }
.br { position: absolute; width: 74px; height: 74px; border: 0 solid rgba(246,244,239,.9); }
#b1 { right: 64px; top: 208px; border-width: 4px 4px 0 0; }
#b2 { left: 64px; top: 1120px; border-width: 0 0 4px 4px; }
</style>
</head>
<body>
<div id="root" data-composition-id="main" data-start="0" data-width="1080" data-height="1920" data-fps="30" data-duration="7.5">

  <!-- 1 the footage -->
  <div class="cam" id="camA" style="z-index:1"><video id="clipA" class="clip" src="assets/clip1.mp4" data-start="0" data-duration="2.5" data-track-index="0" muted playsinline preload="auto"></video></div>
  <div class="cam" id="camB" style="z-index:1"><video id="clipB" class="clip" src="assets/clip2.mp4" data-start="1.85" data-duration="5.65" data-track-index="0" muted playsinline preload="auto"></video></div>
  <div class="shade" style="z-index:2"></div>

  <!-- 2 the card, and the words on it: behind the person -->
  <div class="glass" id="glass" style="z-index:3" data-layout-allow-overlap></div>
  <div class="sheen" style="z-index:4" data-layout-allow-overflow><i id="sweep"></i></div>
  <p class="clip small" id="s1" data-start="0" data-duration="2.17" data-track-index="2" style="z-index:5">put your words</p>
  <h2 class="clip big" id="w1" data-start="0" data-duration="1.09" data-track-index="3" style="z-index:5">BEHIND</h2>
  <h2 class="clip big" id="w2" data-start="1.09" data-duration="1.08" data-track-index="3" style="z-index:5">YOU.</h2>
  <p class="clip small" id="s2" data-start="2.17" data-duration="2.17" data-track-index="2" style="z-index:5">one word</p>
  <h2 class="clip big" id="w3" data-start="2.17" data-duration="1.07" data-track-index="3" style="z-index:5">EVERY</h2>
  <h2 class="clip big" id="w4" data-start="3.24" data-duration="1.1" data-track-index="3" style="z-index:5">BEAT.</h2>
  <p class="clip small" id="s3" data-start="4.34" data-duration="3.16" data-track-index="2" style="z-index:5">now make</p>
  <h2 class="clip big" id="w5" data-start="4.34" data-duration="3.16" data-track-index="3" style="z-index:5">YOURS.</h2>

  <!-- 3 the person again, cut out, in front of the card -->
  <div class="cam" id="cutA" style="z-index:6"><video id="meA" class="clip" src="assets/cut1-trim.webm" data-start="0" data-duration="2.5" data-track-index="4" muted playsinline preload="auto"></video></div>
  <div class="cam" id="cutB" style="z-index:6"><video id="meB" class="clip" src="assets/cut2-trim.webm" data-start="1.85" data-duration="5.65" data-track-index="4" muted playsinline preload="auto"></video></div>
  <div class="br" id="b1" style="z-index:7"></div><div class="br" id="b2" style="z-index:7"></div>

  <audio id="song" class="clip" src="assets/song.m4a" data-start="0" data-duration="7.5" data-media-start="14.969" data-volume="1" data-track-index="10"></audio>
</div>
<script>
// the beats of the song in film seconds (beats.mjs, minus data-media-start). DROP is the cut from the hook to screen 2.
const BEATS = [0, .546, 1.091, 1.625, 2.171, 2.705, 3.239, 3.773, 4.342, 4.888, 5.434, 5.968, 6.513, 7.047];
const DROP = BEATS[4];
// every big word and small line is split into letters; a full stop takes the accent
document.querySelectorAll('.small, .big').forEach((el) => {
  el.innerHTML = [...el.textContent].map((c) => `<span class="ch${el.classList.contains('big') && c === '.' ? ' dot' : ''}">${c === ' ' ? '&nbsp;' : c}</span>`).join('');
});
window.__timelines = window.__timelines || {};
const tl = gsap.timeline({ paused: true });
const rise = (id, at) => tl.fromTo(id + ' .ch', { yPercent: 112 }, { yPercent: 0, duration: .42, ease: 'power4.out', stagger: .02 }, at);
const type = (id, at, per = .018) => tl.fromTo(id + ' .ch', { opacity: 0, filter: 'blur(8px)' }, { opacity: 1, filter: 'blur(0px)', duration: .3, ease: 'power3.out', stagger: per }, at);
const leave = (id, end) => tl.to(id + ' .ch', { yPercent: -60, opacity: 0, filter: 'blur(8px)', duration: .13, ease: 'power2.in', stagger: .004 }, end - .18);

// 1 the open: frame 0 is complete (card, small line, first word); the frame starts close and eases out
tl.fromTo(['#camA', '#cutA'], { scale: 1.14, transformOrigin: '50% 0%' }, { scale: 1, duration: 1.4, ease: 'power3.out' }, 0);
tl.fromTo('#glass', { clipPath: 'inset(0% 0% 24% 0% round 46px)' }, { clipPath: 'inset(0% 0% 0% 0% round 46px)', duration: .5, ease: 'power4.out' }, 0);
leave('#w1', BEATS[2]); rise('#w2', BEATS[2]); leave('#w2', DROP); leave('#s1', DROP);
// 2 the push left on the drop: the second clip comes in, the card stays
const P = DROP - .2;
tl.fromTo(['#camA', '#cutA'], { xPercent: 0 }, { xPercent: -100, duration: .42, ease: 'power3.inOut', immediateRender: false }, P);
tl.fromTo(['#camB', '#cutB'], { xPercent: 100 }, { xPercent: 0, duration: .42, ease: 'power3.inOut' }, P);
tl.fromTo('#sweep', { xPercent: 0 }, { xPercent: 460, duration: .9, ease: 'power2.inOut' }, DROP - .1);
type('#s2', DROP); rise('#w3', DROP); leave('#w3', BEATS[6]); rise('#w4', BEATS[6]); leave('#w4', BEATS[8]); leave('#s2', BEATS[8]);
// 3 the end title: the small line types on over one big word, two corner brackets draw in
type('#s3', BEATS[8], .04); rise('#w5', BEATS[8] + .12);
tl.fromTo('#b1', { opacity: 0, x: 30, y: -30 }, { opacity: 1, x: 0, y: 0, duration: .5, ease: 'power3.out' }, BEATS[8]);
tl.fromTo('#b2', { opacity: 0, x: -30, y: 30 }, { opacity: 1, x: 0, y: 0, duration: .5, ease: 'power3.out' }, BEATS[8]);
// the frame leans in a touch on every second beat after the drop. Every zoom grows from the top edge (50% 0%): the head
// moves down, away from the words. From the middle it would grow up into them.
for (let k = 5; k < BEATS.length; k += 2) tl.to(['#camB', '#cutB'], { scale: 1 + .012 * ((k - 3) / 2), transformOrigin: '50% 0%', duration: .28, ease: 'power3.out' }, BEATS[k]);
window.__timelines['main'] = tl;
</script>
</body>
</html>
```

Rules that keep it working:

- The order is footage, shade, glass, words, cut-out. If the words end up over the person or the thing, the cut-out is missing
  or its `z-index` is under the words.
- Never put a filter, opacity or clip-path on a parent of `.glass`. It frosts what is behind it, and that breaks it.
- Never tween a `<video>` or a `.clip`. Move the untimed `.cam` around it, and the letters inside a word.
- Both videos of one clip (the footage and its cut-out) have the same start, length and file timing.
- The second clip starts 0.3 seconds before the push, parked off screen, so the player never waits on a cut.
- Every word is its own `.clip` with its own start and length. It leaves 0.18 seconds before the next one.
- One font size for every big word: the smaller of 176 and 1210 divided by the characters in the longest word, its full
  stop included (BEHIND 176, GUESSING. 134). Set it in `.big`, and keep its `top`.
- **Every zoom grows from the top edge** (`transformOrigin: '50% 0%'`). From the middle, the head grows up into the word.

**One clip only.** Make these four changes to `index.html`:

1. Delete the two lines that hold `id="camB"` and `id="cutB"`.
2. On `clipA` and `meA`, set `data-duration` to the length of the film.
3. Replace these three lines: `const P = DROP - .2;`, the `fromTo` with `xPercent: -100` and the `fromTo` with
   `xPercent: 100`. Put this one line in their place:
   `tl.to(['#camA', '#cutA'], { scale: 1.1, transformOrigin: '50% 0%', duration: .35, ease: 'power4.out' }, DROP);`
4. In the `for` loop, change `#camB` to `#camA`, `#cutB` to `#cutA`, and `scale: 1 +` to `scale: 1.1 +`.

**Two screens.** Delete the words you do not use (`s3`, and the `w` lines left over) and every `rise`, `type` and `leave` that names
them. Screen 2 is the last one: `type('#s2', DROP, .04)`, its last word stays to the end of the film with no `leave`, and the two
bracket lines start at `DROP`. Keep only the beats the film is long enough for in `BEATS`, and point the swaps at them. Set `data-duration` of `#root` and of the song to the film's length.

## Step 5. Check it

```
npx --yes hyperframes@0.9.104 check --json
npx --yes hyperframes@0.9.104 snapshot --at 0,0.6,1.5,2.0,2.2,3.0,4.6,6 --no-end -o stills
```

Run `check` first, read `ok` and the errors (the report is long), and fix every error. Then open the stills and look at them yourself. It is done when all of these are
true:

- `check` says `"ok": true`.
- Frame 0 shows the card, the small line and the first word, all readable.
- The person (or the thing) is in front of the card on every still, and the card is in front of the rest.
- No letter is fully behind the head or the thing. `check` reports it as a `text_occluded` error. The same code as info, or
  `text_box_overflow`, at a moment when a word is sliding in, is fine: the still after it must show the whole word.
- The words start at x 124 and y 300 or lower down. Further out, Instagram, TikTok and YouTube cover them.
- The drop is on the frame where the second clip comes in.

These warnings are expected and fine: `first_frame_empty` (the footage is meant to fill the frame), `timeline_track_too_dense`,
`outside_safe_zone` for YouTube only, and `duplicate_media_discovery_risk` when there is no person.

| What you see | What to do |
|---|---|
| `text_occluded` error | fewer letters, or move the person down with a bigger `D` |
| `contrast_aa_failure` | lower `brightness(.46)` in `.glass`, or a lighter accent |
| the card is a flat grey slab | the shot behind it is dark and even: raise the first gradient of `.glass`, or use a clip with a lamp or window |
| `http_error` 422 on a clip | its pixels are not square: `setsar=1` is missing in step 1, make the clip again |
| the person has a halo | cut out again with `--quality best`; check both files have the same frame count |
| a roof or a pole is cut off, or slides along its outline | move those points outward, or take a steadier stretch |
| the preview stops at the cut | the second clip must start before the push, off screen |
| a word is up too short to read | fewer big words on that screen, never a smaller gap |

## Step 6. Show it, then render once

```
npx --yes hyperframes@0.9.104 preview --background --no-open
```

Give the user the link it prints. They watch it with sound and answer with notes that name a second ("at 2.4 the word is
late"). Change the film, check again, show it again. Only after a clear yes:

```
npx --yes hyperframes@0.9.104 render -o renders/word-by-word.mp4 -q delivery
```

Check the file's length and frame count, and tell the user where it is.

## Credits

The idea of one word at a time on a card behind the speaker comes from Edita Club's orchid reel and its free guide
(https://editaclub.com/g/orchid-reel/). This skill is its own method and its own code. HyperFrames is HeyGen's
(https://hyperframes.heygen.com). The cut-out model is u2net_human_seg.

Guide, with pictures: https://engram.media/guides/word-by-word-reel
