Hyperframes embedded captions

From oyi77/1ai-skills · View interactive version

Hyperframes embedded captions is an AI agent skill from the GitHub repository oyi77/1ai-skills. Use when adding captions or subtitles to talking-head or launch videos. Add captions/subtitles to talking-head or launch videos using HyperFrames. Use when the user wants embedded captions, verbatim caption rails, or cinematic text behind the subject. Covers the drop/rail/embed caption model, the ov

How to use this skill

Skill file

Overview

This skill adds burned-in captions to an existing video via a HyperFrames overlay composition. Use it when your source footage needs accessible, styled subtitles without a separate subtitle track. It renders the captioned MP4 deterministically from the HTML overlay.

HyperFrames — Embedded Captions

Add captions/subtitles to talking-head or launch videos. The caption model (drop/rail/embed) and the overlay law (captions are NOT a reserved band).

When to Use

When NOT to Use

The Caption Model — Drop / Rail / Embed

| | What | How it's shown |

|---|------|----------------|

| drop | filler — um/uh, stutters | not shown |

| rail | the default — ordinary spoken content | clean lower-third subtitle, in front |

| embed | a promoted peak — the headline beat | one big word behind the subject (matte occlusion) |

The rail carries most of the text; embed is the scarce, earned peak — ≤1 per beat, never two adjacent, spaced ≥ a beat apart.

The Overlay Law

A caption line is composited ON TOP of the film as an overlay; it is NOT a reserved zone.

Workflow

1 · Generate voiceover + word timestamps

# Using TTS with word-level timestamps
node scripts/heygen-tts.mjs ./vo-spoken.txt -o voiceover.mp3 --words vo-words.json --voice <voice_id>

2 · Align captions to display tokens

node scripts/align-captions.mjs --tokens script-tokens.json --words vo-words.json --out captions.json

captions.json is the caption-rail input (display spelling, spoken timing).

3 · Build the caption rail

const LINES = /* contents of captions.json */ [
  { id: 0, end: 2.74, w: [["This", 0.0], ["week,", 0.30], ...] },
  ...
];

4 · Verify caption presence

Sample 3-4 frames across the VO's spoken window and confirm the caption rail renders visible text on each. If any frame in a spoken interval is missing captions, the build ships uncaptioned — treat as a red gate.

Anti-Rationalization Table

| Rationalization | Reality |

|----------------|---------|

| "I'll center at 42% to leave room for captions" | True center (y = H/2) — captions are overlay |

| "I'll embed every word" | Embed is scarce — rail carries most text |

| "I'll skip word timestamps" | Audio is the clock — all beat times come from word timestamps |

| "I'll use phonetic spelling in captions" | Captions always render the display layer |

| "I'll guess the pronunciation" | Ask the user, then grow the lexicon |

Verification

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.