# Techniques short ("how I made this")

**A cloned voice · HeyGen Avatar 6 · Playwright (bundled Chromium) · ffmpeg · Python (numpy, OpenCV) · macOS Vision · whisper.cpp.**

A 55-second vertical short that shares how something was made: "I made this incredibly realistic landing page with
particle effects and god rays, using Astra 6.2. Here's how I did it", then 1 pictures first, 2 short prompts, a line
to camera, 3 give it a score, 4 turn that into a skill, and an ending per cut. Nobody records anything: the voice is
the creator's clone, the face is their Avatar 6 twin saying that exact sound, and every demo is the real page,
recorded live on a virtual clock and pushed into by a compositor's camera.

Written from a real run (a short of a 31-minute landing-page tutorial, Dec 2026, posted on all three platforms). The
whole build is in `example/` (`short.json`, `takes.mjs`, `scenes.py`, `script.md`); the kit reproduces that short's
sections and mix bit for bit. This public copy leaves out account, job and media IDs and machine paths: bring your own
cloned voice, HeyGen twin (`create-ai-avatar`, `digital-twin` in this repo) and posting tools.

Any content fits, as long as each technique can be **shown working on the real thing**: a web page or app is recorded
live (the kit's recorder), a 3D scene or film plays from its own renders or footage (a scene's `take` can be any video
file), and the prompts, notes, scores and files on screen come from the creator's real logs.

```
 inventory + facts ─► script + storyboard + price ══ the creator's yes (script, layout, spend)
   ─► cloned voice, by paragraph ─► word times ─► timeline ─► twin slots ─► Avatar 6 twin (paid)
   ─► page takes (full-width page, virtual clock) ─► scenes + camera keys ─► text layer
   ─► compose ─► mix ─► export ─► checks ─► judges ⟲ fix rounds (every line 8+)
   ─► two cuts + post copy ══ the creator's look ─► post (short-release) ══ their yes + time ─► after-post check
```

## Rules that hold every step

- **Price first, spend on a typed yes**: the twin (about $0.10 a second at 1080p) always, cloud renders always. Keep a
  `ledger.md` of every quote, spend and public action, and report what was charged.
- **Nothing is posted, scheduled or published** without the creator's yes for that exact thing and time. Never sign
  in for them or type their credentials.
- **The likeness**: Avatar 6, their trained look, played straight (never reversed, looped back and forth or
  re-timed), never a face fix or warp afterwards. A clip that falls short is re-rendered, after asking.
- **Facts are real**: every prompt, note, score and number on screen comes from the logs or the film. A recreated
  "before" state (a too-tight heading put back for the demo) is named as recreated in the project's README.
- **Names**: brands and people that must never show are listed in `short.json` `check.banned` and checked by OCR on
  the rendered file. A made-up name in a page that matches a real company is renamed in the served copy.
- **Keep the machine usable**: renders at nice, at most 4 workers, one page recorder at a time. Playwright's bundled
  Chromium only (`channel: 'chromium'`), never a real Chrome. `ffmpeg -nostdin`.
- **Words**: grade-five, plain, like talking to a friend; digits on screen; captions in spoken order.
- Clean up superseded takes, sections and test renders once the new one is verified.

Kit: `scripts/` (Python through `scripts/py.sh`, which needs `uv`). Start a project with `scripts/new.sh DIR`.
Machine-specific notes (a voice id, a twin look, where Playwright lives) go in `references/local.md` and
`scripts/local.json`, which this public copy doesn't have: read them first if your install does.

## 1. Inventory and facts

From the long video, its script and the build logs (coding-agent sessions), list: what was made and the one-line
result (the hook); every technique with the **moment that proves it on screen**; the exact prompts typed
(time-stamped); real scores; what must never be seen (another site named in a prompt, client terms, banned names).
Pick 3 or 4 techniques a viewer can copy tomorrow, each with a picture that explains it with the sound off.

## 2. Script, storyboard, price, then stop

`references/script.md` has the shape, lengths and the example script. About 55 s spoken at 2.6 words a second.
Camera only three times: the hook (also the cover and frame 0), one line in the middle, the ending. Each technique is
a demo scene. Send the script, one storyboard frame per scene (`compose.py stills` once a take exists, or a sketch),
and **one price** (twin seconds × rate + voice). Stop for the creator's yes. Their own wording for the hook is used
as said.

## 3. Voice

The creator's cloned voice (ElevenLabs or similar), one paragraph per take, two takes each, the steadier kept,
levelled to -16 LUFS: `DIR/voice/P.mp3`. Word times with the text in `DIR/voice/P.txt`:

```bash
WHISPER_MODEL=path/to/ggml-large-v3-turbo.bin python3 ../long-video-to-short/scripts/align_phrases.py \
  voice/P.mp3 voice/P.txt voice/P-aligned.json --syllables voice/syl.json     # syl.json: {"6.2": 4}
```

Read every alignment against the script and fix names and numbers by hand (Whisper splits "6.2", drops words).

## 4. Timeline

`short.json` `main` lists the sections in order, `[name, paragraph, in s, out s or null, lead, tail]`; `ends` gives
each cut its ending. `py.sh timeline.py DIR` writes `voice-CUT.wav` and `timeline-CUT.json` and prints every word with
its index: the text layer points at those indices. Cut on sentence ends; a tail of 0.2 to 0.5 s lets a scene land.

## 5. Twin

`py.sh slots.py DIR` cuts one slot per camera section (0.4 s calm lead, 0.3 s pad) and prints the seconds and price.
On the yes, render each slot on the creator's HeyGen Avatar 6 twin with that slot as the audio (motion expressiveness
"less", a motion prompt like "looks straight into the camera lens the whole time; calm, small hand gestures at chest
height"), 1080p, saved as `DIR/twin/out/NAME.mp4`. Look at every clip: frame 0 a calm closed mouth, eyes on the lens,
hands inside the crop (`twin_x`), the whole line said.

## 6. Page takes (or footage)

`references/capture.md`. One take per scene, timed to its section, from `DIR/rec/takes.mjs` with
`scripts/take.sh DIR NAME...`. The page at **1440 CSS px wide**, DPR 2: 1440 × 2560 for a full scene, 1440 × 1280 for
the top half of a camera scene. **Show the whole full-width page first, then push in**: a short that shows only the
close-up 3D loses what the page is. Before a push-in, fade the page's small labels and the sections under the object
(`c.fade`), so no page text fights the captions. Hover with one continuous path.

## 7. Scenes and camera

`references/layout-and-text.md`. Each section's scene in `short.json` `scenes`: `pane` (page above, twin below),
`full` (page fills the frame) or `custom` (a function in `DIR/scenes.py`, like the example's picture cards). Camera keys
`[s, cx, cy, width]` in CSS px, `[s, "FULL"]` for the whole page. Look first:
`py.sh compose.py DIR stills hook:120,s2:300 out.jpg`.

## 8. Text layer

Captions (pages of light and bold lines, word by word on the voice), prompt chips typed in step with the voice and
sent, notes and file cards, a score counter, the cover title, the comment-keyword ask, all from `short.json` `text`.
`node scripts/render.mjs DIR CUT [from to]` (split a cut over 2 to 4 processes), `render.mjs DIR CUT stills n,n` to
look, `node scripts/safe.mjs DIR` (all text inside y 240 to 1680 for the 3:4 feed crop, words in spoken order).

## 9. Compose, mix, export

```bash
K=path/to/techniques-short/scripts
$K/py.sh $K/compose.py DIR hook s1 s2      # up to 4 of these at once; or DIR all
$K/py.sh $K/mix.py DIR ig ; $K/py.sh $K/mix.py DIR yt
$K/export.sh DIR ig ; $K/export.sh DIR yt  # out/CUT.mp4 under 30 MB, bt709 on the stream
```

Sound (`references/sound.md`): voice at -16, the film's own music about 15 LU under it and ducked, the film's own
effects on what is seen (a key per typed letter, a send, scans, highlights), the mix at -14 LUFS.

## 10. Checks and judges

`scripts/check.sh DIR CUT` on both cuts (needs `long-video-to-short` beside this skill): size, 1080 × 1920 at 60,
bt709, -14 LUFS and peaks, silences over 1 s, the transcript read word for word against the script (Whisper can drop
words at its 30 s window: check a doubt on the segment alone), frozen picture, banned names by OCR, lip sync (under
40 ms), text bounds and order. Then `scripts/sheets.sh DIR CUT` and `references/judging.md`: the brief, the rubric,
2 to 3 blind judges, and every fault the example's rounds found with its fix. Fix and re-judge until every line is 8
or more; report any line still short, honestly.

## 11. Deliver, post, close out

Two files (`(Instagram).mp4`, `(Shorts and TikTok).mp4`) and a post copy (caption per platform, the keyword DM text
and links, the full video link). Stop for the creator's look. Then, on their yes and time, `short-release` (one post
with a variant per platform, the keyword Auto-DM, TikTok through `tiktok-post`, the Short's Related video set to the
full video, AI labels as their rule says). `references/release.md` has what the example's release did. After it
posts: read every post back, ledger lines for each public action, eval data if your tools keep it, cleanup.

---

Copyright (c) 2026 Meng To

The license files are attached. [MIT](https://knowen.md/f/3c02f208-fea4-4055-a09c-593a4f764a38)

The attached ZIP contains the pinned supporting files and applicable license notices.