← ClaudeAtlas

daftai-extracting-video-subtitleslisted

Extracts timed subtitles from local video/audio files using Whisper. Outputs SRT format with accurate timestamps. Handles complex filenames automatically. Use when user asks to "extract subtitles", "get subtitles", "transcribe video", "识别字幕", "提取字幕", or "获取字幕".
daftAI2026/daftAI-skills · ★ 2 · Data & Documents · score 56
Install: claude install-skill daftAI2026/daftAI-skills
# Video Subtitle Extractor Extract timed subtitles (SRT) from local video/audio files using OpenAI Whisper. > **Scripts**: All scripts are in `scripts/` relative to this SKILL.md. ## Workflow ``` - [ ] Step 1: Environment check (Whisper + FFmpeg) - [ ] Step 2: Input validation (file exists, has audio stream) - [ ] Step 3: Detect language (auto or user-specified) - [ ] Step 4: Run extraction script - [ ] Step 5: Verify output and report ``` --- ### Step 1: Environment Check ```bash which whisper which ffprobe ``` | Result | Action | |--------|--------| | whisper found | Continue | | whisper missing | `brew install openai-whisper` (macOS) or `pip install openai-whisper` | | ffprobe missing | `brew install ffmpeg` | --- ### Step 2: Input Validation 1. Confirm video/audio file exists 2. Get duration and confirm audio stream present — handled by script automatically --- ### Step 3: Language Detection - If user specifies language → use it - If unclear → ask user, suggest `en` or `zh` as common options - Whisper `--language` flag values: `en`, `zh`, `ja`, `ko`, `fr`, `de`, `es`, etc. --- ### Step 4: Run Extraction ```bash bun scripts/extract_subtitles.ts "<video_path>" [language] [model] ``` **Parameters:** | Parameter | Default | Description | |-----------|---------|-------------| | video_path | (required) | Input video/audio file | | language | `en` | Language code | | model | auto by duration | Whisper model | **Model auto-selection (by duration):** | Video d