Packs / accessibility-public
subtitle-srt-check
Check an SRT subtitle file for overlaps, too-fast reading speed, long lines and too-short cues
Install
logicpacks pack use accessibility-public/subtitle-srt-checkget_pack accessibility-public/subtitle-srt-checkThe second line is the MCP tool call for the LogicPacks connector (Claude Code, Codex, Claude.ai and others). The first run of a pack someone else wrote asks for your yes.
Keys it needs (names only)
None.
Playbooks included
- Spec:
spec/SPEC.md(goal, steps, edge cases, don’ts) - Routes:
local-python - Checks: 1 in
outcome/checks.yaml - Code:
srt_check.py - Tools: python3
Usage, last 8 weeks
New: no recorded use yet.
Purpose (from spec/SPEC.md)
Goal
A per-cue list of subtitle problems (overlapping times, duration < 1 s or > 7 s, > 2 lines, line > 42 chars, reading speed > 17 chars/s) with a summary, so captions meet common accessibility guidelines.
Verified by: Fixture with 4 cues: overlap, fast cue and long line are each reported; the clean cue is not.
Steps
- Run
python3 code/srt_check.py captions.srt. - Fix in the subtitle editor (split long cues, extend durations into gaps).
- Re-run until clean; watch once with sound off.
Edge cases
- Speaker labels and tags () are stripped before counting characters.
- Limits are flags (--cps, --line) because platforms differ (e.g. some use 20 cps).
Don'ts
- Don't claim WCAG conformance from automated checks alone; automated tools catch roughly a third of issues, so do a manual keyboard and screen-reader pass too.
- Don't paraphrase dialogue just to hit a number without checking meaning.