Skip to main content

Playlist Item Selection

-I, --playlist-items
string
Comma-separated playlist_index of the items to downloadYou can specify a range using [START]:[STOP][:STEP]. For backward compatibility, START-STOP is also supported.Use negative indices to count from the right and negative STEP to download in reverse order.Example:
yt-dlp -I 1:3,7,-5::2 URL
# On a playlist of size 15, downloads items at index 1,2,3,7,11,13,15

File Size Filters

--min-filesize
string
Abort download if filesize is smaller than SIZEExample:
yt-dlp --min-filesize 50k URL
yt-dlp --min-filesize 44.6M URL
--max-filesize
string
Abort download if filesize is larger than SIZEExample:
yt-dlp --max-filesize 100M URL

Date Filters

--date
string
Download only videos uploaded on this dateThe date can be “YYYYMMDD” or in the format [now|today|yesterday][-N[day|week|month|year]]Example:
yt-dlp --date 20230101 URL
yt-dlp --date today-2weeks URL
--datebefore
string
Download only videos uploaded on or before this dateThe date formats accepted are the same as --dateExample:
yt-dlp --datebefore 20230601 URL
--dateafter
string
Download only videos uploaded on or after this dateThe date formats accepted are the same as --dateExample:
yt-dlp --dateafter 20230101 URL

Advanced Filters

--match-filters
string
Generic video filter. Any “OUTPUT TEMPLATE” field can be compared with a number or a string using the operators defined in “Filtering Formats”You can:
  • Specify a field to match if the field is present
  • Use !field to check if the field is not present
  • Use & to check multiple conditions
  • Use \ to escape & or quotes if needed
If used multiple times, the filter matches if at least one of the conditions is met.Use --match-filters - to interactively ask whether to download each video.Example:
yt-dlp --match-filters !is_live URL
yt-dlp --match-filters "like_count>?100 & description~='(?i)\\bcats \\& dogs\\b'" URL
# Matches videos that are not live OR have like count > 100 and contain "cats & dogs"
--no-match-filters
flag
default:"true"
Do not use any --match-filters
--break-match-filters
string
Same as --match-filters but stops the download process when a video is rejected
--no-break-match-filters
flag
default:"true"
Do not use any --break-match-filters

Playlist Handling

--no-playlist
flag
Download only the video, if the URL refers to a video and a playlist
--yes-playlist
flag
Download the playlist, if the URL refers to a video and a playlist

Age Restriction

--age-limit
number
Download only videos suitable for the given ageExample:
yt-dlp --age-limit 18 URL

Archive

--download-archive
string
Download only videos not listed in the archive file. Record the IDs of all downloaded videos in itExample:
yt-dlp --download-archive downloaded.txt URL
--no-download-archive
flag
default:"true"
Do not use archive file

Download Limits

--max-downloads
number
Abort after downloading NUMBER filesExample:
yt-dlp --max-downloads 10 URL
--break-on-existing
flag
Stop the download process when encountering a file that is in the archive supplied with the --download-archive option
--no-break-on-existing
flag
default:"true"
Do not stop the download process when encountering a file that is in the archive
--break-per-input
flag
Alters --max-downloads, --break-on-existing, --break-match-filters, and autonumber to reset per input URL
--no-break-per-input
flag
--break-on-existing and similar options terminates the entire download queue
--skip-playlist-after-errors
number
Number of allowed failures until the rest of the playlist is skippedExample:
yt-dlp --skip-playlist-after-errors 3 URL