Overview

Requires Python 3.11+. `to-captions-pipeline.py` needs ffmpeg and faster-whisper (via `uv run`). Run scripts via `uv run`.

Recipes

Copy-paste command sequences agents can run via uv run.

Check compliance rules
uv run scripts/rules.py
Validate an SRT file
uv run scripts/validate.py --input captions.srt
Normalize whitespace and wrap long lines
uv run scripts/format.py --input captions.srt
Export for broadcast (SCC / CEA-608)
uv run scripts/to-scc.py --input captions.srt --output deliverable.scc
Export SMPTE-TT / TTML
uv run scripts/to-smpte-tt.py --input captions.srt --output captions.xml
Flag cues that may hit lower-thirds
uv run scripts/apply-busy-zones.py --input captions.srt
Speech → SRT (full pipeline)
uv run scripts/to-captions-pipeline.py --input clip.mp4 --model tiny

Operations

Each script returns structured JSON — see the script contract.

Op IDScriptCommon flags
caption.apply_busy_zonesapply-busy-zones.py--input
caption.formatformat.py--input
caption.rulesrules.py
caption.to_captions_pipelineto-captions-pipeline.py--input
caption.to_sccto-scc.py--input
caption.to_smpte_ttto-smpte-tt.py--input
caption.validatevalidate.py--input

Do not use for

  • Legal caption certification
  • Burning subtitles (use `subtitles/burn.py`)
  • General video editing (use `video-transformation`)

Related cookbooks