Loading...
Loading...
Extract subtitles/transcripts from YouTube videos. Triggers: "youtube transcript", "extract subtitles", "video captions", "视频字幕", "字幕提取", "YouTube转文字", "提取字幕".
npx skill4agent add feiskyer/claude-code-settings youtube-transcribe-skillyoutube.com/watch?v=youtu.be/which yt-dlpyt-dlpyt-dlpyt-dlp--cookies-from-browserchromeyt-dlpfirefoxsafariedge# Get the title first (try chrome first)
yt-dlp --cookies-from-browser=chrome --get-title "[VIDEO_URL]"
# Download subtitles
yt-dlp --cookies-from-browser=chrome --write-auto-sub --write-sub --sub-lang zh-Hans,zh-Hant,en --skip-download --output "<Video Title>.%(ext)s" "[VIDEO_URL]"yt-dlpchrome-devtools-mcpmcp__plugin_claude-code-settings_chrome__new_pagechrome-devtools-mcpyt-dlpyt-dlpchrome-devtools-mcpmcp__plugin_claude-code-settings_chrome__new_pagemcp__plugin_claude-code-settings_chrome__take_snapshotmcp__plugin_claude-code-settings_chrome__clickmcp__plugin_claude-code-settings_chrome__take_snapshotmcp__plugin_claude-code-settings_chrome__clickmcp__plugin_claude-code-settings_chrome__evaluate_script() => {
// Select all transcript segment containers
const segments = document.querySelectorAll("ytd-transcript-segment-renderer");
if (!segments.length) return "BUFFERING"; // Retry if empty
// Iterate and format as "timestamp text"
return Array.from(segments)
.map((seg) => {
const time = seg.querySelector(".segment-timestamp")?.innerText.trim();
const text = seg.querySelector(".segment-text")?.innerText.trim();
return `${time} ${text}`;
})
.join("\n");
};<Video Title>.txtmcp__plugin_claude-code-settings_chrome__close_page<Video Title>.txtTimestamp Subtitle Text