视频批量转录

v1.0.0

通用视频批量转录工具 - 支持 1000+ 网站(B 站、YouTube、抖音、Twitch 等),使用 yt-dlp 批量下载视频音频,GPU 加速语音转文字(faster-whisper + CUDA),自动校正专业术语,生成结构化学习笔记。支持断点续传、批量导出、多格式输出、需要登录的网站配置。

1· 90·1 current·1 all-time

Install

OpenClaw Prompt Flow

Install with OpenClaw

Best for remote or guided setup. Copy the exact prompt, then paste it into OpenClaw for shenghoo123-png/video-batch-transcript.

Previewing Install & Setup.
Prompt PreviewInstall & Setup
Install the skill "视频批量转录" (shenghoo123-png/video-batch-transcript) from ClawHub.
Skill page: https://clawhub.ai/shenghoo123-png/video-batch-transcript
Keep the work scoped to this skill only.
After install, inspect the skill metadata and help me finish setup.
Use only the metadata you can verify from ClawHub; do not invent missing requirements.
Ask before making any broader environment changes.

Command Line

CLI Commands

Use the direct CLI path if you want to install manually and keep every step visible.

OpenClaw CLI

Bare skill slug

openclaw skills install video-batch-transcript

ClawHub CLI

Package manager switcher

npx clawhub@latest install video-batch-transcript
Security Scan
VirusTotalVirusTotal
Benign
View report →
OpenClawOpenClaw
Benign
medium confidence
Purpose & Capability
Name/description (batch video download + transcription) aligns with included files and runtime instructions: SKILL.md, README, scripts use yt-dlp for downloads and faster-whisper for transcription. Requested artifacts (cookies support, GPU/torch instructions, ffmpeg dependency in docs) are appropriate for the stated functionality.
Instruction Scope
Runtime instructions and scripts perform exactly the expected actions: install dependencies (pip), run an environment check, call yt-dlp to fetch media, and run faster-whisper to transcribe. They also support 'cookies-from-browser' and loading cookies files, which cause the tool to access browser cookies or cookie files — a necessary but sensitive capability for accessing login-protected content. The SKILL.md is explicit about these steps and where outputs are written.
Install Mechanism
There is no formal install spec in the registry; the SKILL.md directs users to run 'pip install -r requirements.txt' and optionally install CUDA/PyTorch from the PyTorch index URL. This is a common but higher-risk pattern than an install-free skill because it causes third-party packages to be installed into the environment; however, packages referenced are standard (yt-dlp, faster-whisper, pandas, python-docx) and no arbitrary download+extract URLs are used.
Credentials
The skill does not request environment variables or external credentials in metadata, which is good. However, its documented use of 'cookies-from-browser' and accepting cookie files means it will read sensitive authentication cookies from the local browser profile or files when needed — this is proportional for scraping/login-required downloads but materially increases privacy/credential risk and should be explicitly considered before use.
Persistence & Privilege
The skill is not always-enabled, does not request elevated or persistent platform privileges, and does not modify other skills or system-wide agent configuration in the packaged files. It writes output files to the user-specified output directory, which is expected behavior.
Assessment
This package is internally consistent with its stated purpose, but be careful before running it: 1) It asks you to install Python packages (yt-dlp, faster-whisper, optional torch) — consider doing this in a virtualenv or container to avoid contaminating your system Python. 2) To access paywalled or login-only content it supports reading browser cookies or cookie files — providing these gives the tool access to your accounts, so only use cookies from accounts you control and understand the privacy/ToS implications. 3) The tool will download media to disk; ensure you have permission or that downloads don't violate site terms. 4) If you want higher assurance, review the complete scripts (they are included) or run them in an isolated VM/container. If you need more confidence that nothing unexpected is happening, provide the truncated/omitted portions of batch_transcript.py for a full line-by-line review.

Like a lobster shell, security has layers — review code before you run it.

latestvk97ettx35pzaeexazfte3jbw3h84e8m9
90downloads
1stars
1versions
Updated 2w ago
v1.0.0
MIT-0

Video Batch Transcript

通用视频批量转录工具 - 支持 1000+ 网站

核心功能

  • 🌐 全网支持 - 基于 yt-dlp,支持 1000+ 网站(B 站、YouTube、抖音、Twitch 等)
  • 📥 批量下载 - 支持单视频、合集、播放列表、频道
  • 🚀 GPU 加速转录 - faster-whisper + CUDA,比 OpenAI Whisper 快 4-6 倍
  • 📝 结构化笔记 - 自动生成单集笔记 + 完整汇总
  • 🔧 术语校正 - 自动识别和校正专业术语
  • 💾 断点续传 - 支持中断后继续处理
  • 📤 多格式导出 - txt/md/docx,可选写入飞书文档
  • 🔐 登录支持 - 支持需要登录的网站(cookies 配置)

支持的网站

🇨🇳 国内平台

平台支持类型需要登录
哔哩哔哩 (Bilibili)视频、合集、频道部分
抖音 (Douyin)视频、合集部分
快手 (Kuaishou)视频部分
西瓜视频视频、合集部分
腾讯视频视频、剧集部分
爱奇艺视频、剧集部分
优酷视频、剧集部分
微博视频视频
小红书视频部分

🌍 国际平台

平台支持类型需要登录
YouTube视频、播放列表、频道部分
Vimeo视频、合集部分
Dailymotion视频、播放列表部分
Twitch视频、频道部分
Twitter/X视频
Instagram视频、Reels部分
TikTok视频部分
Facebook视频部分

📺 流媒体 (需登录)

  • Netflix、Hulu、HBO、Disney+、Amazon Prime

🎵 音频平台

  • SoundCloud、Bandcamp、Spotify、Apple Music

📚 教育平台

  • Coursera、edX、Udemy、Khan Academy、TED

完整支持列表: https://github.com/yt-dlp/yt-dlp/blob/master/supportedsites.md

快速开始

1. 安装依赖

cd /root/.openclaw/workspace/skills/video-batch-transcript
pip install -r requirements.txt

2. 检查环境

python scripts/check_env.py

3. 基本使用

# YouTube 视频
python scripts/batch_transcript.py \
  --url "https://www.youtube.com/watch?v=xxx" \
  --output-dir "~/video-notes"

# B 站合集
python scripts/batch_transcript.py \
  --url "https://space.bilibili.com/xxx/channel/collectiondetail?sid=xxx" \
  --output-dir "~/video-notes"

# YouTube 播放列表
python scripts/batch_transcript.py \
  --url "https://www.youtube.com/playlist?list=xxx" \
  --output-dir "~/video-notes"

高级功能

1. 使用 Cookies(需要登录的网站)

# 从浏览器获取 cookies(推荐)
python scripts/batch_transcript.py \
  --url "https://www.youtube.com/watch?v=xxx" \
  --cookies-from-browser chrome

# 支持浏览器:chrome, firefox, safari, edge, brave, opera

# 或使用 cookies 文件
python scripts/batch_transcript.py \
  --url "https://www.netflix.com/title/xxx" \
  --cookies "cookies/netflix.txt"

2. 指定视频质量

# 下载最佳质量
python scripts/batch_transcript.py \
  --url "xxx" \
  --format "best"

# 下载 1080p
python scripts/batch_transcript.py \
  --url "xxx" \
  --format "bestvideo[height<=1080]+bestaudio/best[height<=1080]"

# 仅音频
python scripts/batch_transcript.py \
  --url "xxx" \
  --format "bestaudio"

3. 并行处理

# 使用 4 个进程并行处理
python scripts/batch_transcript.py \
  --url "xxx" \
  --workers 4

4. 断点续传

# 自动续传(默认)
python scripts/batch_transcript.py --url "xxx"

# 强制重新处理
python scripts/batch_transcript.py --url "xxx" --no-resume

配置选项

命令行参数

参数说明默认值
--url视频/合集 URL必填
--output-dir输出目录~/video-notes
--episodes指定集数 (e.g., "1-5,8,10")全部
--modelWhisper 模型 (tiny/base/small/medium/large)small
--device设备 (auto/cuda/cpu)auto
--language语言代码 (zh/en/ja 等)auto
--format视频格式选择bestaudio
--cookies-from-browser浏览器 cookies
--cookiescookies 文件路径
--terminology术语表 JSON 文件路径内置
--workers并行处理数1
--no-resume禁用断点续传
--check-env仅检查环境

配置文件

创建 config/config.yaml

# 默认输出目录
output_dir: ~/video-notes

# Whisper 模型设置
whisper:
  model: small
  device: auto  # auto/cuda/cpu
  language: auto  # auto/zh/en/ja 等
  compute_type: float16

# 下载设置
download:
  format: bestaudio  # 默认下载格式
  audio_format: mp3  # 音频输出格式
  audio_quality: 192  # 音频质量 (kbps)
  
  # Cookies 配置(可选)
  cookies:
    enabled: false
    browser: chrome  # chrome/firefox/safari/edge
    file: ""  # 或使用 cookies 文件路径

# 输出格式
export:
  formats: [md, txt]  # md/txt/docx
  include_timestamps: false
  include_summary: true

# 术语校正
terminology:
  enabled: true
  custom_file: ""

# 并行处理
parallel:
  workers: 1
  max_memory_gb: 8

使用示例

示例 1: YouTube 教程系列

# 下载整个播放列表并转录
python scripts/batch_transcript.py \
  --url "https://www.youtube.com/playlist?list=PLxxx" \
  --output-dir "~/youtube-ml-course" \
  --device cuda \
  --model medium

示例 2: B 站 UP 主频道

# 下载 UP 主所有视频
python scripts/batch_transcript.py \
  --url "https://space.bilibili.com/123/channel/collectiondetail?sid=456" \
  --output-dir "~/bilibili-ai-series" \
  --episodes "1-20"

示例 3: 抖音合集

# 下载抖音合集(可能需要 cookies)
python scripts/batch_transcript.py \
  --url "https://www.douyin.com/collection/xxx" \
  --output-dir "~/douyin-notes" \
  --cookies-from-browser chrome

示例 4: Twitch 频道视频

# 下载 Twitch 频道视频
python scripts/batch_transcript.py \
  --url "https://www.twitch.tv/xxx/videos" \
  --output-dir "~/twitch-vods" \
  --language en

示例 5: 多平台混合处理

# 创建脚本处理多个平台的视频
cat > process_all.sh << 'EOF'
#!/bin/bash

# YouTube
python scripts/batch_transcript.py \
  --url "https://youtube.com/playlist?list=xxx" \
  --output-dir "~/notes/youtube"

# B 站
python scripts/batch_transcript.py \
  --url "https://space.bilibili.com/xxx/collectiondetail?sid=xxx" \
  --output-dir "~/notes/bilibili"

# Vimeo
python scripts/batch_transcript.py \
  --url "https://vimeo.com/album/xxx" \
  --output-dir "~/notes/vimeo"
EOF

chmod +x process_all.sh
./process_all.sh

输出结构

~/video-notes/
├── 合集或频道名称/
│   ├── 001_视频标题/
│   │   ├── audio.mp3          # 音频文件
│   │   ├── transcript.txt     # 原始转录
│   │   ├── notes.md          # 结构化笔记
│   │   └── metadata.json      # 元数据(含来源网站)
│   ├── 002_视频标题/
│   │   └── ...
│   ├── 合集汇总.md            # 完整汇总笔记
│   └── metadata.json          # 合集元数据

网站特定配置

YouTube

# 推荐:使用 cookies 避免 403 错误
python scripts/batch_transcript.py \
  --url "https://youtube.com/watch?v=xxx" \
  --cookies-from-browser chrome

# 下载字幕(如果有)
python scripts/batch_transcript.py \
  --url "https://youtube.com/watch?v=xxx" \
  --write-subs \
  --sub-langs zh-Hans,en

B 站 (Bilibili)

# 普通视频(无需登录)
python scripts/batch_transcript.py \
  --url "https://www.bilibili.com/video/BVxxx"

# 需要登录的合集
python scripts/batch_transcript.py \
  --url "https://space.bilibili.com/xxx/collectiondetail?sid=xxx" \
  --cookies-from-browser chrome

抖音/TikTok

# 可能需要 cookies
python scripts/batch_transcript.py \
  --url "https://www.douyin.com/video/xxx" \
  --cookies-from-browser chrome

Netflix/流媒体

# 需要 cookies 文件
# 1. 使用浏览器扩展导出 cookies
# 2. 保存为 netscape 格式
python scripts/batch_transcript.py \
  --url "https://www.netflix.com/title/xxx" \
  --cookies "cookies/netflix.txt"

模型选择建议

模型显存需求转录速度准确率适用场景
tiny~1 GB最快一般快速测试、低配设备
base~1 GB较好日常使用
small~2 GB中等推荐默认
medium~5 GB较慢很好高质量需求
large~10 GB最慢最佳专业场景

故障排除

常见问题

问题原因解决方案
HTTP 403网站阻止请求使用 --cookies-from-browser
需要登录内容需认证配置 cookies
下载慢网络问题使用代理或 CDN
转录错误音频损坏重新下载音频
内存不足模型太大使用更小模型或减少 workers

获取 Cookies

方法 1: 从浏览器自动获取(推荐)

python scripts/batch_transcript.py \
  --url "xxx" \
  --cookies-from-browser chrome

方法 2: 导出 cookies 文件

  1. 安装浏览器扩展(如 "Get cookies.txt")
  2. 登录目标网站
  3. 导出 cookies 为 Netscape 格式
  4. 使用 --cookies "path/to/cookies.txt"

GPU 加速检查

# 检查 CUDA
python -c "import torch; print(f'CUDA: {torch.cuda.is_available()}')"

# 查看 GPU
nvidia-smi

更新日志

v1.0.0 (2026-03-05)

  • 初始版本
  • 支持 1000+ yt-dlp 兼容网站
  • GPU 加速转录 (faster-whisper)
  • 结构化笔记生成
  • 断点续传
  • 多格式导出
  • Cookies 登录支持

许可证

MIT License

Comments

Loading comments...