Skip to main content

Format Selection

-f, --format
string
Video format codeSee “FORMAT SELECTION” for more detailsExample:
yt-dlp -f "bestvideo+bestaudio" URL
yt-dlp -f "bestvideo[ext=mp4]+bestaudio[ext=m4a]/best[ext=mp4]" URL
yt-dlp -f 137+140 URL  # Specific format codes
-S, --format-sort
string
Sort the formats by the fields givenSee “Sorting Formats” for more detailsExample:
yt-dlp -S "res,fps" URL
yt-dlp -S "quality,codec:h264" URL
--format-sort-reset
flag
Disregard previous user specified sort order and reset to the default
--format-sort-force
flag
Force user specified sort order to have precedence over all fieldsSee “Sorting Formats” for more detailsAlias: --S-force
--no-format-sort-force
flag
default:"true"
Some fields have precedence over the user specified sort order

Multistream Options

--video-multistreams
flag
Allow multiple video streams to be merged into a single file
--no-video-multistreams
flag
default:"true"
Only one video stream is downloaded for each output file
--audio-multistreams
flag
Allow multiple audio streams to be merged into a single file
--no-audio-multistreams
flag
default:"true"
Only one audio stream is downloaded for each output file

Container Preferences

--prefer-free-formats
flag
Prefer video formats with free containers over non-free ones of the same qualityUse with “-S ext” to strictly prefer free containers irrespective of quality
--no-prefer-free-formats
flag
default:"true"
Don’t give any special preference to free containers

Format Checking

--check-formats
flag
Make sure formats are selected only from those that are actually downloadable
--check-all-formats
flag
Check all formats for whether they are actually downloadable
--no-check-formats
flag
Do not check that the formats are actually downloadable

Format Listing

-F, --list-formats
flag
List available formats of each videoSimulate unless --no-simulate is usedExample:
yt-dlp -F URL

Merge Output Format

--merge-output-format
string
Containers that may be used when merging formats, separated by ”/”Ignored if no merge is required.Currently supported: avi, flv, mkv, mov, mp4, webmExample:
yt-dlp --merge-output-format "mp4/mkv" URL