Hi, I'm Rahul. I'm documenting what I learn while building products.
How to Download Videos With yt-dlp
A beginner-friendly guide to saving videos, playlists, or audio on a Mac or Windows computer.
yt-dlp is a free tool that can save videos from YouTube and many other supported websites to your computer.
You type a short instruction into Terminal on a Mac or PowerShell on Windows. The tool then finds the video and downloads it for you.
The first setup takes a few minutes. After that, you only need the video link.
What gets installed?
yt-dlp downloads the video.
FFmpeg joins the best video and audio together and can create MP3 files.
Deno helps yt-dlp work properly with YouTube.
You install these once. You do not need to understand how they work internally.
Set it up on a Mac
Press Command + Space, type Terminal, and open it.
Copy the command below, paste it into Terminal, and press Return:
brew install yt-dlp ffmpeg deno
Wait until the command finishes. If your Mac says brew: command not found, install Homebrew from its official website first, then run the command again.
Set it up on Windows
Open the Start menu, type PowerShell, and open it.
Copy and run these three commands one at a time. Press Enter after each command and wait for it to finish before running the next one.
winget install yt-dlp winget install Gyan.FFmpeg winget install DenoLand.Deno
Download your first video
Open the video in your browser and copy its web address.
Replace VIDEO_URL in the command below with that address. Keep the quotation marks.
Mac — save it in Downloads
yt-dlp -P ~/Downloads "VIDEO_URL"
Windows — save it in Downloads
yt-dlp -P "$HOME/Downloads" "VIDEO_URL"
Press Return or Enter. yt-dlp will download the best quality it can find and place the finished file in your Downloads folder.
Download a playlist
Paste a playlist address instead of a single video address. yt-dlp will try to download every video in that playlist.
Mac
yt-dlp -P ~/Downloads "PLAYLIST_URL"
Windows
yt-dlp -P "$HOME/Downloads" "PLAYLIST_URL"
Large playlists can take a long time and use a lot of storage, so check the playlist before starting.
Download only the audio
Use this when you want an MP3 file instead of a video.
Mac
yt-dlp -P ~/Downloads -x --audio-format mp3 "VIDEO_URL"
Windows
yt-dlp -P "$HOME/Downloads" -x --audio-format mp3 "VIDEO_URL"
Use it with Claude Code
If Claude Code is already open on your computer, you can describe what you want in normal language. Claude can prepare the command and ask for permission before running it.
Download this video using yt-dlp and save it in my Downloads folder. VIDEO_URL
Download this entire playlist using yt-dlp. Save it in a new folder inside my Downloads folder. PLAYLIST_URL
If it stops working
Websites change over time, so an older version of yt-dlp may stop working. Updating it often fixes the problem.
Mac
brew upgrade yt-dlp
Windows
winget upgrade yt-dlp
Remember these four steps
1. Install the three tools once.
2. Copy the video address.
3. Put that address where the command says VIDEO_URL.
4. Run the command and look in your Downloads folder.
Only download content you own, content that is licensed for download, or content you have permission to save. Follow the website's terms and the laws that apply to you.