Token导航 LogoToken导航

Agent Skill · 研究检索

subtitle-extractor(字幕提取器)

subtitle-extractor 用于查找、检索和筛选相关信息,适合在 OpenClaw 中需要根据关键词、任务场景或来源线索快速定位候选结果时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

subtitle-extractor 是研究检索类 Agent Skill,可用宿主为 OpenClaw,通过ClawHub获取,权限为操作浏览器;许可证为 MIT-0,第三方扫描有提醒项,按安装量在研究检索类的 73,675 个 Skill 里排第 30,927。

总安装 2,794周安装 120GitHub Stars 1下载 979核验 2026-05-01

安装说明

本站只整理中文说明,不托管安装包,也不代用户安装。
GitHub
许可证
MIT-0
版本
1.0.0

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:subtitle-extractor(字幕提取器)
来源仓库:https://github.com/poltawa/subtitle-extractor
安装命令:
openclaw skills install subtitle-extractor
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 OpenClaw 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

ClawHubOpenClaw
openclaw skills install subtitle-extractor

这个 Skill 是做什么的

研究检索类 Skill 主要解决「找资料、核对事实、把来源整理清楚」的问题,通常会让助手先检索再总结。

subtitle-extractor 用于从 Bilibili、YouTube、小红书、抖音及本地文件中提取原始字幕或 Whisper 转录文本。适用于需要快速获取多平台视频字幕内容的研究与检索场景。通过关键词或文件路径触发,支持多种格式输出,具体用法请参考仓库文档。

安装命令为 openclaw skills install subtitle-extractor,需确认网络访问与文件读写权限。建议在使用前核实目标平台的访问权限及数据合规要求。

上手步骤

4 步
  1. 1

    确认自己的宿主工具

    公开资料标注支持 OpenClaw;先确认自己用的是其中之一,再按对应工具的 Skills 目录放置。

  2. 2

    拿到安装命令

    可以直接复制的命令是 openclaw skills install subtitle-extractor;命令里的占位符换成自己的路径或密钥再执行。

  3. 3

    安装后重启宿主

    命令执行完要完全退出宿主工具再打开,让新装的 Skill 被重新扫描到,否则列表里可能看不到。

  4. 4

    按最小权限试用

    它需要操作浏览器,先在测试目录或测试账号里跑,确认没问题再放到正式项目。

常见问题

6 条

subtitle-extractor 怎么安装?

在终端执行 openclaw skills install subtitle-extractor。装完完全退出宿主工具再打开,让它重新扫描本地 Skill。

subtitle-extractor 支持哪些 AI 工具?

公开资料标注支持 OpenClaw。其他工具只要能读取本地 Skill 目录,一般也能手动放进去,但要自己确认触发方式是否一致。

subtitle-extractor 需要什么权限?

权限级别是操作浏览器。该 Skill 可能涉及浏览器控制能力,使用时可能读取或操作网页内容,需要在受控环境中确认权限边界。

subtitle-extractor 是免费的吗?

来源标注的许可证是 MIT-0。本站不代收任何费用,也不托管安装包;能否商用、要不要署名,以许可证原文为准。

subtitle-extractor 用的人多吗?

公开数据是累计安装 2,794 次,近一周安装 120 次,下载 979 次,GitHub 1 星。这些数字来自第三方目录统计,只能当作热度参考,不代表质量或安全性。

subtitle-extractor 安全吗?

第三方扫描有提醒项,说明存在需要人工确认的行为。安装前请打开源码看清它读了什么、联网到哪里。

值得选的地方和要先想清楚的地方

值得选的地方

  • 专注 OpenClaw 一种宿主,触发方式和使用习惯不用来回切换。
  • 许可证明确为 MIT-0,商用和分发边界好判断。

先想清楚的地方

  • 第三方扫描存在提醒项或未通过项,需要人工逐条确认。
  • 第三方目录整理,版本更新和行为细节以来源仓库为准。

适不适合你

更适合

  • 已经在用 OpenClaw,想直接扩展它能力的人。
  • 需要处理研究检索类任务、又不想每次都手写提示词的人。

不太适合

  • 需要厂商级技术支持和 SLA 的生产系统。

研究检索类 Skill 对比

6 个同类
Skill总安装GitHub 星权限许可证扫描
find-skills

寻找技能 · Codex、Claude

31,199,81316,486操作浏览器MIT有提醒
self-improving-agent

自我改进 Agent · OpenClaw

16,464,0023,396接触敏感数据MIT-0通过
soultrace

灵魂追踪 · Codex、Claude

7,588,94412需要联网未明确有提醒
self-improving

自我完善 · OpenClaw

6,829,2841,046需要联网MIT-0通过
microsoft-foundry

微软代工厂 · Codex、Claude

6,614,144764调用外部服务未明确有提醒
subtitle-extractor

字幕提取器 · 本页

2,7941操作浏览器MIT-0有提醒

按安装量取同分类前几名;数字来自第三方目录统计,只作热度参考,不代表质量结论。

SKILL.md 原文

name
Subtitle-Extractor
author
poltawa
version
1.0.0
description
Subtitle extractor for Bilibili, YouTube, Xiaohongshu, Douyin, and local files. Extracts native subtitles or Whisper transcription in original format. Agent handles dependency checking, file naming, and content analysis.
metadata
openclaw
requires
bins
["yt-dlp"]
behavior
networkAccess
indirect
description
Subtitle extractor for Bilibili, YouTube, Xiaohongshu, Douyin, and local files. Extracts native subtitles or Whisper transcription in original format. Agent handles dependency checking, file naming, and content analysis.

Subtitle Extractor Skill

Extracts subtitles from video platforms in their native format. Supports Bilibili, YouTube, Xiaohongshu, Douyin, and local video files.

Scope of this skill: subtitle extraction only. Summarization, analysis, Q&A — all handled by the agent based on the user's actual request.


What It Does

  1. Detect platform from URL
  2. Extract native subtitles via yt-dlp (or Whisper transcription when no native subtitles exist)
  3. Output: raw subtitle file path + video title/author
  4. Agent saves subtitle to outputs/ and processes per user request

Dependencies

Agent must verify dependencies before calling the script. If any are missing, inform the user with the relevant install command.

yt-dlp — Required (always)

# Check
yt-dlp --version

# Install
pip install yt-dlp                    # all platforms (recommended)
brew install yt-dlp                   # macOS Homebrew
winget install yt-dlp.yt-dlp         # Windows WinGet
scoop install yt-dlp                  # Windows Scoop
conda install -c conda-forge yt-dlp  # Conda environments

# Upgrade existing install
pip install -U yt-dlp

ffmpeg — Required only for Whisper transcription

Only needed for Xiaohongshu, Douyin, local files, or Path B (Whisper transcription).
# Check
ffmpeg -version

# Install
brew install ffmpeg                   # macOS Homebrew
winget install Gyan.FFmpeg           # Windows WinGet
choco install ffmpeg                  # Windows Chocolatey
scoop install ffmpeg                  # Windows Scoop
apt install ffmpeg                    # Ubuntu / Debian
dnf install ffmpeg                    # Fedora / RHEL (may need RPM Fusion)
pacman -S ffmpeg                      # Arch Linux
snap install ffmpeg                   # Ubuntu Snap
Windows users: restart the terminal after installation for PATH to take effect. If winget is unavailable, download from ffmpeg.org and add the bin/ directory to system PATH.

faster-whisper — Required only for transcription platforms

Only needed for Xiaohongshu, Douyin, local files, or Path B (Whisper transcription).
# Check
python3 -c "from faster_whisper import WhisperModel; print('ok')"

# Install
pip install faster-whisper

# Configure model size (default: base)
export VIDEO_SUMMARY_WHISPER_MODEL=base   # tiny | base | small | medium | large

Note: Model files are downloaded automatically on first transcription run (~150MB for base). This may take a minute depending on network speed.

China network note: If auto-download fails (HuggingFace blocked), see Whisper model download failed in Troubleshooting.

Transcription time estimate (CPU, faster-whisper):

Video Durationtinybasesmallmedium
5 min~10s~20s~40s~80s
15 min~30s~60s~2m~4m
30 min~60s~2m~5m~10m

GPU accelerates transcription 5–15×. First run downloads the model (~150MB for base).


Cookie Configuration

Bilibili — Cookie Required

Bilibili requires a cookie file for all requests. The script auto-discovers cookie files in the skill directory only (same folder as subtitle-extractor.py and SKILL.md):

Any .txt file whose name contains bilibili will be picked up automatically — including the browser extension's default export format www.bilibili.com_netscape_<timestamp>.txt.

Place your cookie file in the skill directory. The agent does not need to locate or pass it manually (see Step 1b).

Xiaohongshu / Douyin — Manual

video-summary "https://www.xiaohongshu.com/explore/xxxxx" --cookies cookies.txt
# or
export VIDEO_SUMMARY_COOKIES=/path/to/cookies.txt

How to export cookies:

  1. Install browser extension: "Cookie Editor(https://cookieeditor.org/)"
  2. Log in to the platform
  3. Export cookies to a .txt file(Netscape format)

Agent Workflow

EXECUTION ORDER — NON-NEGOTIABLE

Steps 1–4 in this skill MUST be completed in full before addressing any user request. The subtitle file MUST be saved to disk (Step 4) before the agent proceeds to summarization, translation, analysis, or any other task the user has asked for.

Treat Steps 1–4 as mandatory prerequisites, not optional helpers. Do not skip any step even if the user's final output format (e.g. a markdown file) appears to make it unnecessary.

Step 1 — Check Dependencies

yt-dlp --version

If the user requests Whisper transcription (keywords: "whisper转录" / "用whisper" / "transcribe" / "转录" / "语音转文字"), or the platform is Xiaohongshu, Douyin, or a local file, also check:

ffmpeg -version
python3 -c "from faster_whisper import WhisperModel; print('ok')"

If anything is missing, stop and tell the user which dependency to install (see Dependencies section).

Step 1b — Bilibili Cookie

The script auto-discovers any .txt file containing "bilibili" in the skill directory. Do not search for or pass the cookie file yourself.

Only act if the script exits with:

  • 未找到 Bilibili Cookie 文件 → tell the user to place a cookie file in the skill directory
  • Bilibili 412 错误:Cookie 已过期 → tell the user to re-export

To export: install "Cookie Editor (https://cookieeditor.org/)", log in to Bilibili, export Netscape format → place in skill directory → retry.

Step 2 — Extract Subtitles

Determine which path applies, then execute it completely before moving to Step 3.


Path A — Native subtitles

Use when: Bilibili or YouTube URL, and the user has not mentioned any transcription keyword.

Tell the user: "正在提取字幕..."

python subtitle-extractor.py "<url>"              # auto-detect language
python subtitle-extractor.py "<url>" --lang zh-CN  # force language

Parse the JSON from stdout. You now have all four fields needed for Step 3:

FieldValue
titlefrom this JSON
authorfrom this JSON
platformfrom this JSON
subtitle_filefrom this JSON

If the script exits non-zero: read stderr, report the error to the user, stop.


Path B — Whisper transcription

Use when: user mentions any transcription keyword, OR platform is Xiaohongshu or Douyin.

Transcription keyword takes priority over phrasing like "提取字幕" or "字幕原文" — those describe the desired output, not the method.

Call 1 — Download audio (skip for local files, go to Call 2 directly)

Tell the user: "正在下载音频,请稍候..."

python subtitle-extractor.py "<url>" --step download-audio

Parse the JSON from stdout and record these values:

FieldValue
titlefrom this JSON
authorfrom this JSON
platformfrom this JSON
audio_filefrom this JSON — input for Call 2

If the script exits non-zero: read stderr, report the error to the user, stop.

Tell the user: "音频下载完成,开始 Whisper 转录(模型: base),请稍候..."

Call 2 — Transcribe

For URL input, use the audio_file recorded from Call 1:

python subtitle-extractor.py "<audio_file>" --step transcribe

For local file input (set title = filename, author = "local"):

python subtitle-extractor.py "<local_file_path>" --step transcribe

Parse the JSON from stdout and record:

FieldValue
subtitle_filefrom this JSON

Tell the user: "转录完成!"

If the script exits non-zero:

  • Read stderr, report the error to the user, stop
  • If stderr contains Whisper 模型下载失败: show the full error message verbatim — it contains the exact download directory and manual steps

Failure rule: Do not run yt-dlp, ffmpeg, or Whisper commands manually. Do not retry with different flags unless the error message explicitly says to.

Step 3 — Confirm Data

Verify you have collected all four values from the script outputs in Step 2:

FieldPath A sourcePath B source
titlescript JSONCall 1 JSON (or filename for local)
authorscript JSONCall 1 JSON (or "local")
subtitle_filescript JSONCall 2 JSON

Note: non-ASCII characters in JSON output appear as \uXXXX escapes — standard JSON parsing produces the correct decoded strings.

Step 4 — Save Subtitle to Outputs (REQUIRED — DO NOT SKIP)

Before answering the user, save the subtitle file to the session outputs directory.

Naming rule: {title前8字}_{author}.{原格式扩展名}

Steps:

  1. Take title, keep the first 8 characters (Chinese and English each count as 1)
  2. Replace unsafe filesystem characters / \ : * ? " < > | and spaces with _
  3. Apply the same sanitization to author
  4. Use the extension from subtitle_file path (.srt or .vtt)
  5. Save to {outputs_dir}/{safe_title8}_{safe_author}.{ext}

Step 5 — Process and Respond

Read the subtitle file content and respond to the user's original request — summarize, analyze, translate, answer questions, etc. The subtitle content is in SRT or VTT format with timestamps; LLMs handle both directly.

Platform Notes

PlatformMethodNotes
YouTubeyt-dlp native CC + auto-generatedBest support, usually no cookies needed
Bilibiliyt-dlp native CCAuto-discovers cookies; zh-CN → ai-zh fallback; 412 error handling
XiaohongshuWhisper transcriptionNo native subtitles; requires ffmpeg + whisper
DouyinWhisper transcriptionNo native subtitles; requires ffmpeg + whisper
Local filesWhisper transcriptionmp4, mkv, webm, mp3, etc.

Supported URL Formats

YouTube: youtube.com/watch?v=... · youtu.be/...

Bilibili: bilibili.com/video/BV... · bilibili.com/video/av... · b23.tv/... (short link)

Xiaohongshu: xiaohongshu.com/explore/... · xhslink.com/... (short link)

Douyin: douyin.com/video/... · v.douyin.com/... (short link)


Script Reference

Usage:
    python subtitle-extractor.py <url|file> [options]

Steps (--step):
    download-audio    Download audio from URL → {"audio_file", "title", "author", "platform"}
    transcribe        Transcribe local audio/video file → {"subtitle_file"}
    (none)            Extract native subtitles (default path) → {"title", "author", "platform", "subtitle_file"}

Options:
    --step <name>     Pipeline step to run: download-audio | transcribe
    --lang <code>     Subtitle language code, default path only (default: auto)
    --cookies <file>  Cookie file for restricted content
    --help            Show help

Environment Variables:
    VIDEO_SUMMARY_COOKIES        Path to cookies file
    VIDEO_SUMMARY_WHISPER_MODEL  Whisper model size (default: base)

Troubleshooting

"yt-dlp: command not found"

pip install yt-dlp

"No subtitles found"

  • The video may not have CC subtitles — use Path B (--step download-audio then --step transcribe) to force Whisper
  • For Xiaohongshu/Douyin, transcription is always required (no native subtitles)
  • Try --lang to specify a different language code

Bilibili 412 Precondition Failed

Cookie expired. Re-export:

  1. Log in to Bilibili in browser
  2. Use "Cookie Editor(https://cookieeditor.org/)" extension
  3. Export(Netscape format)→ place in skill directory → retry

Bilibili: no zh-CN subtitle found

The script automatically falls back to ai-zh. If both fail, it lists all available subtitle codes. Use --lang <code> to specify one.

"Whisper not installed"

pip install faster-whisper

Whisper model download failed

The script tries hf-mirror.com then huggingface.co. If both fail (common in China), the script will print exact steps. Show the error message to the user verbatim — it contains the exact directory path and download URL.

Manual download (browser accessible in China):

  1. Open: https://modelscope.cn/models/pkufool/faster-whisper-base/files
  2. Download these 5 files: config.json model.bin tokenizer.json vocabulary.json preprocessor_config.json
  3. Create the directory shown in the error message and place all 5 files there
  4. Re-run the script — it auto-detects the local model, no download needed

For other model sizes (tiny/small/medium/large), change faster-whisper-base to faster-whisper-{size} in the ModelScope URL.

"ffmpeg not found" (during transcription)

See ffmpeg install commands in the Dependencies section above.

Video too long for Whisper

Use a smaller model:

export VIDEO_SUMMARY_WHISPER_MODEL=tiny

*Extract subtitles. Let the agent think.*

平台分布

OpenClaw

88.5%
按下载量换算866

安全审计

VirusTotal

通过

ClawScan

可疑

Static analysis

通过

权限和风险

操作浏览器

该 Skill 可能涉及浏览器控制能力,使用时可能读取或操作网页内容,需要在受控环境中确认权限边界。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。来源安全扫描存在提醒或未通过项,安装前请自行复核。目前只有一个公开来源,建议同时核对源仓库。

继续浏览同类 Skills