Skip to content

yt-dlp

Use when downloading YouTube captions, subtitles, or transcripts via CLI. Also handles basic video download. Routes to reference docs for flags, formats, batch processing, and integration with video-pipeline and deepgram-transcription.

ModelSource
sonnetpack: video-pipeline
Full Reference

CLI reference for yt-dlp — YouTube subtitle/caption extraction primary, basic video download secondary. Acts as the “free captions gate” before falling back to paid Deepgram transcription.


ItemValue
Binaryyt-dlp (via brew install yt-dlp)
Version pinned2026.02.21
Dependencyffmpeg (for format conversion)
Primary use--write-auto-subs --skip-download
InputYouTube URL or batch file
Output.srt, .vtt, or .json3 subtitle files

I want to…File
Extract captions/subtitles, list available tracks, select languagesreference/subtitles.md
Process multiple URLs, playlists, output templatesreference/batch.md
Choose between SRT/VTT/JSON3, convert formatsreference/formats.md
Download video files, select quality/formatreference/video-download.md
Connect with video-pipeline, deepgram-transcriptionreference/integration.md

Usage: Read the reference file matching your current task. Each file is self-contained with examples and gotchas.


Before running ANY yt-dlp command, run this check and offer to install missing tools:

Terminal window
which yt-dlp && yt-dlp --version || echo "MISSING"
which ffmpeg && ffmpeg -version 2>&1 | head -1 || echo "MISSING"

If either is missing, tell the user and install for them:

OSInstall command
macOSbrew install yt-dlp ffmpeg
Linux (pip)pip install yt-dlp && sudo apt install ffmpeg
Linux (brew)brew install yt-dlp ffmpeg

Do not skip this check. Do not assume tools are installed. Offer to install, then install on approval.


YT URL → yt-dlp --list-subs → captions available?
YES → yt-dlp extract (free, instant)
NO → deepgram-transcription (paid, slower, but works on any audio)

Always check for existing captions before transcribing. Saves cost and time.


┏━ 🔧 yt-dlp ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓
┃ [action] for [target] ┃
┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛