ytdlp.org

Commands & Usage hub

yt-dlp commands: a copy-paste cheatsheet

The commands people actually run, in one place. Start with the one closest to your task, copy it, swap in your URL. Every command below is linked to a deeper guide if you need the detail.

Download in the best quality

yt-dlp "URL"

The default already merges the best video and audio.

Download audio as MP3

yt-dlp -x --audio-format mp3 "URL"

Needs ffmpeg. The single most-searched command. On yt-dlp 2025.04.30 or newer, yt-dlp -t mp3 "URL" is the short form.

Get an MP4 that plays everywhere

yt-dlp -t mp4 "URL"

Prefers H.264 video and AAC audio in an MP4. Can mean a lower resolution: on a TikTok test it took 540p H.264 over 1080p H.265.

Download a whole playlist

yt-dlp "PLAYLIST_URL"

Pass the playlist URL and every video downloads.

Slow down a big batch

yt-dlp -t sleep "PLAYLIST_URL"

Waits between requests and downloads, which helps when a site starts answering 429 Too Many Requests.

Cap the quality at 1080p

yt-dlp -S "res:1080" "URL"

Grabs the best file up to 1080p instead of a 4K one.

List every available format

yt-dlp -F "URL"

Check the format IDs before forcing one.

Download subtitles only

yt-dlp --write-subs --sub-langs "en.*" --skip-download "URL"

Caption files, no media download.

Set a clean output filename

yt-dlp -o "%(title)s.%(ext)s" "URL"

Matters once you grab more than one file.

Use your browser's login cookies

yt-dlp --cookies-from-browser chrome "URL"

For members-only or age-gated videos.

Update yt-dlp

yt-dlp -U

Run this first when a download suddenly breaks.

The failure pattern to avoid

The classic yt-dlp mistake is stacking five flags before confirming the simple version works. That makes debugging slower and hides which flag actually created the problem. Start with the smallest command that matches the task, then add one constraint at a time only when it earns its keep.

For builders

Using yt-dlp inside an app or script?

Paste a link to see what a managed media-import API returns — no install, no signup.

Building this into an app? See the API your backend calls instead

Frequently asked questions

How do I use yt-dlp?

Run yt-dlp followed by the video URL in quotes: yt-dlp "URL". That downloads the best available quality. Add flags only when you need something specific, like -x --audio-format mp3 for audio or -S "res:1080" to cap the quality.

What is the command to download an MP3 with yt-dlp?

Use yt-dlp -x --audio-format mp3 "URL". The -x flag extracts the audio and --audio-format mp3 converts it, which needs ffmpeg installed. If the conversion fails, check ffmpeg before changing anything else.

What does -t do in yt-dlp?

-t (--preset-alias) applies a named set of options, added in yt-dlp 2025.04.30. The presets are mp3 and aac (extract audio in that format), mp4 (prefer H.264 and AAC in an MP4 file), mkv (merge into MKV) and sleep (pause between requests). Older versions print "no such option: -t", so run yt-dlp -U or your package manager's update first.

Is there a full list of yt-dlp commands?

The commands on this page cover the tasks most people need. For the complete set of options run yt-dlp --help, and see the command guide where each one is explained with its common gotchas.

Why does my command download a 4K file I did not want?

yt-dlp picks the best quality by default. Add -S "res:1080" (or another number) to cap it. That grabs the highest quality up to that height instead of the largest file available.

Every command explained

The same commands with the gotchas spelled out, one per task, so you know what each flag changes.

Download playlists

Use this when the job is no longer one file, and organization starts mattering just as much as the command itself.

Download subtitles

Get subtitle files cleanly, including subtitle-only runs and auto-subs when manual captions are missing.

Extract audio as MP3

One of the most common workflows, but also one of the easiest places to trip over ffmpeg and output chaos.

Next places to go