---
name: captions
description: Transcribe a video locally with Whisper, build clean SRT captions with readable line lengths, and optionally burn them in. Use when the user asks for captions, subtitles, an SRT or burned in text.
argument-hint: <video file> [burn] [language]
---

<!--
Claude Code skill: /captions
From the AgentCut prompt library: https://agentcut.dev/prompts/skill-captions/
Written by AgentCut. Free to copy, edit and use in your own projects.
Sources and credit: ranahaani/i-hate-editing (MIT) (https://github.com/ranahaani/i-hate-editing): Rule that captions should land slightly after the word, never before; Netflix Timed Text Style Guide (English USA) (https://partnerhelp.netflixstudios.com/hc/en-us/articles/217350977-English-USA-Timed-Text-Style-Guide): Line length and reading speed limits
Save as: .claude/skills/captions/SKILL.md
-->

# Captions

Input: $ARGUMENTS

1. Extract audio: `ffmpeg -i INPUT -vn -ac 1 -ar 16000 work/audio.wav`
2. Transcribe with word timestamps (ask which Whisper the user has installed if unsure):
   `whisper work/audio.wav --model small --word_timestamps True --output_format json --output_dir work`
3. Build captions from the word timings:
   - Max 42 characters per line, max 2 lines per caption (vertical video: 1 line, max 28 characters).
   - Keep reading speed under 20 characters per second. Merge or extend if faster.
   - Minimum 0.8 s on screen, maximum 6 s.
   - Break lines after punctuation or before conjunctions, never between an adjective and its noun.
   - Start each caption about 0.05 s after the first word starts. Early captions look out of sync.
4. Fix obvious mistakes in names and product terms using the list in CLAUDE.md, if there is one. Do not rewrite what the speaker said.
5. Save `out/<name>.srt` and show the user the 5 captions you are least sure about with timestamps.
6. If the user asked to burn them in, use the caption style from `brand/DESIGN.md` if it exists, otherwise white text, black outline, bottom center, inside the safe area:
   `ffmpeg -i INPUT -vf "subtitles=out/<name>.srt:force_style='FontName=Inter,FontSize=18,Outline=2,MarginV=60'" -c:a copy out/<name>_captioned.mp4`
7. Never overwrite an existing file.
