Add captions to a video
flow_captionsBurn spoken-word captions into landscape or vertical videos locally with whisper.cpp, using short-form styles across about 100 languages.
Instructions
Burn spoken-word captions into a video, in the style short-form apps use, for landscape or vertical footage (local and free: whisper.cpp hears the words on this computer, nothing is uploaded). Styles: bold (big capitals, the spoken word lights up), highlight, reveal, clean, boxed. Works in about 100 languages, including ones written without spaces (Japanese, Chinese, Thai) and right to left (Arabic, Hebrew); pass language (en, es, tr, ja...) whenever you know it. The first call downloads a speech model once: 148 MB for English, 574 MB for other languages. Saves -captions.mp4 plus an .srt. Before calling this, call flow_transcribe, show the user the words with any likely mishearings fixed, and get their OK: then pass the agreed words as text (matching words keep their timing), so the video is made once, right.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"video": "<video>"
},
"name": "flow_captions"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| lead | No | Seconds the highlight runs ahead of the voice. Default 0.12; raise it if words still light up late, lower it if early. | |
| size | No | small, medium, large, or a percentage of the style's normal size (100 = medium, 150 = half again as big). | medium |
| text | No | Corrected words, to fix anything misheard. Timings are kept for every word that still matches; a line break starts a new caption. | |
| color | No | Highlight colour as #RRGGBB, for bold, highlight and reveal. | |
| names | No | Lowercase only: names to keep capitalised even where they start a sentence (e.g. ["Juno"]). Names in the middle of a sentence are found by themselves. | |
| style | No | bold: big capitals, 1-3 words at a time, the spoken word lights up (the short-form look). highlight: the spoken word sits on a coloured block. reveal: words appear as they are said. clean: classic subtitles. boxed: white words on a dark band. | bold |
| video | Yes | Absolute path of the video to caption: any MP4 or MOV on this computer, such as a film made with flow_assemble. | |
| words | No | Word timings to use instead of hearing the whole video, e.g. from flow_transcribe on each clip of a joined film, shifted by where each clip starts in it. Use it when the film's own sound (music, a train, crowd) throws the timing off. text still corrects the words on top. | |
| letters | No | as_said keeps normal capitals (sentence starts, names); capitals is the high-energy short-form look; lowercase is the calm, casual look, and names still keep their capital in it. Default: capitals for bold, as_said for the rest. | |
| project | No | Films folder to save into. Default: the video's own folder when it is already in the films folder, otherwise 'Captions'. | |
| language | No | Spoken language as a code: en, es, fr, de, pt, tr, ja, zh, ar... Pass it whenever you know it. auto detects it (a 60 MB detector downloads once). English uses a 148 MB model; every other language a 574 MB one, each downloaded the first time. | auto |
| position | No | bottom, middle or top - or a number for an exact height: how far down the frame the middle of the caption sits, 0 = top edge, 100 = bottom edge. | bottom |