Use CasesExtract subtitles from YouTube videos
ResearchFiles / knowledgeAutomation

Extract subtitles from YouTube videos

Recipe by @mr.potato
View Source Repository

How it works

Uses yt-dlp to pull subtitle tracks from YouTube (and thousands of other video platforms) without downloading the video. Supports both manually uploaded subtitles and YouTube's auto-generated captions. The agent accepts a video URL and outputs a subtitle file in the format and language the user specifies.

Users can control:

  • Language — any language code (e.g. en, es, ja), or grab all available tracks at once
  • Format — SRT, VTT, or ASS/SSA
  • Caption type — prefer manual subtitles, fall back to auto-generated, or request auto-generated only
  • Timestamp stripping — output clean plain text for use in notes, RAG pipelines, or summaries

Common workflow: extract subtitles → feed the SRT into a downstream agent step (summarize, translate, search by keyword, or index for retrieval).

Install with pip install yt-dlp. No API key or account required for public videos.

Example Prompt

"Download just the English subtitles from this YouTube video as an SRT file, without downloading the video itself."