vistalyq

在线视频转文字稿

オフィス効率化v1.0.1
作者:vistalyq更新日 2026-05-11全 2 バージョン · 最新版の公開日 2026-03-11video2txt@clawhub_vistalyq/video2txt
文書処理

AlphaMoatによると、2026-09時点で在线视频转文字稿のダウンロード数は1,580、スター数は0で、AIスキル全体5,078件中4,716位、オフィス効率化では435件中383位です。

インストール数
185
ダウンロード数
1580
スター数
-
総合順位
#4,716
全体の上位 93% · オフィス効率化の上位 89%
プラットフォームインストール数ダウンロード数スター数コメント
ClawHub ↗24906--
SkillHub ↗1851580-—

プラットフォームごとに集計方法と集計時点が異なります。

このスキルでできること

まず yt-dlp で利用可能な字幕を取得し、動画の言語に応じて出力します。中国語以外の動画は原文と中国語訳、中国語の動画は 1 つの文書です。字幕がない場合はその制約を伝えます。

資料公開日 2026-10-27

できること

  • 対応する動画 URL から字幕を取得する
  • 中国語以外の動画について原文と中国語の文書を作成する

使う場面

  • ユーザーが動画リンクを提示し、字幕や文字起こしを求めるとき
  • 動画の内容を DOCX ファイルにまとめるとき

プロンプト例

スキルのドキュメントをもとに生成した例であり、実際の実行結果ではありません。

この動画に利用可能な字幕があるか確認して文書にして
この中国語以外の動画の字幕から原文と中国語の DOCX を作って

月次の推移

ダウンロード数1580
24796316792026-03 · ダウンロード数 3462026-05 · ダウンロード数 6182026-06 · ダウンロード数 7542026-07 · ダウンロード数 9932026-08 · ダウンロード数 11772026-09 · ダウンロード数 158026-0326-09
スター数-
0112026-03 · スター数 -2026-05 · スター数 -2026-06 · スター数 -2026-07 · スター数 -2026-08 · スター数 -2026-09 · スター数 -26-0326-09

2026-09 から集計方法を変更し、同名スキルを作者ごとに分けて集計し、全スキルを対象にしました。破線は変更前の月で、変更後のデータとは直接比較せず、変更をまたぐ増減も計算していません。

月ダウンロード数前月比スター数
2026-091580—-
2026-081177+18.5%-
2026-07993+31.7%-
2026-06754+22.0%-
2026-05618—-
2026-03346—-

SKILL.md 原文

作者が公開した元のファイルをテキストのまま表示しています。AlphaMoat による編集や審査はしていません。リンクはクリックできません。コマンドは内容を確認してから実行してください。取得日 2026-10-23。

5.6 KB・ClawHub v1.0.1
---
name: video-transcript
version: 1.0.0
description: Extract transcripts/subtitles from video URLs and deliver as .docx files. Use this skill whenever the user provides a video link (YouTube, Bilibili, or any yt-dlp supported platform) and asks for a transcript, subtitles, lecture notes, or spoken content in text form. Also trigger when user says "帮我把这个视频转成文字", "视频讲稿", "字幕文档", "transcript", "lecture notes from video", or pastes a video URL with any request to get the text content.
compatibility:
  tools:
    - exec
  dependencies:
    - name: yt-dlp
      install: "pip install yt-dlp  # or: winget install yt-dlp"
すべて表示(全 159 行)
      check: "yt-dlp --version"
    - name: node
      install: "https://nodejs.org"
      check: "node --version"
    - name: docx (npm, local)
      install: "cd ~/.agents/skills/video-transcript/scripts && npm install"
      check: "node -e \"require('./node_modules/docx')\""
---

# Video Transcript Skill

Extract subtitles from a video URL and deliver clean .docx transcript files.
For non-Chinese videos, produce two files: original language + Chinese translation.
For Chinese videos, produce one file.

## Workflow

### Step 0 — First-time setup (once only)

Check if `node_modules` exists in the scripts directory. If not, run:

```powershell
$skillScripts = "$env:USERPROFILE\.agents\skills\video-transcript\scripts"
if (-not (Test-Path "$skillScripts\node_modules\docx")) {
    Push-Location $skillScripts
    npm install
    Pop-Location
}
```

### Step 1 — Download subtitles with yt-dlp

Run in a temp directory (use `$env:TEMP\vt_<random>` on Windows):

```powershell
$tmp = "$env:TEMP\vt_$(Get-Random)"
New-Item -ItemType Directory -Force $tmp | Out-Null
```

**YouTube:**
```powershell
# Try manual subs first, fall back to auto-generated
yt-dlp --skip-download --write-subs --write-auto-subs --sub-langs "en,zh-Hans,zh-Hant,zh" --convert-subs srt -o "$tmp\sub" "<URL>"
```

**Bilibili:**
```powershell
yt-dlp --skip-download --write-subs --sub-langs "zh-Hans,zh,ai-zh" --convert-subs srt -o "$tmp\sub" "<URL>"
```

**Other platforms:** Use the same YouTube command — yt-dlp handles most platforms automatically.

After download, list what was fetched:
```powershell
Get-ChildItem $tmp -Filter "*.srt"
```

### Step 2 — Detect available subtitle files

Pick the best available file:
- Prefer manual subs over auto-generated (`.en.srt` over `.en-orig.srt` or `.en-auto.srt`)
- For Bilibili: pick `zh-Hans` or `ai-zh`
- If multiple languages exist, note them all

If NO subtitle file was downloaded:
- Tell the user: "该视频没有可用字幕,yt-dlp 无法提取文字内容。如需转录请使用 Whisper 语音识别(需额外安装)。"
- Stop here.

### Step 3 — Parse SRT to plain text

Read the .srt file and strip all timing/index lines. Keep only the spoken text lines.

SRT format to strip:
```
1
00:00:01,000 --> 00:00:03,500
This is the spoken text.

2
00:00:04,000 --> 00:00:06,000
More text here.
```

Output: plain text, one paragraph per subtitle block, blank lines between blocks removed (merge into flowing paragraphs). Also strip HTML tags like `<i>`, `<b>`, `<font ...>`.

Do this parsing yourself by reading the file content — no external tool needed.

### Step 4 — Translate if needed

Detect the subtitle language:
- If **Chinese** (zh, zh-Hans, zh-Hant): skip translation, one file only
- If **other language**: translate the full plain text to Chinese using your own translation capability

Translation guidelines:
- Produce natural, readable Chinese — not word-for-word
- Preserve paragraph structure
- Keep proper nouns, technical terms transliterated or explained inline if needed
- Do NOT add commentary or summaries — pure translation only

### Step 5 — Generate .docx files

Use the bundled script. The script path is:
`~/.agents/skills/video-transcript/scripts/make_docx.js`

Get the video title from yt-dlp output or use a sanitized version of the URL as fallback.

**For non-Chinese video (two files):**
```powershell
# Original
node "~/.agents/skills/video-transcript/scripts/make_docx.js" "$tmp\transcript_original.docx" "<VideoTitle> - Original" "<plain_text>"

# Chinese translation
node "~/.agents/skills/video-transcript/scripts/make_docx.js" "$tmp\transcript_zh.docx" "<VideoTitle> - 中文译稿" "<chinese_text>"
```

**For Chinese video (one file):**
```powershell
node "~/.agents/skills/video-transcript/scripts/make_docx.js" "$tmp\transcript_zh.docx" "<VideoTitle> - 讲稿" "<plain_text>"
```

For long texts, write content to a temp `.txt` file first and pipe it:
```powershell
$plain | Out-File -Encoding utf8 "$tmp\content.txt"
Get-Content "$tmp\content.txt" -Raw | node "~/.agents/skills/video-transcript/scripts/make_docx.js" "$tmp\transcript_original.docx" "<title>"
```

### Step 6 — Deliver to user

Tell the user the output file paths clearly:
- "原文讲稿:`C:\...\transcript_original.docx`"
- "中文译稿:`C:\...\transcript_zh.docx`"

Optionally show a short preview (first 200 chars) of the extracted text so the user can verify quality.

## Error handling

| Situation | Action |
|---|---|
| No subtitles found | Inform user, suggest Whisper as alternative |
| yt-dlp not found | `yt-dlp --version` to check; tell user to install if missing |
| node/docx error | Show error, check if `docx` npm package is installed globally |
| Private/geo-blocked video | Inform user the video is inaccessible |

## Notes

- Always clean up `$tmp` dir after delivering files, or leave it and tell the user the path
- The `make_docx.js` script resolves `docx` from global npm automatically
- For very long videos, translation may take a moment — let the user know

オフィス効率化の人気スキル

データ月:2026-09 · ダウンロード数、スター数、インストール数は公開スキルレジストリ(ClawHub、SkillHub)から月単位で集計しています。詳しくはデータの方法論をご覧ください。