跳到正文
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(原文)

安装前可以查看交给 AI 代理的指令内容。

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

评价

还没有评价。欢迎分享你的使用感受。

评论

无需登录即可发表。欢迎分享使用感受、提问,或说明在哪些环境下无法运行。

还没有评论。来写第一条吧。

提交后会立即公开。请勿填写邮箱、电话等个人信息。URL 最多 2 个。

0 / 1000 字

此表单受 reCAPTCHA 保护,适用 Google 的隐私权政策和服务条款。

同一仓库的技能

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, or full-width/half-width usage. Also triggers for "校对", "检查排版", "中英文空格", "全角半角". Does not rewrite document structure, product claims, or UI messaging.

中文简介正在准备中。当前显示原文说明。

daftAI2026/daftAI-skills172026年10月15日 更新

Writes, rewrites, and reviews Chinese technical documentation, product copy, and UI microcopy using ruanyf/document-style-guide, STE-inspired Chinese methods for procedural passages, and separate product and UI extensions. Use for 中文技术写作, README, API documentation, 操作指南, 安装部署说明, 故障排查文档, 运维 Runbook, 工具描述, Agent 指令文案, 产品介绍, 功能说明, 界面文案, 按钮, 空状态, and 错误提示 when the task concerns meaning, structure, or wording. Delegates requested formatting checks to daftai-chinese-copywriting. Pure punctuation or spacing tasks belong to that skill; personal essays and author-voice articles do not belong here.

中文简介正在准备中。当前显示原文说明。

daftAI2026/daftAI-skills172026年10月15日 更新

Audits a Cloudflare application repository for code paths and configuration that may create usage-based billing exposure. Use when asked to inspect Cloudflare Worker, D1, Durable Objects, storage, queue, or compute usage for unexpected bills, billing risks, or cost drivers. Reports evidence and uncertainty. Runs offline by default; optionally correlates user-authorized, bounded evidence from existing official tools. Does not guarantee a spending cap.

中文简介正在准备中。当前显示原文说明。

daftAI2026/daftAI-skills172026年10月15日 更新

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-skills172026年10月15日 更新

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-skills172026年10月15日 更新

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-skills172026年10月15日 更新

查看 daftAI2026 的全部技能

报告此技能的问题