PDF download Download Article
Easily install yt-dlp, the latest version of yt-dl, on your PC or Mac
PDF download Download Article

YouTube-dl was a small command-line program you could use to download videos from YouTube as well as other video sites. While the original YouTube-dl is no longer maintained, there's an actively-developed replacement called yt-dlp that works just like it. Like YouTube-dl, yt-dlp is not platform-specific, so it will work on Linux, Windows, and Mac. It is also free and open source, so you don't have to pay to use it. This wikiHow article will teach you how to install and use the latest fork of YouTube-dl, yt-dlp.

Use YT-DLP, the Replacement for YT-DL

  • YouTube-dl, also known as yt-dl, is no longer updated or secure. Instead, use a fork of the original command-line program called yt-dlp.
  • Before installing yt-dlp, install FFmpeg so you can extract audio files and access more post-processing options.
  • On Windows, type "winget install yt-dlp" into the command prompt to install. On Linux & Mac, install it through your package manager or Homebrew.
Section 1 of 5:

Using YouTube-dl (yt-dlp)

PDF download Download Article
  1. 1
    Open the Terminal or Command Prompt. If you are using Windows, open the Command Prompt . If you are using a Mac, open the Terminal in the Utilities folder or use the Spotlight search bar. On Linux, press Ctrl + Alt + T to open a Terminal.
    • If you haven't installed yt-dlp yet, you will need to do that first. Follow the install instructions for Windows , Mac , and Linux .
    • If you just installed yt-dlp on your Mac or Linux machine, open a new Terminal instead of reusing the one you used to install yt-dlp.
  2. yt-dlp will download the videos to whichever folder you are in in the Terminal or Command Prompt. To change directories in the Terminal , type cd <directory location> and press Enter or Return .
    Advertisement
  3. Go to the YouTube video you want to download in your preferred web browser, and copy the URL from the address bar. To copy, highlight the URL, right-click it (or Ctrl-click if you're using a Mac), then select Copy .
  4. 4
    Download a video: Enter the following command in the Terminal or Command Prompt:
    • Type yt-dlp <url_to_video> and press Enter or Return .
      • To paste the video URL, press Ctrl + V on a PC, or Command + V on a Mac.
    • This will download the video without subtitles or a description. It automatically chooses the best video and audio quality.
  5. 5
    Download audio only. If you only want to save the audio from a YouTube video as an MP3, MP4, or other format, you can use the -x option: [1]
    • yt-dlp -x <url_to_video> : This downloads the audio as an m4a file.
    • If you'd rather download a different audio format, such as MP3, you can specify the format with this command: yt-dlp -x --audio-format mp3 < url_to_video> .
    • If you're having trouble downloading audio, make sure you’ve installed FFmpeg .
  6. 6
    Download a playlist. You will need to copy the URL to the playlist , then use one of the following commands to download a playlist: [2]
    • Download a playlist in order: yt-dlp <url_to_playlist>
    • Download playlist in reverse order: yt-dlp --playlist-reverse <url_to_playlist>
    • Download playlist in random order: yt-dlp --playlist-random <url_to_playlist>
    • Download a section of a playlist: yt-dlp --playlist-start <number> --playlist-end <number> <url_to_playlist>
  7. 7
    Download a specific video or audio format. Use the following commands to download a video in a specific audio or video format: [3]
    • List available formats: yt-dlp --list-format <url_to_video>
      • This lists available formats and their codes. You'll use the code to download that particular format.
    • Download a specific format: yt-dlp -format <format_code> <url_to_video>
    • Merging formats: Sometimes you can get better quality by merging a video format with an audio-only format. Sometimes, there are even only video-only formats and audio-only formats. In that case, you can merge two formats into a single file. To merge two formats, type yt-dlp -f <video format code> + <audio format code> <format output> <url_to_video> and press Enter or Return .
      • Note that the order is not interchangeable. Specifying the audio first and then the video will result in an error. Format outputs can be "mkv," "mp4," "ogg," "webm," and "flv."
  8. 8
    Download information about a video. This is useful when you only want to get some information, such as a list of the subtitles or the thumbnail picture, but not the video itself. Type yt-dlp --skip-download <url_to_video> and press Enter to download information about the video.
  9. 9
    Download the subtitles. Use the following commands to download subtitles for a video:
    • List all available subtitles: yt-dlp --list-subs <url_to_video>
    • Download subtitles: yt-dlp --write-sub <url_to_video>
    • Download automatically generated subtitles: yt-dlp ---write-auto-sub <url_to_video>
    • Download all subtitles: yt-dlp --all-subs <url_to_video>
    • Specify subtitle language: yt-dlp --sub-lang <language tag(s)><url_to_video>
      • You can download more than one language at a time. Separate each language tag with a comma.
  10. Use one of the following commands to get additional information about a video:
    • Download video description: yt-dlp --write-description <url_to_video>
    • Download video metadata: yt-dlp --write-info-json <url_to_video>
    • Download annotations: yt-dlp --write-annotations <url_to_video>
    • Download thumbnail image: yt-dlp --write-thumbnail <url_to_video>
  11. If you want to download a video that is restricted in your country, you can still do so using a proxy server. You can find a list of free proxy servers at free-proxy.cz/en/ . Some may work, and some may not. It may take several tries. Use the following steps to download a geo-restricted video: [4]
    • Type yt-dlp --proxy <proxy IP address>:<port number> <url_to_video>
    • Type yt-dlp --geo-verification-proxy <proxy IP address>:<port number> <url_to_video>
    • Type yt-dlp --geo-bypass <url_to_video>
    • Type yt-dlp --geo-bypass-country <ISO country code> <url_to_video>
  12. Advertisement
Section 2 of 5:

Installing yt-dlp on Windows

PDF download Download Article
  1. While these are technically optional, they are highly recommended by the developers of yt-dlp for one big reason: If you want to be able to extract audio from video, convert YouTube videos to MP3 and other formats, or merge separate audio and video files, you'll need them. Fortunately, FFprobe comes with FFmpeg, so if you already have FFmpeg, you have FFprobe. If you don't have either, go to How to Install FFmpeg on Windows for simple installation instructions. [5]
  2. 2
    Open the Windows Command Prompt. The easiest way to install yt-dlp is to use the Winget package manager built into Windows 10 & 11. To use it, you'll need to type some commands at the command line. Begin by pressing the Windows key, typing cmd , and clicking Command Prompt in the search results.
  3. 3
    Type winget install yt-dlp and press Enter . This downloads and installs yt-dlp and adds the necessary path environment variables so you can easily run yt-dlp from the command line. [6]
    • Once installed, you can update yt-dlp at any time using the command winget upgrade yt-dlp .
    • Close the current command prompt window before you try to use yt-dlp. You'll need to start from a fresh command prompt window.
  4. Advertisement
Section 3 of 5:

Installing yt-dlp on Mac

PDF download Download Article
  1. You can find it in the Utilities folder and on your Launchpad. [7]
  2. If you haven't already installed Homebrew, you can do so easily in the Terminal. Homebrew is an open-source package management system for Mac that allows you to install applications. To install Homebrew: [8]
    • Type or paste /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)" into the Terminal.
    • Press Return .
  3. While these are technically optional, they are recommended by the developers of yt-dlp for one big reason: If you want to be able to extract audio from video, convert YouTube videos to MP3 and other formats, or merge separate audio and video files, you'll need them. Fortunately, FFprobe comes with FFmpeg, so if you already have FFmpeg, you have FFprobe. If you don't have either, you can install them now with Homebrew: [9]
    • Type brew install ffmpeg .
    • Press Return .
  4. Now that you have Homebrew and FFmpeg/FFprobe, you can install yt-dlp by typing brew install yt-dlp into the Terminal and pressing Return . It may take a while to download and install yt-dlp.
  5. YouTube videos are usually stored in the FLV or MP4 formats, and you can use a media player such as VLC player to view your videos. You can download the VLC multimedia player .
    • QuickTime, the built-in media player on macOS, can play MP4 videos but not FLV. You’ll need a third-party app if you want to watch FLV files.
  6. Advertisement
Section 4 of 5:

Installing yt-dlp on Linux

PDF download Download Article
  1. If you want to be able to convert YouTube videos to audio or extract audio from videos, you'll need to download FFmpeg, which also comes with FFprobe. You can get it from your distro's package manager. [10]
    • For example, if your distribution uses apt like Debian and Ubuntu , install FFmpeg by typing sudo apt install ffmpeg and pressing Enter .
    • If you're using Arch Linux, use sudo pacman -S ffmpeg .
  2. 2
    Install yt-dlp. Now, you can download yt-dlp from your distribution's package manager: [11]
    • Using apt:
      • First, you'll need to add the PPA. Type or paste sudo add-apt-repository ppa:tomtomtom/yt-dlp and press Enter .
      • Then, run sudo apt update , followed by sudo apt install yt-dlp .
    • Using Snap: sudo snap install --edge yt-dlp
    • Using pacman: sudo pacman -Syu yt-dlp
  3. YouTube videos are stored in different formats; some of the most common are MP4, MKV, and WEBM. To view the videos, you need a media player. Some options are MPV or VLC. You can install these through your system's package manager. Use the following steps to download and install VLC:
    • Type sudo apt update and press Enter to update your software repository.
    • Type sudo apt install vlc or sudo apt install mpv , depending on which program you want to install. Then press Enter .
  4. Advertisement
Section 5 of 5:

FAQ

PDF download Download Article
  1. 1
    Does YouTube-dl still exist? While you can technically still download the old YouTube-dl from their GitHub, it is no longer maintained. We don't recommend using it, as it likely won't work for most websites.
  2. 2
    What has replaced YouTube-dl? The best replacement is yt-dlp, a fork of YouTube-dl that uses the same commands. If you're used to YouTube-dl, you'll have no trouble adapting to yt-dlp.
  3. 3
    Which YouTube downloader is still working? Yt-dlp is the best option for downloading YouTube videos at the command line, but you'll also find plenty of graphical YouTube downloaders that still work. Some popular choices are 4K Video Downloader, NewPipe, and 5K Player.
  4. Advertisement

Expert Q&A

Ask a Question
      Advertisement

      Tips

      • Besides YouTube, you can also use yt-dlp to download from many other sites such as Bilibili, Facebook, TikTok, and Vimeo. You can see all sites it can download with the command yt-dlp --list-extractors . [12]
      • See the yt-dlp documentation for a full reference. On Linux, you can open the documentation with man yt-dlp . You can also find the documentation on yt-dlp's GitHub .
      • Downloading monetized videos (videos with ads at the start) will mean that when you watch the video offline, the channel that posted the video will not receive any money. Take this into consideration when downloading videos.
      Submit a Tip
      All tip submissions are carefully reviewed before being published
      Name
      Please provide your name and last initial
      Thanks for submitting a tip for review!
      Advertisement

      About This Article

      Thanks to all authors for creating a page that has been read 543,234 times.

      Is this article up to date?

      Advertisement