本文へ移動
cccskills
無料GitHub で公開

daftai-extracting-video-subtitles

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 "获取字幕".

インストール方法を見る

含まれるファイル(2)

  • SKILL.md3.0 KB
  • scripts/extract_subtitles.ts6.6 KB

SKILL.md(原文)

インストールする前に、エージェントに与えられる指示の中身を確認できます。

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

which whisper
which ffprobe
ResultAction
whisper foundContinue
whisper missingbrew install openai-whisper (macOS) or pip install openai-whisper
ffprobe missingbrew 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

bun scripts/extract_subtitles.ts "<video_path>" [language] [model]

Parameters:

ParameterDefaultDescription
video_path(required)Input video/audio file
languageenLanguage code
modelauto by durationWhisper model

Model auto-selection (by duration):

Video durationModelApprox. speed (CPU)
< 2 minmedium~2-3 min
2-30 minturbo~1x duration
> 30 minbasefastest

The script automatically handles:

  • Complex filenames (copies to temp dir)
  • Audio stream validation
  • Duration detection and model selection
  • Temp file cleanup

Known issues:

IssueSolution
FP16 not supported on CPU warningNormal on Mac CPU, auto falls back to FP32
MPS NaN errorsDo NOT use --device mps, script uses CPU

Step 5: Verify & Report

Script automatically reports:

  • Output SRT file path
  • Number of subtitle entries
  • Processing time

Examples

Basic extraction:

User: 帮我提取这个视频的字幕
→ bun scripts/extract_subtitles.ts "video.mp4" en

With language specified:

User: Extract English subtitles from this video
→ bun scripts/extract_subtitles.ts "video.mp4" en

Chinese video:

User: 提取中文字幕
→ bun scripts/extract_subtitles.ts "video.mp4" zh

Long video with specific model:

User: 提取这个一小时视频的字幕
→ bun scripts/extract_subtitles.ts "video.mp4" en base

レビュー

まだレビューはありません。使ってみた感想をお寄せください。

同じリポジトリのスキル

概要と使いどころ

Checks and fixes Chinese copywriting with autocorrect-backed workflows for text and single-file Markdown/TXT inputs. Use when user asks to normalize Chinese punctuation, spacing, full-width/half-width usage, or copywriting style. Also triggers for "校对", "检查排版", "中英文空格", "全角半角".

日本語の概要は準備中です。原文の説明を表示しています。

daftAI2026/daftAI-skills182026年9月10日 更新

Optimizes natural-language image requests and rough prompts into ready-to-use GPT Image 2.5 prompts using the official prompting guide as a live reference. Use when users ask to improve image prompts, 优化生图提示词, 把想法变成提示词, or write prompts for GPT Image 2.5 Flare or Sunburst. Produces prompt text, not images, unless the user explicitly asks to generate.

日本語の概要は準備中です。原文の説明を表示しています。

daftAI2026/daftAI-skills182026年9月10日 更新

Converts transparent or solid-background single-color PNG files and SVG files containing one embedded or local PNG into verified path-only SVG output. Removes pure-color backgrounds automatically. Uses Potrace threshold and parameter scans with alpha error metrics to preserve detailed logos, stamps, engravings, and line art. Use when the user asks to convert images to SVG, vectorize PNG, convert bitmap to true SVG, remove embedded raster data from SVG, 图片转矢量, PNG 转 SVG, 真矢量, or 位图描摹.

日本語の概要は準備中です。原文の説明を表示しています。

daftAI2026/daftAI-skills182026年9月10日 更新

Translate subtitle files (SRT/VTT) between languages. Auto-detect source language, batch translate with count validation, optional bilingual merge output. Use when user asks to "translate subtitles", "翻译字幕", "subtitle translation", or needs subtitles converted to another language.

日本語の概要は準備中です。原文の説明を表示しています。

daftAI2026/daftAI-skills182026年9月10日 更新

Fetch any URL and convert to markdown using Chrome CDP, with automatic image downloading. Supports auto-capture and wait-for-user modes. Downloads article images to local directory and rewrites image references to relative paths. Use when user wants to save a webpage as markdown with images. Keywords: url to markdown, save webpage, download article, 网页转markdown

日本語の概要は準備中です。原文の説明を表示しています。

daftAI2026/daftAI-skills182026年9月10日 更新

Burn subtitles into local video files. Supports SRT/VTT/ASS formats, auto-detect subtitles and language, bilingual subtitle merging and translation. Use when user needs to hardcode subtitles into video. Keywords: 字幕烧录、burn subtitles、本地视频、hardcode subtitles

日本語の概要は準備中です。原文の説明を表示しています。

daftAI2026/daftAI-skills182026年9月10日 更新

daftAI2026 のスキルをすべて見る

このスキルの問題を報告する