From yux-blog
Download subtitles and transcripts from video platforms (YouTube, Bilibili, Twitter/X, etc.) using yt-dlp. Use when the user provides a video URL and wants to extract its subtitles or transcript — e.g., "download subtitles from this video", "extract subtitle", "get the transcript of this YouTube video", "字幕下载", "提取字幕", "视频字幕". Do NOT trigger on generic "transcript" mentions unrelated to video URLs (e.g., meeting transcripts, text files). After downloading, use yux-video-summary to organize the transcript.
npx claudepluginhub wuyuxiangx/yux-claude-hub --plugin yux-blogThis skill is limited to using the following tools:
Extract subtitles/transcripts from video URLs and save them as local text files.
Extracts YouTube video subtitles/transcripts via yt-dlp CLI or Chrome automation, converting to timestamped plain text files.
Downloads videos from YouTube, Bilibili, Twitter, and other sites using yt-dlp. Extracts audio to MP3, downloads subtitles, selects quality, and handles playlists on video URL requests.
Downloads videos, audio, and captions from YouTube/1000+ platforms using yt-dlp CLI. Supports quality selection (1080p/audio) with user confirmation on URL/output.
Share bugs, ideas, or general feedback.
Extract subtitles/transcripts from video URLs and save them as local text files.
Supported platforms: YouTube, Bilibili, Twitter/X, Vimeo, TikTok, and all other platforms supported by yt-dlp.
Input Video URL: $ARGUMENTS
Check yt-dlp installation:
which yt-dlp
yt-dlp is found, proceed to Step 2.yt-dlp is NOT found, notify user:
"yt-dlp is not installed. Please install it first: brew install yt-dlp or pip install yt-dlp"
Then STOP execution.Get video title:
yt-dlp --get-title "[VIDEO_URL]"
If this fails with authentication error, try with cookies:
yt-dlp --cookies-from-browser chrome --get-title "[VIDEO_URL]"
If browser cookie extraction fails, ask user to specify their browser (firefox, safari, edge) and retry.
Store the video title for file naming (sanitize special characters).
Attempt subtitle download with language priority (Chinese first, then English):
yt-dlp --write-auto-sub --write-sub --sub-lang zh-Hans,zh-Hant,zh,en --skip-download --sub-format vtt --output "<Video Title>.%(ext)s" "[VIDEO_URL]"
yt-dlp --cookies-from-browser chrome --write-auto-sub --write-sub --sub-lang zh-Hans,zh-Hant,zh,en --skip-download --sub-format vtt --output "<Video Title>.%(ext)s" "[VIDEO_URL]"
Handle platform-specific cases:
--cookies-from-browser for member-only videos--write-auto-sub for auto-generated subtitlesVerify download:
.vtt or .srt file was createdRead the downloaded subtitle file (.vtt or .srt)
Extract and clean content:
Format output:
[Timestamp] Text contentDetect source language:
.zh-Hans.vtt, .zh-Hant.vtt, .zh.vtt → zh.en.vtt, .en-US.vtt, .en-GB.vtt → en.ja.vtt → ja.ko.vtt → ko\u4e00-\u9fff)zhenStore the detected language code: video_language (e.g., zh, en)
Save the transcript to: <Video Title>.txt
Report completion with language info:
[zh/en/ja/ko]File saved: <Video Title>.txt
Language code: zh
Language: Chinese (auto-generated)
Lines: 245
Size: 12.5 KB
The language code (zh, en, etc.) will be used by the yux-video-summary skill for multi-language output generation.