| name | yt-dlp-cli |
| description | Use yt-dlp to download videos and audio from YouTube, Vimeo, Twitter, and 1000+ other sites. Extract metadata, select formats, and convert media. |
yt-dlp
Feature-rich video/audio downloader. Supports YouTube, Vimeo, Twitter, and 1000+ sites.
Common Commands
Download Video
yt-dlp "https://youtube.com/watch?v=VIDEO_ID"
yt-dlp -f "bestvideo+bestaudio" URL
yt-dlp -f "bestvideo[height<=720]+bestaudio" URL
yt-dlp -f "best[height<=480]" URL
Download Audio Only
yt-dlp -x URL
yt-dlp -x --audio-format mp3 URL
yt-dlp -x --audio-format wav URL
yt-dlp -x --audio-quality 0 URL
List Formats
yt-dlp -F URL
yt-dlp -f 22 URL
Output Naming
yt-dlp -o "%(title)s.%(ext)s" URL
yt-dlp -o "%(uploader)s/%(title)s.%(ext)s" URL
yt-dlp -o "/tmp/%(title)s.%(ext)s" URL
Metadata
yt-dlp --print title URL
yt-dlp --print duration URL
yt-dlp -j URL
yt-dlp --write-info-json URL
yt-dlp --write-thumbnail URL
yt-dlp --write-subs --sub-lang en URL
yt-dlp --write-auto-subs --sub-lang en URL
Playlists
yt-dlp --flat-playlist -j URL
yt-dlp --playlist-items 1-5 URL
yt-dlp -I 1:10 URL
Advanced
yt-dlp --sponsorblock-remove all URL
yt-dlp --embed-thumbnail --embed-subs URL
yt-dlp --cookies-from-browser chrome URL
yt-dlp --download-archive archive.txt URL
Agent Best Practices
- Use
-j (JSON) for metadata extraction without downloading
- Use
--print for specific fields: --print title, --print duration
- Use
-x --audio-format mp3 for podcast/audio extraction
- Use
--flat-playlist -j to list playlist contents without downloading
- Use
-f "bestvideo[height<=720]+bestaudio" to balance quality and size
- Use
--download-archive for incremental downloads
- Always respect copyright and terms of service
Example Workflows
Get video metadata
yt-dlp -j "URL" | jq '{title, duration, view_count, upload_date}'
Download audio from playlist
yt-dlp -x --audio-format mp3 -o "%(playlist_index)s-%(title)s.%(ext)s" "PLAYLIST_URL"