Downloading
Download the Best Quality with yt-dlp
Always get the highest quality with yt-dlp: how default selection works, forcing 4K/8K and HDR, choosing codecs with -S, and merging video+audio with ffmpeg.
Updated 2026-06-13
By default yt-dlp already downloads the best available quality and merges the top video and audio streams. But you can take precise control of resolution, codec and HDR.
The default already grabs the best
yt-dlp "<URL>"This is equivalent to -f "bv*+ba/b": best video + best audio, falling back to the best combined stream. ffmpeg merges them.
See what's actually available
yt-dlp -F "<URL>"Force a resolution ceiling or floor
yt-dlp -S "res:2160" "<URL>" # prefer up to 4K
yt-dlp -S "res:1080" "<URL>" # prefer up to 1080pPrefer specific codecs (AV1, HDR, high fps)
yt-dlp -S "res,fps,hdr:12,vcodec:av01" "<URL>"-S sorts formats by your priorities and picks the top match — easier and more robust than memorizing format IDs.
Guarantee the absolute maximum, even in a big container
yt-dlp -f "bv*+ba/b" --merge-output-format mkv "<URL>"MKV accepts virtually any codec combination, so nothing is lost to container limits. Want MP4 instead? See yt-dlp download mp4.