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.pyValidate an SRT file
uv run scripts/validate.py --input captions.srtNormalize whitespace and wrap long lines
uv run scripts/format.py --input captions.srtExport for broadcast (SCC / CEA-608)
uv run scripts/to-scc.py --input captions.srt --output deliverable.sccExport SMPTE-TT / TTML
uv run scripts/to-smpte-tt.py --input captions.srt --output captions.xmlFlag cues that may hit lower-thirds
uv run scripts/apply-busy-zones.py --input captions.srtSpeech → SRT (full pipeline)
uv run scripts/to-captions-pipeline.py --input clip.mp4 --model tinyOperations
Each script returns structured JSON — see the script contract.
| Op ID | Script | Common flags |
|---|---|---|
caption.apply_busy_zones | apply-busy-zones.py | --input |
caption.format | format.py | --input |
caption.rules | rules.py | — |
caption.to_captions_pipeline | to-captions-pipeline.py | --input |
caption.to_scc | to-scc.py | --input |
caption.to_smpte_tt | to-smpte-tt.py | --input |
caption.validate | validate.py | --input |
Do not use for
- Legal caption certification
- Burning subtitles (use `subtitles/burn.py`)
- General video editing (use `video-transformation`)