video_add_texts
Overlay multiple text elements or captions on a video in one FFmpeg pass, with optional position, size, color, timing, and automatic layout for stacked texts.
Instructions
Overlay multiple text elements on a video in a single FFmpeg pass.
Returns JSON {success, output_path}. Use when one video needs several captions at once. Pass input_path as the source video and texts as a list of overlay dicts (text plus optional position/size/color/timing).
Args: input_path: Absolute path to the input video. texts: List of text overlay dicts. Each dict may contain: - text (str, required) - position (str|dict, default "center") - font (str, optional) - size (int, default 48) - color (str, default "white") - shadow (bool, default True) - start_time (float, optional) - duration (float, optional) output_path: Where to save the output. Auto-generated if omitted. crf: Override CRF value (0-51, lower = better quality). Default 23. preset: Override FFmpeg encoding preset (ultrafast, fast, medium, slow, veryslow). auto_layout: Automatically distribute vertically stacked texts at the same named position. Default True.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| crf | No | ||
| texts | Yes | ||
| preset | No | ||
| overwrite | No | Explicitly allow replacing existing media. Existing non-media files are protected. | |
| input_path | Yes | ||
| auto_layout | No | ||
| output_path | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||