ytdlp.org
On this page

Tutorial

How to use yt-dlp

yt-dlp is a command-line program that downloads video and audio from YouTube and more than a thousand other sites. You give it a link, it gives you a file. This tutorial covers the handful of commands that do most of the work, in the order you'll need them.

Quick answer

yt-dlp "<VIDEO URL>"

That downloads the best quality available into the current folder. Put the link in quotes: links with & or ? in them break in most shells otherwise. Don't have it yet? Follow the install guide first, and install ffmpeg with it: yt-dlp needs it to merge video and audio and to convert to MP3.

1. Your first download

We ran these commands with yt-dlp 2026.10.26 in November 2026, on a public SoundCloud track and an Internet Archive video so you can try them too:

yt-dlp "https://soundcloud.com/forss/flickermood"

[download] Destination: Flickermood [293].m4a
[download] 100% of    4.12MiB in 00:00:05

The file lands in the folder you ran the command from, named Title [id].ext. The ID in brackets keeps two videos with the same title from overwriting each other. To save somewhere else, add -P:

yt-dlp -P ~/Downloads "<VIDEO URL>"

2. See what qualities exist with -F

-F lists every format a video offers without downloading anything:

yt-dlp -F "https://archive.org/details/BigBuckBunny_124"

ID EXT RESOLUTION |   FILESIZE PROTO
-------------------------------------
0  ogv 533x300    |   44.76MiB https
1  mp4 640x360    |   59.01MiB https
2  avi 1280x720   |  316.85MiB https

On YouTube the list is much longer, with separate video-only and audio-only formats that yt-dlp merges for you. You can download one by its ID with -f 1, but it's usually easier to describe what you want.

3. Pick a quality

Ask for the best file at or below a resolution:

# best single file no taller than 360p (picked format 1, 640x360 mp4)
yt-dlp -f "b[height<=360]" "<VIDEO URL>"

# prefer 720p, fall back to the closest if it doesn't exist
yt-dlp -S "res:720" "<VIDEO URL>"

-f filters formats and fails if nothing matches; -S sorts them and always picks something. If you want MP4 files that play everywhere, the format selection guide has the exact command, and "Requested format is not available" explains the error you get when a filter matches nothing.

4. Download only the audio

yt-dlp -x --audio-format mp3 "https://soundcloud.com/forss/flickermood"

[ExtractAudio] Destination: Flickermood [293].mp3
Deleting original file Flickermood [293].m4a (pass -k to keep)

-x keeps only the audio and --audio-format mp3 converts it with ffmpeg. Leave the format off to keep the original audio without re-encoding. Bitrate, cover art and whole playlists as MP3 are in extract audio as MP3.

5. Name the files yourself

yt-dlp -x --audio-format mp3 -o "%(uploader)s - %(title)s.%(ext)s" \
  "https://soundcloud.com/forss/flickermood"

[ExtractAudio] Destination: Forss - Flickermood.mp3

-o takes a template: anything in %(...)s is filled in from the video's details, and slashes make folders. Always end with .%(ext)s so the extension matches the file. More fields and folder layouts are in output templates.

6. Playlists and channels

Give yt-dlp a playlist or channel link and it downloads every entry. To check what it will get first, print the titles without downloading:

yt-dlp --playlist-items 1:3 --print "%(playlist_index)s %(title)s" \
  "https://soundcloud.com/forss/sets/soulhack"

1 City Ports
2 Soulhack
3 Funk for Nerds

Drop --print to download them. --playlist-items takes ranges like 1:3 or lists like 1,4,7. See download playlists for folders per playlist, and --download-archive to fetch only new videos on the next run.

7. Keep it updated

Sites change often and yt-dlp releases fixes every few weeks, so "it worked last month" usually means "update me". How you update depends on how you installed it:

yt-dlp -U                      # standalone binary
python3 -m pip install -U "yt-dlp[default]"   # pip
brew upgrade yt-dlp            # Homebrew

yt-dlp -U only works for the standalone binary; on a pip install it tells you to update with pip instead. Updating yt-dlp covers each install method and the nightly builds.

8. Getting help

yt-dlp --help prints every option for the version you have installed (several hundred lines), so search it rather than reading it top to bottom:

yt-dlp --help | grep -i subtitle     # macOS / Linux
yt-dlp --help | findstr /i subtitle  # Windows

When a download fails, add -v and read the last lines: they name the site, the yt-dlp version and the actual error. The common errors guide matches the usual messages to their fixes, and the commands cheat sheet has the options people use most. If you type the same options every time, put them in a config file.

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 for the first time?

Install it (and ffmpeg), open a terminal and run yt-dlp followed by the link in quotes: yt-dlp "URL". It downloads the best quality it can into the folder you ran it from, named "Title [id].ext".

Where does yt-dlp save files?

In the folder your terminal is in when you run it. Use -P to pick a folder (yt-dlp -P ~/Downloads "URL") or -o to set the folder and file name together.

How do I download only the audio with yt-dlp?

Use -x with an audio format: yt-dlp -x --audio-format mp3 "URL". It needs ffmpeg installed to convert the audio.

Does yt-dlp have a graphical interface?

No, yt-dlp is a command-line program. Third-party apps put a window around it, but every option in this guide works the same from a terminal on Windows, macOS and Linux.

Where is the yt-dlp manual?

Run yt-dlp --help for the full list of options in your installed version. The README in the yt-dlp GitHub repository has the same options with longer explanations, and the guides on this site cover common tasks with tested commands.

Why does yt-dlp say a format or video is unavailable?

Usually the site changed something and your yt-dlp is out of date, or the format you asked for doesn't exist for that video. Update yt-dlp first, then run yt-dlp -F "URL" to see what is actually available.

Next steps