How Playlist Downloading Works Technically
Before getting into commands, understanding what yt-dlp actually does when you point it at a playlist URL helps diagnose problems when they occur.
The Process, Step by Step
Step 1: yt-dlp fetches the playlist page from YouTube. YouTube's API returns a list of video IDs in playlist order. For very large playlists (hundreds of videos), this initial fetch can take a moment because YouTube paginates the results and yt-dlp has to traverse all pages.
Step 2: yt-dlp processes each video ID sequentially. For each video, it fetches the video page, extracts available stream URLs (video-only streams, audio-only streams, and combined streams), and evaluates which ones match your format specification.
Step 3: For 1080p and higher quality, YouTube typically delivers video and audio as separate streams. The video-only stream contains no audio. The audio-only stream contains no video. yt-dlp downloads both, then calls FFmpeg to merge them into a single file. This is why FFmpeg is required on your system for best-quality downloads. Without FFmpeg, you can only get combined streams, which max out at 720p on YouTube.
Step 4: Each finished file is saved according to your output template. yt-dlp moves to the next video in the playlist. If a video fails (unavailable, private, region-blocked), yt-dlp logs the error and continues to the next one by default.
Installing yt-dlp
You need yt-dlp and FFmpeg installed. yt-dlp without FFmpeg works, but is limited to 720p max quality.
On macOS: brew install yt-dlp ffmpeg
On Windows: Download yt-dlp.exe from the yt-dlp GitHub releases page. Place it somewhere in your PATH (or in the folder where you run commands). Install FFmpeg via winget: winget install ffmpeg
On Linux: pip install yt-dlp and apt install ffmpeg (or equivalent for your distro)
Always install yt-dlp via its official source, not random third-party sites. The command to update yt-dlp once installed: yt-dlp -U. Run this regularly since YouTube frequently makes backend changes that break older yt-dlp versions.
yt-dlp Commands with Examples
The Standard Full-Playlist Download
This is the command you will use most of the time. Replace PLAYLIST_URL with the actual URL of the playlist (the full URL including the list= parameter):
yt-dlp -f "bestvideo[ext=mp4]+bestaudio[ext=m4a]/best[ext=mp4]/best" --yes-playlist -o "%(playlist_index)03d - %(title)s.%(ext)s" "PLAYLIST_URL"
Breaking down each part:
-f "bestvideo[ext=mp4]+bestaudio[ext=m4a]/best[ext=mp4]/best": Format selector. First tries best MP4 video plus best M4A audio (merged by FFmpeg). Falls back to best single MP4. Falls back to best available in any format.--yes-playlist: Download the entire playlist. Required when passing a playlist URL. Without it, behavior varies by URL format and yt-dlp version.-o "%(playlist_index)03d - %(title)s.%(ext)s": Output filename template.%(playlist_index)03dproduces zero-padded numbers like 001, 002, 003.%(title)sis the video title.%(ext)sis the file extension (mp4, webm, etc.).
The result: files named like 001 - Introduction to Python.mp4, 002 - Variables and Types.mp4, and so on. Sorting by filename puts them in playlist order.
Audio-Only Playlist Download (MP3)
For podcast playlists, lecture series, music, or any content where you only need audio:
yt-dlp -x --audio-format mp3 --yes-playlist -o "%(playlist_index)03d - %(title)s.%(ext)s" "PLAYLIST_URL"
The -x flag means "extract audio only." --audio-format mp3 specifies MP3 as the output format. yt-dlp will download the best audio stream and convert to MP3 using FFmpeg. If you want other audio formats, replace mp3 with m4a, opus, flac, or wav.
For audio quality, yt-dlp defaults to the best available audio stream. You can specify bitrate with --audio-quality 0 (best) or --audio-quality 128K for a specific bitrate. See the complete audio extraction guide for more detail on audio-only workflows.
Resume-Safe Archive Download
For large playlists (20+ videos, or playlists that might take hours to download), the archive method is essential:
yt-dlp --yes-playlist --download-archive downloaded.txt -o "%(playlist_index)03d - %(title)s.%(ext)s" "PLAYLIST_URL"
How the archive works: on first run, yt-dlp creates downloaded.txt (in whatever directory you run the command from) and writes the ID of every successfully completed download into it. If your download is interrupted (power outage, network drop, you close the terminal), run the exact same command again. yt-dlp reads downloaded.txt, skips every video ID already in the file, and picks up from where it left off.
Important: keep downloaded.txt in the same folder as your videos. If you delete it, yt-dlp will re-download everything from the beginning next time.
Also important: if a new video is added to the playlist after your initial download, the archive method will download only the new video and skip the ones you already have. This makes it an effective "sync" mechanism for ongoing playlists.
Downloading a Specific Range of Videos
Sometimes you only need part of a playlist. Videos 5 through 15, for example:
yt-dlp --yes-playlist --playlist-start 5 --playlist-end 15 "PLAYLIST_URL"
--playlist-start and --playlist-end are 1-indexed positions in the playlist. You can also use --playlist-items to specify individual items by position: --playlist-items 1,3,5,7 downloads items 1, 3, 5, and 7 specifically. Or a range: --playlist-items 1-10.
Adding Metadata
For organized collections, embedding metadata into the downloaded files helps music players, video players, and file managers categorize and display content correctly:
yt-dlp --yes-playlist --add-metadata --embed-thumbnail -o "%(playlist_index)03d - %(title)s.%(ext)s" "PLAYLIST_URL"
--add-metadata: Embeds title, uploader, upload date, description into the file's metadata tags.
--embed-thumbnail: Embeds the video thumbnail as cover art (useful for audio files in music players).
For the FFmpeg-based post-processing of downloaded files, having metadata already embedded saves a step in your workflow.
Checking Available Formats Before Downloading
Before downloading an entire playlist, it is worth checking the available formats for one video to understand what quality levels exist:
yt-dlp -F "VIDEO_URL"
This lists all available streams with their format code, extension, resolution, codec, and file size estimate. You can then use a specific format code with -f FORMAT_CODE to target exactly what you want. This is particularly useful when dealing with playlists that have unusual content or when you want VP9 streams instead of H.264.
Filename Organization
Filenames get messy fast with playlist downloads if you do not set a clear template from the start. Here is what matters and how to handle it.
The playlist_index Template
Using %(playlist_index)03d in your output template gives you zero-padded numbers. The 03d means three digits with leading zeros. So:
- Video 1:
001 - Title.mp4 - Video 10:
010 - Title.mp4 - Video 100:
100 - Title.mp4
Why this matters: without zero-padding, alphabetical sorting puts "10" before "2" because "1" comes before "2" in character order. Zero-padded numbers sort correctly because "010" comes before "020" which comes before "100". For playlists over 99 videos, use %(playlist_index)04d for four-digit padding.
For playlists over 999 videos (rare but it happens), use %(playlist_index)05d.
Handling Special Characters in Titles
Video titles frequently contain characters that are problematic for filenames: slashes, colons, question marks, asterisks, quotes. yt-dlp sanitizes these by default on Windows (replacing them with underscores or similar), but behavior varies by operating system.
For consistent results across platforms, add --restrict-filenames to your command:
yt-dlp --yes-playlist --restrict-filenames -o "%(playlist_index)03d - %(title)s.%(ext)s" "PLAYLIST_URL"
--restrict-filenames limits filenames to ASCII characters, replacing any problematic characters. The filenames are less pretty but more portable.
Organizing Into Subfolders by Playlist
If you download multiple playlists to the same directory, it helps to automatically create a subfolder per playlist:
yt-dlp --yes-playlist -o "%(playlist_title)s/%(playlist_index)03d - %(title)s.%(ext)s" "PLAYLIST_URL"
%(playlist_title)s uses the playlist's name as the folder name. Each playlist gets its own directory. Video files inside are numbered in order within that playlist.
GUI Alternatives Comparison
Not everyone wants to use the command line. Fair enough. Here are the main GUI tools that handle playlist downloads:
| Tool | Platform | Max Quality | Playlist Support | Archive/Resume | Cost |
|---|---|---|---|---|---|
| yt-dlp (CLI) | All | 8K (whatever exists) | Full, flexible | Yes (--download-archive) | Free, open source |
| 4K Video Downloader | Win/Mac/Linux | 8K | Yes, one-click | No | Free (limited) / $15 one-time |
| Downie | Mac only | 4K | Yes | No | $19 one-time |
| JDownloader 2 | All | Varies | Yes | Yes (link checker) | Free, open source |
| Clipgrab | Win/Mac/Linux | 1080p | Limited | No | Free |
4K Video Downloader
4K Video Downloader is the most-cited GUI alternative for a reason: it is simple, reliable, and the playlist download workflow is one button. Paste a playlist URL, choose quality, click Download. The free version limits playlist downloads to 30 videos (some sources say 25; the limit has shifted over time). Paid removes that limit.
The trade-offs versus yt-dlp: no archive/resume functionality, less format flexibility, less control over filename patterns. For straightforward playlist downloads where you do not need fine-grained control, it gets the job done without any technical setup.
JDownloader 2
JDownloader is a more general-purpose download manager that handles YouTube playlists among many other sites. It has a link checker that lets you preview and selectively download items from a playlist before committing. It also has a package manager that organizes downloads into groups. The interface is more complex than 4K Video Downloader but more powerful for managing large download queues.
JDownloader is Java-based and can feel dated compared to modern apps. But it is free, open source, and handles edge cases that simpler tools miss.
Downie (Mac Only)
Downie is a polished macOS-native app with a clean interface. It handles YouTube playlists well and integrates with macOS Services for one-click downloads from the browser. The $19 one-time purchase is reasonable for Mac users who want a GUI. The limitation is Mac-only availability.
Storage and Bandwidth Planning
Large playlist downloads need planning. Running out of disk space halfway through a 200-video download is annoying.
Size Estimation Formula
Very rough estimates for video files (actual sizes vary significantly with content complexity and codec):
- 360p H.264: ~150MB per hour
- 480p H.264: ~300MB per hour
- 720p H.264: ~600MB per hour
- 1080p H.264: ~1.5GB per hour
- 1080p VP9 (YouTube's preferred codec): ~1-2GB per hour
- 4K H.264: ~4-7GB per hour
- 4K VP9: ~3-5GB per hour
For audio only at 128kbps MP3: ~58MB per hour.
Example calculation: A 50-video lecture series, each video averaging 45 minutes, downloaded at 1080p.
- Total duration: 50 x 45 = 2,250 minutes = 37.5 hours
- At 1.5GB per hour: 37.5 x 1.5 = approximately 56GB
That is a lot. Have the storage ready before you start. Use an external drive if needed.
Pre-Checking Total Duration
yt-dlp can simulate a download (without actually downloading) and show you metadata including duration:
yt-dlp --yes-playlist --flat-playlist -j "PLAYLIST_URL" | python3 -c "import sys,json; total=sum(json.loads(l).get('duration',0) for l in sys.stdin if l.strip()); print(f'{total//3600}h {(total%3600)//60}m')"
This is a one-liner that fetches playlist metadata without downloading, then calculates total duration. It requires Python 3, which is usually already installed. This gives you a quick estimate before committing to a download.
Resolution Choices and Their Trade-offs
For offline viewing on a laptop or desktop: 1080p is the standard. You will not notice the difference between 1080p and 4K on most laptop screens.
For phone viewing: 720p is sufficient for phone-sized screens. 1080p on a phone is largely wasted storage.
For archival purposes: Download at the highest available quality. Storage is cheap relative to the time it would take to re-download at higher quality later.
For audio-only content (podcasts, lectures where visuals are secondary): always download audio-only. The file size difference is dramatic (1.5GB per hour vs 60MB per hour). See the audio extraction guide for format-specific recommendations.
Time Estimates
Download speed depends on your connection. YouTube does not reliably allow downloading at full connection speed because it rate-limits download requests. In practice, yt-dlp often achieves 5-20MB/s depending on connection and YouTube's throttling.
At 10MB/s download speed and 1.5GB per hour of 1080p content, downloading 56GB takes roughly 1.5 hours. At 5MB/s, about 3 hours. Large playlists often require overnight downloads.
Legal Context
Downloading YouTube playlists via yt-dlp violates YouTube's Terms of Service. The copyright situation depends on the content. Personal offline viewing of content you would otherwise watch on YouTube is a low-risk gray area. Redistribution of downloaded content is infringement. Commercial use without proper licensing is infringement.
For Creative Commons playlists (some educational channels explicitly publish CC content), downloading and reusing is within the license terms as long as you follow the specific license conditions (usually attribution).
YouTube Premium does offer official offline downloads, but these are DRM-locked to the YouTube app, cannot be transferred, and are not portable files. For actual file-based offline access, yt-dlp is what people use. The legal analysis is the same as for single-video downloads. See our full breakdown in the YouTube download legality guide.
One practical consideration: some channels explicitly state in their descriptions that downloads are permitted, or they provide their own download links. Channels that do this (often educational, open-source, or Creative Commons-focused channels) are the cleanest use case for playlist downloading.
For YouTube MP4 downloads of individual videos rather than playlists, the YTCut MP4 download tool handles single clips quickly without needing any local software installation.
Troubleshooting
Playlist URL Formats
YouTube has multiple URL formats for playlists. The one you want is:
https://www.youtube.com/playlist?list=PLAYLIST_ID
You might also encounter:
https://www.youtube.com/watch?v=VIDEO_ID&list=PLAYLIST_ID- This is a video within a playlist. yt-dlp will download the playlist when you use --yes-playlist with this URL.https://youtu.be/VIDEO_ID?list=PLAYLIST_ID- Short URL format that also contains the playlist ID. Same behavior.
The safest approach: copy the URL directly from the playlist page (at youtube.com/playlist?list=...) rather than from a video that happens to be in a playlist.
Private and Age-Restricted Videos
If some videos in a playlist are private or age-restricted, yt-dlp will log errors for those and continue with the rest. The default behavior is to skip errored videos with a warning and continue downloading the rest.
For age-restricted content, you may need to pass your browser cookies:
yt-dlp --cookies-from-browser chrome --yes-playlist "PLAYLIST_URL"
Replace chrome with firefox, safari, or edge as appropriate. This reads your browser's current YouTube session cookies, allowing yt-dlp to authenticate as your account.
The 429 Rate Limit Problem
YouTube aggressively rate-limits bulk download requests. If you are downloading a large playlist and see HTTP 429 errors, or your download speed suddenly drops to near zero, YouTube has throttled your IP.
Solutions, in order of effort:
Wait and retry. 30-60 minutes is usually enough. Use your archive file so you pick up where you left off.
Add sleep intervals between downloads. Slow down your requests to reduce throttling:
yt-dlp --yes-playlist --sleep-interval 5 --max-sleep-interval 15 "PLAYLIST_URL"
This adds a random 5-15 second delay between each video download. Slower overall, but much less likely to trigger rate limits.
Use a VPN or different network. If your home IP is throttled, a VPN or switching to a mobile hotspot changes your IP and bypasses the throttle. Note: some VPN IPs are already throttled by YouTube because many people use them.
Videos Available in the Playlist But Not Downloading
If yt-dlp reports "Video unavailable" for items you can see in the playlist while logged into YouTube, the videos may be restricted to logged-in users or specific regions. Use --cookies-from-browser to authenticate, and check if the videos are region-blocked for your location.
FFmpeg Not Found Errors
If yt-dlp reports it cannot merge formats because FFmpeg is not found, FFmpeg is either not installed or not in your system PATH. On Windows, install via winget (winget install ffmpeg) or download from gyan.dev/ffmpeg/builds and place ffmpeg.exe in the same folder as yt-dlp.exe. On macOS, brew install ffmpeg. On Linux, apt install ffmpeg.
Without FFmpeg, yt-dlp falls back to downloading combined streams, which top out at 720p on YouTube. For anything better than 720p, FFmpeg is required.
For more FFmpeg workflows including cutting and trimming downloaded videos, see our FFmpeg video cutting guide. For understanding which video quality level is worth downloading, the YouTube video quality guide covers the codec and resolution options in detail.
Frequently Asked Questions
Do I need the --yes-playlist flag in yt-dlp?
Yes, if you are passing a playlist URL. Without --yes-playlist, yt-dlp may only download the first video in the playlist depending on the URL format. Some playlist URL formats are recognized automatically, but passing --yes-playlist explicitly is the safest approach and ensures the entire playlist downloads every time.
How do I resume a playlist download that was interrupted?
Use the --download-archive flag: yt-dlp --yes-playlist --download-archive downloaded.txt -o "%(playlist_index)03d - %(title)s.%(ext)s" PLAYLIST_URL. The archive file logs every completed download. Run the same command again after an interruption and yt-dlp skips already-downloaded videos, resuming from where it left off.
What is the best format selector string for yt-dlp playlist downloads?
The recommended format string is -f "bestvideo[ext=mp4]+bestaudio[ext=m4a]/best[ext=mp4]/best". This tries best MP4 video plus best M4A audio merged by FFmpeg, falls back to best single MP4, then falls back to best available in any format. This handles both muxed and separate stream videos reliably.
Why are some videos in a playlist downloading at lower quality than others?
Not all videos in a playlist are uploaded at the same quality. If a video was originally uploaded at 720p, no tool can download it at 1080p. Additionally, some videos use different codec combinations which affects which format strings match. Check available formats for a specific video with yt-dlp -F VIDEO_URL to see what is actually available.
How much storage space does a typical YouTube playlist require?
Estimate roughly 1-2GB per hour at 1080p. A 50-video playlist averaging 20 minutes per video at 1080p expects 15-50GB total. For audio-only at 128kbps MP3, roughly 60MB per hour, so a 50-video lecture series might be 1-3GB. Always verify available disk space before starting a large download.
Can yt-dlp download private or age-restricted YouTube playlists?
For age-restricted content, provide your YouTube cookies: yt-dlp --cookies-from-browser chrome --yes-playlist PLAYLIST_URL. For private playlists, the same flag authenticates as your account. Private playlists you own or have been given access to can be downloaded this way. Playlists you do not have access to cannot be downloaded regardless of the tool.
What happens if yt-dlp hits a rate limit from YouTube?
You will see 429 errors or drastically slowed speeds. Wait 30-60 minutes, then retry using your archive file to avoid re-downloading completed videos. Add random sleep intervals between downloads with --sleep-interval 5 --max-sleep-interval 15 to reduce future throttling. A VPN or different network can bypass IP-specific throttles temporarily.