Animated captions for talking-head video, rendered locally.
Subtle is a skill for Codex and Claude Code, with a standalone CLI. Give it a video to transcribe and animate captions in one of 35 styles. It runs on your machine without uploading the footage or asking for an API key.
See every style on a real clip: https://subtle.refs.video (the showcase site runs the same caption engine in the
browser; its source is in site/).
All 35 styles on the same frame. Every one runs live at https://subtle.refs.video.
Demo frames: Sam Altman on David Senra's podcast (https://www.youtube.com/watch?v=kG8AoExkX40), used only to show captions; not affiliated with or endorsed by Sam Altman, OpenAI or the show.
Say "the gold price is five thousand dollars" and the caption shows $5,000, highlighted, in one piece.
- The words that matter get the highlight. Numbers, prices, percentages and dates first, then names and places, then the punchline word, then the topic the first time it comes up. Claude reads your captions and picks them, with a one-line reason for each that you can read and change. One highlight per page, two on long pages, never filler words.
- Numbers are written the way you would write them. "five thousand dollars" and "$5000" become
$5,000; "forty percent" becomes40%; "one lakh rupees" becomes₹1 lakh; years stay1991. An amount is one token: it is never split across two lines or two pages. Indian digit grouping (₹15,00,000) is used for rupee amounts and Hindi speech. - Spanish works the same way. "cinco mil dólares" becomes
$5,000, "cuarenta por ciento" becomes40%, "dos mil veinticuatro" becomes2024, and the highlight rules use Spanish word lists. A transcript that already writes5.000and3,5keeps that convention;--numbers europeanor--numbers westernforces one. - Every style has its own highlight: a serif italic, a colour, an inverted chip, a second block colour, the giant word behind the speaker. A highlighted page also stays on screen a beat longer when there is room.
- It works with no one picking, too. Rules find the numbers, names and contrast words (
--emphasis auto, the default).--emphasis numberskeeps only numbers,--emphasis offturns highlights off, and--emphasis-words 'gold, $5,000'forces words.
- Text behind the speaker, per shot. Six styles (
keyword,cover,outline,poster,rise,numeral) put the giant word behind the person. Subtle checks every shot on its own: in a wide shot the word goes behind the head, in a close-up (where it would be hidden) it is drawn in front or skipped. Needs macOS (Apple Vision cut-out). - Smart placement. Each page moves off the face and the hands, inside the style's allowed range, and only when it has
to (
--placement auto, the default;offkeeps the style's own position). - Cut-aware pages. Hard cuts are found with ffmpeg and no page straddles one (
--cuts auto;offignores cuts). - Automatic legibility. Subtle measures what is behind every page and adds a soft halo, scrim or outline only where
the type would not read. Clean dark footage is left untouched (
--legibility auto;offdraws the preset as it is). - Palette from the footage. Styles with an accent colour take one that suits the scene and reads on it
(
--palette auto;offuses the preset's colours). - Recipe styles. One generic style driven by a
recipeblock in the style JSON, so a new caption treatment needs no new TSX (seedocs/ARCHITECTURE.md).
- Transcribes the speech with word-level timing (Whisper large-v3-turbo through
mlx-whisper). - Writes spoken numbers as single tokens (
$5,000,40%,₹1 lakh), groups the words into short, readable pages and highlights the words that matter. - Renders the captions in the style you pick, at the video's own size and frame rate.
- With a behind-the-speaker style (
keyword,cover,outline,poster,rise,numeral), cuts the speaker out with Apple Vision and puts the giant word behind them, shot by shot. - Moves pages off faces and hands, keeps them clear of cuts, and adds a halo or scrim where the footage would hide the type.
- Checks the result (safe area, contrast, how much of each big word is visible) and makes a contact sheet.
You get <name>.captioned.mp4, <name>.srt, <name>.captions.json (editable) and <name>.preview.jpg.
Codex:
git clone https://github.com/0xpratzyy/subtle ~/.agents/skills/subtleClaude Code:
git clone https://github.com/0xpratzyy/subtle ~/.claude/skills/subtleThen ask your agent to "add captions to ~/Movies/talk.mp4" or "put a giant keyword behind me". For the standalone CLI, clone the repo anywhere and run the commands below from that directory.
| Need | For | Install |
|---|---|---|
| macOS on Apple Silicon | transcription (mlx-whisper) and the behind-the-speaker effect (Apple Vision) |
|
| ffmpeg | reading and writing video | brew install ffmpeg |
| Node 18 or newer | the caption renderer | brew install node |
Python 3.9 or newer and uv |
transcription and visual checks | brew install uv |
| Swift (Xcode command line tools) | the behind-the-speaker styles and smart placement | xcode-select --install |
bash scripts/doctor.sh checks all of this and prints what is missing. The first run downloads the speech model (about
1.6 GB) and installs the renderer's packages (about a minute). On Linux or Intel Macs you can still render captions
from your own word timings (--words). Run bash scripts/doctor.sh --from-timings for this workflow.
Without uv, install mlx-whisper for transcription and numpy and pillow for visual checks
in the Python environment that runs Subtle.
35 caption styles. Six of them (behind you) put the giant word behind the speaker, decided per shot (macOS for the person cut-out).
A style is one JSON file in styles/ plus one small component in template/src/styles/. Copy a preset, change the
font, colours, size or timing, and pass its path to --style. Some styles have colourways: --style ticket:yellow.
python3 scripts/subtle.py --list-styles prints them all.
python3 scripts/subtle.py talk.mp4 # glide
python3 scripts/subtle.py talk.mp4 --style glass # frosted-glass pill
python3 scripts/subtle.py talk.mp4 --style keyword # a giant keyword behind the speaker
python3 scripts/subtle.py talk.mp4 --style cover --legibility off --palette off # behind a headline, preset colours
python3 scripts/subtle.py talk.mp4 --style ticket:yellow # a colourway of a style
python3 scripts/subtle.py talk.mp4 --style accent --emphasis-words 'gold, $5,000' --vocab "Meera, RBI"
python3 scripts/subtle.py talk.mp4 --emphasis numbers # highlight only numbers, prices, percentages and years
python3 scripts/subtle.py talk.mp4 --hinglish # Hindi written in Latin letters
python3 scripts/subtle.py talk.mp4 --lang es # Spanish (detected by itself when --lang is left out)
python3 scripts/subtle.py talk.mp4 --aspect 9:16 # centre-crop first
python3 scripts/subtle.py talk.mp4 --placement off --cuts off # keep the style's own position, ignore cuts
python3 scripts/subtle.py talk.mp4 --behind off # draw giant words in front, never behind
python3 scripts/subtle.py talk.mp4 --captions talk.captions.json # re-render after editing the captionsThe transcript is cached by the file's hash, so trying another style does not transcribe again.
- The behind-the-speaker effect (
keyword,cover,outline,poster,rise,numeral) works best with one person and a steady camera. Fine hair, fast hand movement and fast pans show at the matte edge. Subtle checks the subject first and draws the words in front when it would look bad. - Styles without a container (soft-shadow text) can be hard to read on bright or busy footage; the check warns about
low contrast and suggests
glass,chiporblock. - Whisper spells Hindi words in Latin letters unevenly. Read the transcript before rendering and fix words with
--replace heard=Shown. - A giant number is never put behind the speaker in
keyword(hidden digits would change it): it is drawn in front.numeralis built for numerals behind the speaker. - Word timings come from Whisper's attention, not forced alignment. They are usually within a frame or two; very fast speech can drift.
Subtle's code is MIT. The bundled fonts are under the SIL Open Font License. The default renderer uses Remotion, which is free for individuals and companies of up to 3 people; larger companies need a Remotion company licence. Details for every dependency are in THIRD_PARTY.md.
The showcase site (site/) uses a third-party clip for demo only. That media is not in this repo; see
site/README.md for how to make your own.
How the pieces fit together: docs/ARCHITECTURE.md.
Made by Refs.




































