본문으로 건너뛰기
Skillpedia
웹 스크레이핑27k · #9968

baoyu-youtube-transcript

하는 일

URL이나 ID로 YouTube 영상의 대본이나 자막을 가져오며, 타임스탬프, 번역, 선택적 챕터를 포함할 수 있습니다. 읽기, 메모, 조사를 위해 영상의 텍스트가 필요한 사람을 위한 스킬입니다.

사용하는 경우

  • ✓YouTube 영상의 대본을 텍스트로 얻고 싶을 때.
  • ✓특정 언어나 SRT 형식의 자막이 필요할 때.
  • ✓영상의 커버 이미지를 세부 정보와 함께 저장하고 싶을 때.

스킬 링크

https://github.com/JimLiu/baoyu-skills/blob/main/skills/baoyu-youtube-transcript/SKILL.md

복사해서 AI(Claude, ChatGPT, Cursor)에 붙여넣고 지침을 따르도록 요청하세요.

사용 방법

가장 쉬운 방법입니다. 메시지를 복사해 AI에 붙여넣으세요. AI가 스킬을 읽고 지침을 따릅니다.

바로 붙여넣을 수 있는 메시지

Use this skill to help me: https://github.com/JimLiu/baoyu-skills/blob/main/skills/baoyu-youtube-transcript/SKILL.md Read the SKILL.md file at that link and follow its instructions for my task.
AI가 이런 스킬을 알아서 찾아 쓰길 원하시나요?무료 Skillpedia MCP를 설치하세요. 한 줄이면 작업마다 스킬 15,000+개 중에서 검색합니다.1분 만에 설치 →

AI에게 요청하는 예시

“이 YouTube 영상의 대본을 중국어와 영어로, 타임스탬프와 함께 가져와 주세요. 읽을 수 있게요.”

매주 새 스킬 5개. 읽는 데 1분.

작동 방식

에이전트는 영상 URL과 옵션을 넣어 명령줄 스크립트를 실행합니다. 먼저 YouTube 자체 인터페이스를 사용하고, 필요하면 yt-dlp로 대체하며, 원본 데이터를 캐시해 빠르게 다시 형식을 바꿀 수 있습니다.

기술 내용 (원본 SKILL.md)

작성자의 영어 원문을 GitHub에서 그대로 가져왔습니다.

YouTube Transcript

Works with manual and auto-generated transcripts. No API key or browser: uses YouTube's InnerTube API, falling back to yt-dlp when YouTube blocks the direct path. First run also fetches metadata and cover image and caches raw data for fast re-formatting.

Script Directory

{baseDir} = this SKILL.md's directory. ${BUN_X} = bun if installed; else npx -y bun if npx available; else suggest installing bun. Replace {baseDir} and ${BUN_X} with actual values.

Script Purpose
scripts/main.ts Transcript download CLI

Usage

${BUN_X} {baseDir}/scripts/main.ts <youtube-url-or-id>          # markdown with timestamps (English)
${BUN_X} {baseDir}/scripts/main.ts <url> --languages zh,en,ja   # language priority
${BUN_X} {baseDir}/scripts/main.ts <url> --chapters --speakers
${BUN_X} {baseDir}/scripts/main.ts <url> --format srt
${BUN_X} {baseDir}/scripts/main.ts <url> --translate zh-Hans
${BUN_X} {baseDir}/scripts/main.ts <url> --list
Option Description Default
<url-or-id> YouTube URL or video ID (multiple allowed) Required
--languages <codes> Language codes, comma-separated, in priority order en
--format <fmt> text (.md: frontmatter incl. description, title, summary, optional TOC/cover/timestamps/chapters/speakers) or srt text
--translate <code> Translate to language code
--list List available transcripts (stdout only, no file)
--timestamps [HH:MM:SS → HH:MM:SS] timestamps per paragraph on
--no-timestamps Disable timestamps
--chapters Chapter segmentation from video description
--speakers Raw transcript with metadata for speaker identification
--exclude-generated Skip auto-generated transcripts
--exclude-manually-created Skip manually created transcripts
--refresh Force re-fetch, ignore cache
-o, --output <path> Output file path auto-generated
--output-dir <dir> Base output directory youtube-transcript

Input: https://www.youtube.com/watch?v=ID, https://youtu.be/ID, https://www.youtube.com/embed/ID, https://www.youtube.com/shorts/ID, or bare video ID.

Optional env: YOUTUBE_TRANSCRIPT_COOKIES_FROM_BROWSER — passed to yt-dlp --cookies-from-browser during fallback (e.g. chrome, safari, firefox, chrome:Profile 1).

Output Directory

youtube-transcript/
├── .index.json                          # Video ID → directory path (cache lookup)
└── {channel-slug}/{title-full-slug}/    # channel name / full title, kebab-case
    ├── meta.json                        # title, channel, description, duration, chapters, cover path, language info
    ├── transcript-raw.json              # raw API snippets `{ text, start, duration }[]`
    ├── transcript-sentences.json        # `{ text, start: "HH:mm:ss", end: "HH:mm:ss" }[]`
    ├── imgs/
    │   └── cover.jpg                    # Video thumbnail
    ├── transcript.md                    # from transcript-sentences.json
    └── transcript.srt                   # from transcript-raw.json (--format srt)

transcript-sentences.json splits on sentence-ending punctuation (.?!…。?! etc.), merges across snippets (CJK-aware), and allocates timestamps proportionally by character length.

Caching & Fallback

  • Repeat runs for the same video use the cache (no network). --refresh forces re-fetch; requesting a different language refreshes automatically.
  • Any run caches meta.json and imgs/cover.jpg, so cover/metadata-only requests just need one run.
  • On anti-bot / blocked responses the script retries alternate client identities, then yt-dlp. If yt-dlp is needed but missing, the agent decides how to make it available and continues — don't push the install decision to the user.

Workflow

  1. No language specified → run --list first to show options
  2. Always single-quote the URL (zsh globs ? → "no matches found"): 'https://www.youtube.com/watch?v=ID'
  3. Default: --chapters --speakers for the richest output
  4. The script saves cache + output and prints the file path
  5. --speakers → post-process per Speaker Identification below

Chapters (--chapters)

Parses chapter timestamps from the description (e.g., 0:00 Introduction), segments by chapter, groups snippets into paragraphs, saves .md with a Table of Contents. No further processing. No chapter timestamps → gr

자주 묻는 질문

API 키가 필요한가요?

아닙니다. 이 스킬은 API 키나 브라우저 없이 작동합니다.

어떤 형식으로 만들 수 있나요?

타임스탬프가 있는 마크다운 텍스트 또는 SRT 자막을 만들 수 있습니다.

대본을 번역할 수 있나요?

네. 다른 언어로 번역을 요청할 수 있습니다.

상세 정보

작성자의 원본 설명

Downloads YouTube video transcripts/subtitles and cover images by URL or video ID. Supports multiple languages, translation, chapters, and speaker identification. Caches raw data for fast re-formatting. Use when user asks to "get YouTube transcript", "download subtitles", "get captions", "YouTube字幕", "YouTube封面", "视频封面", "video thumbnail", "video cover image", or provides a YouTube URL and wants the transcript/subtitle text or cover image extracted.

repo: JimLiu/baoyu-skills

인기도

GitHub 스타
27k
순위
#9968
라이선스
MIT
업데이트
2026. 11. 2.

이 스킬이 유용한가요?

0

로그인 투표하려면 로그인하세요.

댓글

  • …

이 저장소의 다른 스킬

비슷한 스킬