caption_video
Add word-timed captions to videos from transcript data, with optional karaoke word highlighting, using local ffmpeg.
Instructions
Burn styled, social-style captions into a video from a word-timed transcript — local ffmpeg, no credits. The usual chain is transcribe -> caption_video: run transcribe on the video (or its voiceover) to get word timestamps, then pass those here. Captions are styled and positioned with a font bundled in the package (no system-font dependency); optional karaoke highlights each word as it is spoken. Timestamps are relative to the video's own audio (t=0). Returns the output file path with its duration, resolution, and size, or a structured error with a hint. Requires ffmpeg. Set dry_run=true to preview without rendering.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| style | No | Optional caption styling. | |
| video | Yes | The video to caption — a local file path (e.g. a video_generate `path`) or an http(s) video URL. | |
| output | No | Optional output file path. Omit to write a default filename into the media output directory. | |
| dry_run | No | If true, return the planned output and line count; run no ffmpeg. | |
| transcript | Yes | The words to show, in order — each an object with the word text and its timing in seconds. This is exactly the `words` list transcribe returns. |