YT-DLP Guide

yt-dlp is a command-line tool for downloading videos from YouTube and thousands of other websites. It is a community-maintained fork of the original Youtube-Dl, and was made in response to its increasingly sluggish development. Since its creation in 2021, Yt-dlp has spawned many forks of its own, such as the Gallery-Dl script for image aggregators. Unlike browser-extensions that promise to do the same thing, this script is well-documented and beloved by its users.

While YT-DLP is a terminal program, most of the setup happens outside the command line and once you're in, you can download entire playlists with a single copy-pasted command.

Section Menu

Further Reading

yt-dlp GitHub Full Documentation

Part 1: Setting the Scene

Before you begin, you'll need to download three things.

yt-dlp executable (.exe)
Download from the yt-dlp releases page on GitHub. You want the Windows .exe file..
FFmpeg
This is the mechanism that converts audiovisual streams into a single file. You'll want the essentials build (31MB) from gyan.dev — look for ffmpeg-git-essentials.7z. A full build (150MB) is also available there, as is an alternative download from ffmpeg.org.
7-Zip
In case your computer doesn't have a means of extracting your FFmpeg folder from its ZIP, download 7-zip.org.

Step 1: Creating the folder

  1. This is where yt-dlp and FFmpeg will reside, as with your outputs from the terminal. I put mine in my videos folder, so for me, it lives in C:\Users\YourUsername\Videos\YT-DLP Stuff\
  2. Download yt-dlp.exe from GitHub and move it into your new folder.
  3. Download the FFmpeg essentials .7z file.
  4. Extract it (right-click > Extract All, or use 7-Zip).
  5. Open the extracted folder and find the bin subfolder.
  6. Copy these three files from bin\ into your YT-DLP folder:
    • ffmpeg.exe
    • ffprobe.exe
    • ffplay.exe
  7. You can delete the extracted FFmpeg folder and .7z file afterwards.

You've now created a folder for your video-ripping purposes! It should now contain: yt-dlp.exe, ffmpeg.exe, ffprobe.exe, and ffplay.exe. Right now it won't function, as Windows doesn't know where to find it. We'll be sorting that in Step 2, where we add the folder to Windows PATH. This isn't the terminal work yet, but it requires a brief detour into the Advanced System Settings.

Step 2: Adding the folder to Windows PATH

Important: Do not replace an existing PATH variable, this will break other programs on your system. You want to be adding to the selection, not modifying it.

  1. Right-click This PC or My Computer on your desktop and select Properties.
  2. Click Advanced system settings, then Environment Variables.
  3. Under User variables, look for a variable called PATH:
    • If PATH already exists (most systems): Select it, click Edit, then click New and paste your folder path. Click OK.
    • If PATH does not exist: Click New, set the variable name to PATH, and paste your folder path as the value. Click OK.
  4. Click OK again to close the remaining windows.

Step 3: Testing Yt-dlp in the terminal

  1. Close any open Command Prompt windows if you haven't already, then open a fresh one.
  2. Press Windows key + R, type cmd, and press Enter.
  3. Type yt-dlp --version and press Enter.
  4. If you see a version number, your copy of yt-dlp is up and running!

Part 2: Using yt-dlp

  1. Open Command Prompt and type:
    yt-dlp "https://www.youtube.com/watch?v=VIDEO_ID"
  2. Replace VIDEO_ID with the actual video ID from the URL. The video will download to whichever folder you're currently in. To check where that is, type cd. To change folders before downloading:
  3. cd C:\Users\YourUsername\Videos\YT-DLP Stuff
    yt-dlp "https://www.youtube.com/watch?v=VIDEO_ID"

Prefixes

yt-dlp and scripts like it are highly customisable, and come with many methods for precise downloading. While you can use their help commands to see them for yourself, I've provided them below for your convenience.

Best quality (merges best video + best audio, requires FFmpeg)
yt-dlp -f "bestvideo+bestaudio" "URL"
Best quality, output as .mp4 (some players struggle with the default .mkv)
yt-dlp -f "bestvideo+bestaudio" --merge-output-format mp4 "URL"
Best single file (no merge needed, but often capped at 720p)
yt-dlp -f best "URL"
Custom filename
yt-dlp -o "%(title)s.%(ext)s" "URL"
List available formats
yt-dlp -F "URL"
Download entire playlist
yt-dlp "PLAYLIST_URL"
See all options
yt-dlp --help

Part 3: Troubleshooting & Tips

"yt-dlp is not recognized"
  1. Make sure you restarted Command Prompt after adding the PATH.
  2. Check that your PATH entry is correct and uses your actual username.
  3. Make sure you edited rather than replaced your existing PATH variable.
  4. Try typing the full path directly: "C:\Users\YourUsername\Videos\YT-DLP Stuff\yt-dlp" --version
FFmpeg not found errors
Make sure ffmpeg.exe and ffprobe.exe are in the same folder as yt-dlp.exe, then restart Command Prompt.
Video won't merge properly
Make sure ffmpeg.exe is in the PATH or the same folder as yt-dlp.exe. Try downloading without the merge option first: yt-dlp -f best "URL"

Tips

  1. Always navigate to your desired download folder before running yt-dlp, or use -o with a full path to control where files end up.
  2. Use --merge-output-format mp4 if your video player can't handle .mkv files.
  3. Update yt-dlp easily by running: yt-dlp -U
  4. When downloading entire playlists, yt-dlp will create a folder with numbered files (e.g., 01 - Video Title, 02 - Video Title), making it easy to keep them organized.
  5. FFmpeg is useful for other video tasks too, not just yt-dlp.
  6. yt-dlp works with many sites beyond YouTube — Vimeo, Twitter, and thousands more.

Conclusion

Congratulations! You can now download videos from the command line! For more information, visit the yt-dlp GitHub or browse the full documentation.