(No downloads — just metadata extraction)
All commands below use simulation mode by default (no video/audio is ever downloaded).
Add > output.txt (or > output.csv) at the end to save to a file, just like your example.
| Flag | Purpose |
|---|---|
--flat-playlist |
Treat playlist as a flat list of videos (fast, no deep expansion) |
--print "TEMPLATE" or -O "TEMPLATE" |
Print exactly what you want (title, URL, etc.) |
-J |
Dump entire playlist as one big JSON |
-j |
Dump one JSON per video |
-s or --skip-download |
Extra safety (forces simulation) |
--print-to-file "TEMPLATE" "file.txt" |
Write output straight to file (newer, cleaner than >) |
yt-dlp --flat-playlist --print "%(title)s|||%(channel)s|||%(url)s" \
"https://www.youtube.com/playlist?list=PLKdwl-SNv8noUYKS7E__f3CILMckG4rD_" > skate_playlist.txt
Simple title + URL list yt-dlp --flat-playlist --print "%(title)s | %(url)s" PLAYLIST_URL
CSV-style (title, channel, duration, views, upload date)
yt-dlp --flat-playlist --print "%(title)s,%(channel)s,%(duration)s,%(view_count)s,%(upload_date)s"
PLAYLIST_URL > playlist.csv
TSV (tab-separated — great for spreadsheets)
yt-dlp --flat-playlist --print "%(playlist_index)03d\t%(title)s\t%(channel)s\t%(url)s"
PLAYLIST_URL > playlist.tsv
Numbered playlist with uploader & duration (human-readable)
yt-dlp --flat-playlist --print "%(playlist_index)03d - %(title)s | %(channel)s | %(duration_string)s"
PLAYLIST_URL
Full playlist metadata (title, uploader, total videos)
yt-dlp --flat-playlist --print "%(playlist_title)s by %(playlist_uploader)s — %(n_entries)s videos"
PLAYLIST_URL
One JSON file with the whole playlist + all videos yt-dlp -J PLAYLIST_URL > playlist_full.json
Flat playlist as one JSON (just the list, no extra data) yt-dlp --flat-playlist -J PLAYLIST_URL > playlist_flat.json
One JSON per video (pipe to jq or process individually) yt-dlp --flat-playlist -j PLAYLIST_URL > videos.jsonl # JSON Lines format
Just the playlist title (super fast) yt-dlp --flat-playlist --print "%(playlist_title)s" PLAYLIST_URL
Title only yt-dlp --print "%(title)s" VIDEO_URL
All important fields (CSV style) yt-dlp --print "%(title)s|||%(channel)s|||%(upload_date)s|||%(duration_string)s|||%(view_count)s|||%(url)s" VIDEO_URL
Full metadata JSON yt-dlp -j VIDEO_URL > metadata.json
List all videos in a channel (latest uploads) yt-dlp --flat-playlist --print "%(title)s | %(url)s" "https://www.youtube.com/channel/CHANNEL_ID/videos"
Channel name + follower count yt-dlp --print "%(channel)s — %(channel_follower_count)s followers" CHANNEL_URL
| What you want | Template |
|---|---|
| Zero-padded index | %(playlist_index)03d |
| Truncate title to 80 chars | %(title).80s |
| Formatted date | %(upload_date>%Y-%m-%d)s |
| Safe filename-friendly title | %(title).100B (B = bytes, safe chars) |
| Default value if missing | `%(like_count |
| Multiple prints (multi-column) | Use multiple --print flags |
Example: Fancy CSV with safe titles
yt-dlp --flat-playlist
--print "%(playlist_index)03d,%(title).100B,%(channel)s,%(upload_date>%Y-%m-%d)s,%(duration_string)s,%(url)s"
PLAYLIST_URL > clean_playlist.csv
title,channel,uploader,url(video link)playlist_title,playlist_uploader,n_entries,playlist_indexduration,duration_stringview_count,like_countupload_date,timestampid,webpage_url,thumbnaildescription(use with caution — very long)
- Always test without
> filefirst to see output. - For huge playlists,
--flat-playlistis much faster. - Pipe to
jqfor JSON:yt-dlp -J URL | jq .title - Use
--ignore-errorsif some videos are private/deleted. --print-to-fileis cleaner than shell redirection for complex cases.
Copy-paste any of the commands above and just replace PLAYLIST_URL or VIDEO_URL.
Enjoy your metadata wrangling! 🚀