Skip to content
yt-dlp

4K Video Downloader — yt-dlp Command Generator

Build a yt-dlp command for 2160p video with chapters and metadata intact.

Optional. Leave it empty and the command ends with URL for you to fill in.

Your command

yt-dlp -f 'bv*[height<=2160]+ba/b[height<=2160]' --merge-output-format mkv --no-playlist --embed-metadata --embed-chapters -N 4 'https://www.youtube.com/watch?v=dQw4w9WgXcQ'
Basics

Audio-only extracts the soundtrack and drops the video stream.

Video and quality

Caps the height. yt-dlp still picks the best stream at or below it.

The file type separate video and audio streams are merged into.

Advanced options (3)

Overrides the quality dropdown. For people who already know the format syntax.

Repackages the streams without re-encoding. Fast and lossless.

Re-encodes the video. Slow and lossy — only when remuxing will not do.

Audio

The file the audio is converted to.

VBR gives the best size-to-quality ratio; fixed bitrates are more predictable.

Subtitles

Embedding puts them inside the video; saving writes a separate .srt next to it.

Comma separated. Use all for every available language.

Playlists and channels

What to do when the URL belongs to both a video and a playlist.

Ranges and lists both work, for example 1-10,15 or -5::2 for every second item from the end.

Advanced options (1)

Records what has been downloaded so re-running skips it. The way to keep a channel in sync.

Sections and chapters
Advanced options (2)

A time range like *00:01:30-00:03:00, or a chapter name. The leading asterisk means it is a timestamp.

Metadata and artwork
Advanced options (3)
SponsorBlock

Cuts community-marked segments out of the file using SponsorBlock data.

Advanced options (1)

Keeps the segments but marks them, so you can skip them yourself.

Files and folders

Field names go in %(...)s. Slashes create folders.

Advanced options (4)

Where files are written. Combine with the template above for subfolders.

Maximum file name length in characters.

Filters
Advanced options (5)

YYYYMMDD, or a relative date like now-1month.

YYYYMMDD, or a relative date.

Skips anything smaller. Accepts 5M, 500K and similar.

Skips anything larger.

Number of files to download before stopping.

Network

For example 2M or 500K. Useful when you need the rest of your bandwidth.

Advanced options (5)

Speeds up fragmented streams. Four is a sensible starting point.

How many times to retry a failed piece. infinite is allowed.

HTTP, HTTPS or SOCKS proxy URL.

Makes requests look like a real browser. The usual fix for sudden 403 errors.

Login and cookies

Reads your logged-in session directly. Needed for private, age-restricted or members-only content.

Advanced options (1)

A Netscape-format cookies.txt exported from your browser.

Live streams
Advanced options (2)

Polls until a scheduled stream begins. MIN-MAX seconds between checks.

Workarounds
Advanced options (3)

Deprecated in favour of --add-headers. Kept because plenty of older guides still use it.

Deprecated in favour of --add-headers.

Site-specific switches, for example youtube:player_client=web.

Output and debugging
Advanced options (2)
Reset

What 4K actually requires

At 2160p, video and audio are always separate streams, so ffmpeg is required to merge them. MKV is the safer container: MP4 cannot hold some of the codecs 4K is delivered in, and forcing it makes yt-dlp re-encode — slow, lossy, and the usual way HDR metadata gets lost.

If 4K does not appear, it was probably never uploaded at that resolution. List the formats first rather than assuming the command is wrong. Expect several gigabytes per hour, and use a size limit or a section range if that is a problem.

The container choice is the HDR decision. 4K HDR arrives in codecs — VP9.2, AV1 — that MP4 cannot always carry, and forcing MP4 makes yt-dlp transcode: hours of work, visible quality loss, and the HDR metadata gone. MKV holds everything as-is; this preset defaults to it for exactly that reason. An SDR player plays an HDR file looking washed out — that is the player, not the file, and converting HDR to SDR properly is a filter job, not a flag.

Bandwidth is where 4K stops being theoretical: 2160p at a decent bitrate runs 40–90 GB per hour of footage, and parallel fragments make the download as fast as the connection allows — which is exactly what triggers platform throttling. If the run slows to a crawl, halve the fragment count and let it run longer; a 4K file is big enough that finishing slowly still beats restarting. The size limit option exists to stop a runaway run before the disk does.

Chapters and metadata are where a 4K archive earns its keep: a two-hour film without chapters is one file, and with them it is navigable. SponsorBlock integrates here too — the sponsor segments are marked on 4K content the same as any other, and skipping them on a film-length file saves more time than on anything shorter. Embed the thumbnail as cover art or your media library will show a blank tile for every 4K file.

What 4K cannot do: upscale. A 1080p source capped upward stays 1080p — the cap is a maximum, and yt-dlp picks the best stream at or below it without complaint. If -F shows nothing above 1080p, that is everything the uploader gave the platform. Real 4K sources on YouTube are usually VP9 or AV1, which older GPUs decode in software — a slow player is often a codec question, not a file question, and MKV keeps the original codec untouched.

Frequently asked questions

Why is 4K not available for this video?
It was not uploaded in 4K, or the platform restricts that rendition. Run -F to see what exists before assuming the command is wrong.
Which container should I use for 4K?
MKV accepts any codec combination. MP4 is more compatible but cannot hold some 4K codecs, in which case yt-dlp has to re-encode — slow and lossy.
How large are 4K downloads?
Often several gigabytes per hour. Use a maximum file size or a section range if that matters.
Does HDR work?
Yes when the source has it. Keep the original codec — re-encoding is what usually destroys the HDR metadata.