| name | yt-dlp |
| description | Download videos, extract audio, and get transcripts from YouTube and 1000+ sites. Use when asked to download a video, extract audio, get a transcript, rip subtitles, or fetch media. Triggers on "download video", "yt-dlp", "extract audio", "YouTube download", "get transcript", "subtitles", or any media download request. |
yt-dlp
Video/audio downloader supporting YouTube and 1000+ sites.
Transcripts
Extract transcript text from YouTube videos.
yt-dlp --write-auto-subs --sub-lang en --convert-subs srt --skip-download -o "transcript" <url>
cat transcript.en.srt | sed '/^[0-9]*$/d; /^$/d; /-->/d' | awk '!seen[$0]++'
yt-dlp --write-subs --sub-lang en --convert-subs srt --skip-download -o "transcript" <url>
cat transcript.en.srt | sed '/^[0-9]*$/d; /^$/d; /-->/d' | awk '!seen[$0]++'
yt-dlp --list-subs <url>
yt-dlp --write-auto-subs --sub-lang es --convert-subs srt --skip-download -o "transcript" <url>
yt-dlp --write-auto-subs --sub-lang en --convert-subs srt --skip-download -o "transcript" <url>
cat transcript.en.srt
Tip: Use --write-auto-subs for auto-generated captions (available on most YouTube videos). Use --write-subs for human-uploaded subtitles (fewer videos, but higher quality).
Download Video
yt-dlp <url>
yt-dlp -f "bestvideo[height<=720]+bestaudio/best[height<=720]" <url>
yt-dlp -f "bestvideo[height<=1080]+bestaudio/best[height<=1080]" <url>
yt-dlp -F <url>
yt-dlp -f 137+140 <url>
yt-dlp -o "/path/to/%(title)s.%(ext)s" <url>
Extract Audio
yt-dlp -x --audio-format mp3 <url>
yt-dlp -x --audio-format mp3 --audio-quality 0 <url>
yt-dlp -x --audio-format m4a <url>
Playlists
yt-dlp <playlist-url>
yt-dlp --playlist-items 1,3,5 <playlist-url>
yt-dlp --playlist-items 1:5 <playlist-url>
yt-dlp -x --audio-format mp3 <playlist-url>
yt-dlp --flat-playlist --print "%(title)s %(url)s" <playlist-url>
Video Info
yt-dlp --print title <url>
yt-dlp --dump-json <url>
yt-dlp --print "%(title)s | %(duration>%H:%M:%S)s | %(view_count)s views" <url>
Output Templates
Common placeholders for -o:
%(title)s
%(id)s
%(ext)s
%(upload_date)s
%(channel)s
%(playlist)s
%(playlist_index)s
Example: yt-dlp -o "%(channel)s/%(title)s.%(ext)s" <url>
Tips
- Use
--no-playlist to download a single video from a playlist URL
- Use
--cookies-from-browser chrome for age-restricted or private content
- Use
--limit-rate 1M to throttle download speed
- Use
--download-archive archive.txt to skip already-downloaded videos
- Supports 1000+ sites beyond YouTube. Try any video URL.