A 6-15 second film or a single still that sells a physical or software product in a feed, where it is seen
small, without sound, for about a second. What you get: a shot list, masters in 4:5 and 9:16 (16:9 for
YouTube), stills, and a quality receipt per piece. Scripts are in ${CLAUDE_PLUGIN_ROOT}/skills/ad-video/scripts.
# ad-video: ads people stop on, built from real material
A 6-15 second film or a single still that sells a physical or software product in a feed, where it is seen
small, without sound, for about a second. What you get: a shot list, masters in 4:5 and 9:16 (16:9 for
YouTube), stills, and a quality receipt per piece. Scripts are in `${CLAUDE_PLUGIN_ROOT}/skills/ad-video/scripts`.
## 0. Rules, each from a failure
| What went wrong | Rule |
|---|---|
| A generated product looked almost right; buyers know the real one | The product comes only from its 3D model or real footage. Generators move the camera, the city, the light; never the product |
| A generator restyled the device when light crossed it | Keep the product small in generated shots, or paste your render back per frame (`screen_paste.py`, `quality.py register`) |
| A 3D close-up of the connector panel read as fake | 3D close-ups only of simple faces (front, top). Ports, cables, hands: real footage |
| A still cut from a video was smeared | Measure `edge_width` before showing anything (section 5) |
| A sharp still was rejected: "nobody scrolling will understand what this is" | Readability is a separate check: whole product visible, its screen showing something, a hand or a person using it |
| A procedural city looked like a game | Blender is the schematic (camera path, product, light trail); the place is real: a licensed photo of it is the keyframe, a video model renders the motion |
| Blockout gear (grey boxes for cameras, mics, monitors) shipped as is: "ugly, why so square" | A 3D blockout is never final. Everything that is not your product is restyled photoreal: image model on the keyframes, video model between them, your product pasted back |
| Cuts went in different directions and nobody could follow | One screen direction for the whole film (section 3) |
| The first cut was too long | Shots 0.6-1.2 s on a beat grid; the product is on screen in the first second |
| A flat brand-colour ground looked dirty, the photo ended on a hard line | Photo fades out through a mask; the ground is a gradient with a faint glow and grain |
| Stock music with no clear licence | Masters ship silent with captions; music is a later A/B arm with a licensed or generated track |
| Two renders at once froze a 32 GB laptop | `blender-safe.sh`: one render at a time, thread cap, memory watchdog |
| An image model rewrote the small UI text on the product's screen | Put the real screen back from the source (`screen_paste.py`) and look at every glyph at 100% |
| A shot stretched to a whole beat crossed a cut in the source: a 0.2 s flash of the next scene | Shots are whole beats rounded down; `studio_cut.py` refuses a shot the source cuts inside |
| `-t 0.6` on 29.97 fps footage gave 16 frames, not 15: +80 ms over eight shots, every later cut off the beat | Render each shot to an exact frame count |
| In 9:16 the caption sat on the product in the opening shot | Look at the hook frame in every ratio; a shot whose product sits low gets its caption on top |
## 1. Formats
| Where | Ratio, size | Notes |
|---|---|---|
| Meta feed | 4:5, 1080x1350 (stills 1440x1800) | Most screen on a phone |
| Meta Stories, Reels | 9:16, 1080x1920 | Keep text and logo out of the top 14%, bottom 35%, 6% each side. Fill bands with a blurred copy of the shot, not flat colour |
| YouTube Shorts, Demand Gen | 9:16, also 1:1, 4:5, 16:9 | Same safe-zone thinking |
| YouTube in-stream | 16:9 | Skippable after 5 s: product and brand before the skip |
| Google image assets | 1:1 (1200), 1.91:1 (1200x628) | No text, no logo overlay, no collage, no blur |
Specs move: recheck the platform's current guide before a large batch. Sound is off by default: every claim is
on screen as a caption. Length 6-15 s.
## 2. Pipeline
1. **Inventory.** Real footage and photos at full resolution (originals, not the website's copies), the 3D
model, licensed place footage. Log every licence beside the file.
2. **Shot list first**, as a table: shot, seconds, source (real, render, generated), screen direction, caption.
Write it before rendering anything (section 3).
3. **Build each shot** by its source:
- real: cut with ffmpeg; pick clean frames with `quality.py frames <video> <from> <to>`. A promo cuts every
second or so: find the cuts first (`ffmpeg -vf "select='gt(scene,0.12)',showinfo"`), sheet one frame per
scene, and keep every window inside one scene. Measured: 1.3 s windows picked by eye let faces, a crowd and a
VR headset flash for 0.3-0.6 s into a live ad. A map of "product spans" is not a scene map: two product shots
back to back are two scenes, and a window across them flashes;
- render: Blender, always through `blender-safe.sh`; front and top faces only in close-up;
- generated: see [references/seedance.md](references/seedance.md), one test shot, look, then the batch.
4. **Edit, then assemble.** One timeline film per hook, every cut on a beat (section 3, "Edit in a timeline");
4:5 and 9:16 masters from the same cut; captions inside the safe zones; burn them in.
5. **Critic loop, then gate.** Every clip a model returns, every render pass and every assembled cut goes through
`critic.py` before a person sees it (section 5). Fail = apply its fixes, regenerate, re-run; at most 3 tries a
shot. Keep `prompt.txt` and `critic.json` beside each clip. Then the measured gate. A person should never be
the first to see what is wrong.
6. **Show the human** a page with the picture and the ad text together. New ads go live PAUSED, as A/B arms
against what already runs, never as replacements.
## 3. Directing (the cut has to read in one pass)
- **One screen direction.** Pick left-to-right or into depth and keep it: every shot continues the motion of the
one before it (match on action), cut while moving, never reverse the vector across a cut, the camera follows
the product rather than swinging around it.
- **Beat grid.** Choose a tempo (100 BPM = 0.6 s a beat); shots last 1-2 beats; captions change on beats.
- **Story shapes that worked:** many devices fly in and collapse into one, it lands, real cables go in, a clean
diagram shows what it handles; or a flight through the viewer's own city that ends on the desk, then real
close-ups, then the call to action.
- **Numbers on screen come from the spec page**, verbatim (how many inputs, outputs, channels).
Details and the shot-list template: [references/directing.md](references/directing.md).
### Edit in a timeline, on the beat, one film per hook
The cut is an `.otio` film edited in Life2Film Studio (or any OTIO editor), not a list of ffmpeg windows tuned by
hand: the window plays it from the sources, shots are swapped and trimmed by eye, and the cut list comes back out.
- **Arms by hook.** `studio_cut.py arms shots.cuts out/ --hooks 1,4,5` makes one film per opening shot: the same
captions in the same order, a different first picture. Hooks different in kind (a macro of the product, a hand
on it, the product in its room) teach more than three close-ups. Each arm is one ad in an A/B test.
- **Every cut on a beat.** Shots are whole beats, rounded down so none runs past the window it was picked in; cut
points sit on the frame nearest their beat; a shot the source cuts inside is refused. Choose a tempo whose beat
is whole frames (100 BPM = 15 frames at 25 fps).
- **Music later, grid follows it.** `--music track.wav --music-from <a downbeat>` lays the track on a lane and
reports the tempo the editor hears; rebuild at that BPM. Until then masters are silent with captions.
- **Back to your render.** `studio_cut.py cuts film.otio > arm.cuts` after the film was edited in the window feeds
the branded render (brand type and frame). Life2Film Studio exports a film only when some track is heard.
- The product is on screen in the first second of every arm, in every ratio.
## 4. Stills
HTML template rendered by headless Chrome at 2x: photo on top, headline on the picture or right under it, logo
top left. The photo fades out through a CSS mask into a gradient ground with a faint accent glow and grain;
never a hard edge or a flat fill. An image model may sharpen or relight your own frame (`enhance.py`), never
draw the product. [references/stills.md](references/stills.md).
## 5. Quality gate
```bash
Q=${CLAUDE_PLUGIN_ROOT}/skills/ad-video/scripts/quality.py
uv run --script $Q still ad.jpg --region 0,0,1,0.64 # the photo area, not the caption band
uv run --script $Q frames film.mp4 0 3 # hook frames, crispest first
uv run --script $Q compare source.png edited.png # after any image-model edit
```
- **Measured.** `edge_width` (px at 720 p, the crispest eighth of the frame): starting line 4.5 px; pieces that
worked read 3.7-3.8, ones rejected as smeared 5.5. `focus` only ranks frames of one clip (grain reads as
sharp). Clipping, contrast, flat share for empty or blown pictures.
- **Judged.** A vision model sees the picture at 320 px for one look and answers what the product is and what
it does; the answer must match the ad's claim.
- **Fidelity** after any generated or edited frame: `compare` (aligned edge correlation), then the logo,
lettering and screen at 100% by eye.
- **Video:** the hook frame (first 1-3 s) and the worst frame of each shot get the still checks.
- **Critic** (`critic.py clip.mp4 --brief ... --prompt ... --reference product.jpg`): a vision model scores a
contact sheet 1-5 on hook, style (default "juicy and technological"), integration (part of the scene or pasted
on), slop, fidelity, direction; pass = all 4+. Returns the failing frames, fixes, a revised prompt and one wow
idea, and knows the house rules. Calibrated on a rejected cut: it flagged the same blockout boxes, missing
landing and mixed directions the human did. About US$0.03 a call.
Thresholds are starting points from a handful of human verdicts. Recalibrate on your own results: every live
creative, its readings and its CTR and thumb-stop rate. [references/quality-gate.md](references/quality-gate.md)
has the method and the research behind it.
## Scripts
| Script | Does |
|---|---|
| `quality.py` | still / frames / compare readings, `register()` homography |
| `enhance.py` | restore or relight your own frame via an image model (OpenRouter), keep-list in the prompt |
| `screen_paste.py` | put the real screen back into an edit, feature-aligned |
| `blender-safe.sh` | one headless Blender render at a time, thread cap, memory watchdog |
| `critic.py` | vision-model critic on a clip or still: scores, failing frames, fixes, revised prompt; exit 1 on fail |
| `seedance.py` | one image-to-video job (first and last keyframe) on OpenRouter, with its cost |
| `studio_cut.py` | cut list to a Life2Film Studio film and back: beat grid, one film per hook, cuts inside a shot refused |