What yt-dlp is and why you might use it

yt-dlp is a command-line tool that downloads video and audio files from websites. It started as a fork of youtube-dl (an older, less frequently updated tool) and now supports hundreds of sites including YouTube, Vimeo, TikTok, Instagram, Twitch, and many others. You run it from your computer's terminal or command prompt rather than through a graphical interface with buttons and menus.

People use yt-dlp to save videos they have the right to download — their own uploads, videos shared under Creative Commons licenses, educational content they want to keep offline, or streams they want to archive before they disappear. It lets you choose the video quality, audio-only format, subtitle language, and output filename rather than accepting whatever a website's download button offers.

yt-dlp is free and open-source, meaning the code is publicly visible and anyone can audit it for security issues. It runs on Windows, macOS, and Linux. Installation takes 10 to 20 minutes the first time, then you use it by typing commands into a terminal.

Key Takeaways

  • yt-dlp requires Python (a programming language) installed first on Windows and macOS; Linux usually has it already.
  • You install yt-dlp itself using pip, a package manager that comes with Python, by typing one command in your terminal.
  • After installation, you download a video by typing a command with the video URL and any options you want, like video quality or audio-only format.
  • The downloaded file saves to your Downloads folder or whichever folder you specify in the command.
  • yt-dlp updates frequently to keep working with sites that change their structure; you update it by running the pip install command again.

Install Python first (Windows and macOS only)

yt-dlp runs on top of Python, a programming language. Linux systems usually have Python installed already, so Linux users can skip to the next section. Windows and macOS users need to install it first.

Go to python.org and click the large yellow download button. This gives you the latest stable version. Run the installer file. On Windows, check the box that says "Add Python to PATH" before clicking Install — this step lets your terminal find Python. On macOS, the installer handles this automatically. The installation takes a few minutes.

To confirm Python installed correctly, open your terminal (Command Prompt on Windows, Terminal on macOS) and type python --version, then press Enter. You should see a version number like "Python 3.12.1". If you see "command not found" or similar, Python did not install correctly; try the installer again or restart your computer.

Install yt-dlp using pip

With Python installed, you now install yt-dlp itself. Open your terminal and type this command exactly:

pip install yt-dlp

Press Enter and wait. pip downloads yt-dlp and its dependencies (other small programs it needs to run). This usually takes one to three minutes depending on your internet speed. When it finishes, you will see a message saying "Successfully installed yt-dlp" or similar.

To confirm the installation worked, type yt-dlp --version and press Enter. You should see a version number. If you see "command not found", try restarting your terminal or computer, then test again.

Download your first video

Now you are ready to download. The basic command is:

yt-dlp "https://www.youtube.com/watch?v=VIDEO_ID"

Replace VIDEO_ID with the actual video ID from the URL. For example, if the full URL is https://www.youtube.com/watch?v=dQw4w9WgXcQ, you would type:

yt-dlp "https://www.youtube.com/watch?v=dQw4w9WgXcQ"

Press Enter. yt-dlp fetches information about the video, shows you the available formats, picks the best one, and downloads it. The file saves to your Downloads folder (or your current folder if you opened the terminal elsewhere). This usually takes a few minutes for a standard video.

Choose video quality and format

By default, yt-dlp downloads the highest quality available. If you want to control this, add format options to your command. To download audio only (useful for music or podcasts), add -f bestaudio:

yt-dlp -f bestaudio "https://www.youtube.com/watch?v=VIDEO_ID"

To download video at a specific resolution like 720p instead of 1080p (saves space), use -f "best[height<=720]". To see all available formats before downloading, add -F (capital F) instead of -f:

yt-dlp -F "https://www.youtube.com/watch?v=VIDEO_ID"

This shows a list of formats with their resolution, file size, and format code. You can then pick one by its code number. For example, if format 22 is listed as "mp4 720p", you would download it with -f 22. Experiment with a short video first to see what options work best for your needs.

Save files with custom names and locations

By default, yt-dlp saves files with the video's original title. To give it a different name, add -o "filename" to your command:

yt-dlp -o "my-video.mp4" "https://www.youtube.com/watch?v=VIDEO_ID"

To save to a specific folder, include the folder path. On Windows, use backslashes:

yt-dlp -o "C:\Users\YourName\Videos\my-video.mp4" "https://www.youtube.com/watch?v=VIDEO_ID"

On macOS or Linux, use forward slashes:

yt-dlp -o "/Users/YourName/Videos/my-video.mp4" "https://www.youtube.com/watch?v=VIDEO_ID"

Create the folder first if it does not exist. You can combine multiple options in one command — for example, audio-only format plus a custom name:

yt-dlp -f bestaudio -o "podcast-episode.m4a" "https://www.youtube.com/watch?v=VIDEO_ID"

Update yt-dlp regularly

Websites change how they work frequently, and yt-dlp needs updates to keep working with them. Update it by running the same pip command you used to install it:

pip install --upgrade yt-dlp

Run this command every few weeks or if you notice yt-dlp stops working on a site. You can also check your current version with yt-dlp --version and compare it to the latest release on the yt-dlp GitHub page if you want to know whether an update is available.

Frequently Asked Questions

What if I get a "command not found" error?

This usually means Python is not installed, yt-dlp did not install correctly, or your terminal does not know where to find them. Try restarting your terminal or computer first. If that does not work, reinstall Python and make sure you checked "Add Python to PATH" on Windows. Then run the pip install command again.

Can I download entire playlists or channels?

Yes. For a playlist, use yt-dlp "https://www.youtube.com/playlist?list=PLAYLIST_ID". yt-dlp downloads all videos in the playlist to your folder. For a channel, use the channel URL. Add -o "%(playlist_index)s-%(title)s.%(ext)s" to number the files in order.

Is it legal to download videos?

That depends on the video and your location. You have the right to download content you created yourself, content under Creative Commons or similar licenses, and content the copyright holder has explicitly allowed you to download. You do not have the right to download copyrighted content without permission. Check the video's license or the creator's terms before downloading.

Why does the download fail on some sites?

Some sites actively block tools like yt-dlp, or they change their structure and yt-dlp has not updated yet. Try updating yt-dlp first. If it still fails, the site may not be supported or may require a newer version. Check the yt-dlp GitHub page to see if others have reported the same issue.

How much disk space do I need?

A one-hour video at 1080p typically takes 500 MB to 2 GB depending on the site and compression. Audio-only files take 50 to 150 MB per hour. Check your available disk space before downloading long videos or playlists.