Download videos from YouTube playlists with support for range selection, quality settings, and subtitle embedding. Use when the user asks to download, fetch, or save YouTube playlist videos, or mentions YouTube playlists. Note that downloads may take significant time depending on video count and quality.
Download videos from YouTube playlists using yt-dlp with full control over video range, quality, and subtitle options.
Long-running operation: Downloading videos can take considerable time:
Verbose logging warning: yt-dlp produces EXTENSIVE real-time progress output with frequent updates for each video:
CRITICAL: Recommended execution approach:
Use run_in_background for downloads (STRONGLY RECOMMENDED):
# Run download in background and redirect verbose output
python scripts/download.py --url "..." --output "./videos" > download.log 2>&1
Then periodically check the log file or output directory to monitor progress.
Use quiet mode (RECOMMENDED):
# Add --quiet flag to suppress detailed progress output
python scripts/download.py --url "..." --quiet
This still shows video titles and errors, but suppresses per-second progress updates.
Check completion by listing output directory:
# After starting download, periodically check what's been downloaded
ls -lh ./output_directory/
DO NOT watch the full real-time output unless:
Progress monitoring best practice:
Automatic skip of downloaded content: yt-dlp intelligently handles existing files:
This means you can safely re-run a download command after interruptions without worrying about downloading videos again.
Dependencies required: This skill requires yt-dlp and ffmpeg to be installed. See README.md for installation instructions.
Download all videos from a playlist to the current directory:
python scripts/download.py \
--url "https://www.youtube.com/playlist?list=PLAYLIST_ID"
Download videos 1-10 from a playlist:
python scripts/download.py \
--url "https://www.youtube.com/playlist?list=PLAYLIST_ID" \
--start 1 \
--end 10
Download videos to a specific folder:
python scripts/download.py \
--url "https://www.youtube.com/playlist?list=PLAYLIST_ID" \
--output "./my_videos"
If a download is interrupted (network issue, user cancellation, etc.), simply re-run the exact same command:
# Run this command again - already downloaded videos will be skipped
python scripts/download.py \
--url "https://www.youtube.com/playlist?list=PLAYLIST_ID" \
--output "./my_videos"
yt-dlp automatically:
Specify video quality with --quality:
# Best quality (default)
python scripts/download.py --url "..." --quality "best"
# Limit to 1080p
python scripts/download.py --url "..." --quality "bestvideo[height<=1080]+bestaudio/best"
# Limit to 720p
python scripts/download.py --url "..." --quality "bestvideo[height<=720]+bestaudio/best"
# Worst quality (fastest download)
python scripts/download.py --url "..." --quality "worst"
The script automatically:
All videos are saved in MP4 format with naming pattern: {playlist_index} - {title}.mp4
Main playlist download script.
Required arguments:
--url or -u: YouTube playlist URLOptional arguments:
--start or -s: Starting video index (default: 1)--end or -e: Ending video index (default: 38)--output or -o: Output directory (default: current directory)--quality or -q: Video quality setting (default: "best")--quiet: Quiet mode - suppresses verbose progress output (RECOMMENDED for LLM usage)Examples:
Basic download with quiet mode (RECOMMENDED):
python scripts/download.py \
--url "https://www.youtube.com/playlist?list=PLxxxxxx" \
--quiet
Download specific range with quality limit:
python scripts/download.py \
--url "https://www.youtube.com/playlist?list=PLxxxxxx" \
--start 5 \
--end 15 \
--quality "bestvideo[height<=720]+bestaudio/best" \
--output "./downloads" \
--quiet
The script handles common errors:
Check script output for detailed error messages and progress information.
For more examples and advanced use cases, see EXAMPLES.md.
For dependency installation and troubleshooting, see README.md.