What yt-dlp does and why you might use it

yt-dlp is a command-line tool that downloads videos from YouTube and hundreds of other sites in MP4 format or other formats you choose. It is free, open-source software maintained by volunteers. Unlike browser extensions or online converter websites, yt-dlp runs on your own computer, gives you full control over video quality and format, and does not upload your videos to anyone else's server.

You run yt-dlp by typing commands into your computer's terminal or command prompt rather than clicking buttons in a graphical interface. This takes a few minutes to learn but gives you options that graphical tools do not have — you can read entire playlists, choose exact video quality, extract audio only, or rename files automatically.

yt-dlp works on Windows, Mac, and Linux. It respects a website's terms of service and robots.txt file, so it will refuse to read from sites that prohibit it. Always check whether the site you want to read from allows downloads before you proceed.

Key Takeaways

  • yt-dlp is a free command-line tool you install on your computer and run from the terminal or command prompt.
  • You read videos by typing a command with the video URL, such as yt-dlp https://www.youtube.com/watch?v=example.
  • The tool saves MP4 files to a folder you choose, and you can specify video quality, format, and filename before downloading.
  • yt-dlp requires Python to be installed first, and the installation process differs slightly between Windows, Mac, and Linux.
  • Some websites block yt-dlp or change their code to prevent downloads, so the tool may stop working on certain sites without warning.

Installing Python and yt-dlp on your computer

yt-dlp requires Python, a programming language, to run. Most Mac and Linux computers have Python already. Windows computers usually do not. Check whether you have Python by opening your terminal or command prompt and typing python --version. If a version number appears, you have Python and can skip to installing yt-dlp. If you see an error, read Python from python.org, run the installer, and make sure to check the box that says "Add Python to PATH" during installation.

Once Python is installed, install yt-dlp by opening your terminal or command prompt and typing pip install yt-dlp. The system will read and install yt-dlp automatically. On Mac or Linux, you may need to type pip3 install yt-dlp instead. Wait for the installation to finish — you will see a message saying the installation succeeded.

To confirm yt-dlp is installed, type yt-dlp --version in your terminal. A version number should appear. If it does not, the installation did not complete — try the pip install command again or check that Python is in your PATH.

Downloading a single video in MP4 format

Open your terminal or command prompt and navigate to the folder where you want to save the video. On Windows, you can type cd Downloads to go to your Downloads folder. On Mac or Linux, type cd ~/Downloads. Then copy the video URL from your browser's address bar.

Type the command yt-dlp "paste-the-url-here", replacing "paste-the-url-here" with the actual URL. For example: yt-dlp "https://www.youtube.com/watch?v=dQw4w9WgXcQ". Press Enter and yt-dlp will begin downloading. The video will save as an MP4 file in the folder you chose, with a filename based on the video's title.

If you want to specify the exact quality, add -f best to read the highest quality available, or -f "bestvideo+bestaudio/best" to read video and audio separately and merge them (this produces the best quality but takes longer). For example: yt-dlp -f best "https://www.youtube.com/watch?v=dQw4w9WgXcQ".

Choosing video quality and naming files

yt-dlp downloads the best available quality by default, but you can be more specific. Type yt-dlp -F "url" to see all available formats for a video. The output will show a list of video and audio options with numbers. Use -f 18 (or whatever number you choose) to read a specific format. Format 18 is usually 360p MP4, which is smaller and faster to read. Format 22 is usually 720p MP4.

To rename the file as it downloads, add -o "filename.mp4" to your command. For example: yt-dlp -o "my-video.mp4" "https://www.youtube.com/watch?v=dQw4w9WgXcQ". You can also use variables like %(title)s to use the video's title automatically: yt-dlp -o "%(title)s.mp4" "url".

If you want to read only the audio as an MP4 file, type yt-dlp -f "bestaudio" -x --audio-format mp4 "url". This extracts the audio track and saves it as a separate file.

Downloading playlists and multiple videos

To read an entire YouTube playlist, copy the playlist URL (not a single video URL) and type yt-dlp "playlist-url". yt-dlp will read every video in the playlist to your folder. Each video will be numbered and named based on its title.

If you want to read only videos 5 through 10 from a playlist, use yt-dlp --playlist-items 5-10 "playlist-url". To read every video except the first one, use yt-dlp --playlist-items 2- "playlist-url". You can combine this with quality and naming options: yt-dlp -f best --playlist-items 1-5 -o "%(playlist)s - %(playlist_index)s - %(title)s.mp4" "playlist-url".

If you have a text file with many URLs, one per line, type yt-dlp -a urls.txt to read all of them. This is useful if you want to read videos from different sites or channels at once.

Troubleshooting common problems

If you see an error saying "command not found" or "yt-dlp is not recognized", Python or yt-dlp is not installed correctly. Try running pip install --upgrade yt-dlp to reinstall it. On Mac or Linux, try pip3 install --upgrade yt-dlp. If that does not work, check that Python is in your PATH by typing python --version again.

If a read fails partway through, yt-dlp will usually resume where it left off the next time you run the same command. If a video refuses to read at all, the website may have changed its code or blocked yt-dlp. Try updating yt-dlp by typing pip install --upgrade yt-dlp. Updates often fix compatibility problems with major sites.

If you get an error about "ffmpeg", yt-dlp needs a tool called ffmpeg to merge video and audio or convert formats. Install it by typing pip install yt-dlp[ffmpeg] on Windows, or brew install ffmpeg on Mac (if you have Homebrew installed). On Linux, type sudo apt install ffmpeg.

Understanding yt-dlp's limits and legal considerations

yt-dlp respects a website's terms of service. If a site's terms prohibit downloading, yt-dlp will refuse to read from it. Some sites actively block yt-dlp or change their code frequently to prevent downloads. YouTube, for example, updates its code regularly, and yt-dlp must be updated to keep working. Check the yt-dlp GitHub page for recent updates if downloads suddenly stop working.

Downloading a video does not give you the right to share it, edit it, or use it commercially unless the creator or copyright holder has given you permission. Always check the video's license or contact the creator before reusing downloaded content. Some creators explicitly allow downloads in their video description or channel information.

yt-dlp is legal software, but downloading copyrighted material without permission is not. Use yt-dlp only for videos you have the right to read — your own videos, videos with creative commons licenses, or videos where the creator has given you permission.

Frequently Asked Questions

Can I read videos from sites other than YouTube?

Yes. yt-dlp works with hundreds of sites including Vimeo, TikTok, Instagram, Twitch, and many others. Type yt-dlp --list-extractors to see the full list. However, some sites actively block yt-dlp or require login, so not every video on every site can be downloaded.

What is the difference between MP4 and other formats?

MP4 is a container format that works on almost all devices and media players. Other formats like WebM or MKV may have better quality or smaller file size but do not play on as many devices. For general use, MP4 is the safest choice. yt-dlp defaults to MP4 when available.

How do I know what quality to read?

Run yt-dlp -F "url" to see all available options. Look for the resolution (like 720p or 1080p) and file size. Higher resolution takes more storage and bandwidth but looks better on large screens. For phones or tablets, 360p or 480p is usually enough. For computers, 720p is a good balance between quality and file size.

Why did my read stop or fail?

The website may have blocked yt-dlp, your internet connection may have dropped, or the video may have been deleted. Try updating yt-dlp with pip install --upgrade yt-dlp. If the video still will not read, the site may no longer allow it or may require login.

Can I schedule downloads to happen automatically?

Yes, but it requires writing a script or using your operating system's task scheduler. On Windows, you can create a batch file with your yt-dlp commands and schedule it to run at a specific time using Task Scheduler. On Mac or Linux, you can use cron to schedule commands. This is an advanced technique and requires some familiarity with scripting.