Save any online video to your computer with yt-dlp
A free tool that saves video or audio from YouTube and 1,700 other sites to your computer with one command. About 15 minutes to set up.
Luís Rodrigues8 min read
Most people try a screen recorder, or search for a "free video downloader" and land on a site full of pop-ups and fake download buttons. The recording comes out blurry, and the site wants your email.
yt-dlp is a free program that runs on your own computer. Volunteers make it and share it on GitHub as public domain, so there's no account and nothing to pay. It works with YouTube and more than 1,700 other sites, including Instagram, Facebook, TikTok, X, Twitch and Vimeo. In about 15 minutes you install it, learn five commands, and set Claude up to run them for you if you'd rather not type. After that, every download is one link and one command.
Before you start
- A Mac or a Windows computer. It doesn't run on phones.
- The Terminal. The window where you type commands: the Terminal app on a Mac, PowerShell on Windows. Every command is written out below.
- Claude Code (optional). The Code tab in the Claude desktop app can run the commands for you. It needs Pro or above (checked September 2026).
The plan · 15 minutes, 5 prompts
- Install it
- Your first download
- Five commands worth keeping
- Let Claude run it
- When it stops working
1. Install it
yt-dlp needs two helpers: ffmpeg, which joins video and sound and makes MP3s, and Deno, which YouTube has required since November 2025. The commands below install all three.
On a Mac: you need Homebrew, a free installer for programs like this. If you don't have it, paste the one-line command from brew.sh into Terminal and follow the prompts. Then run:
brew install yt-dlp ffmpegOn Windows: open PowerShell and run the line below. It brings in ffmpeg and Deno too. When it finishes, close PowerShell and open it again.
winget install --source winget --id yt-dlp.yt-dlpCheck it worked. This should print a date, which is the version:
yt-dlp --versionHeads up: Only install yt-dlp from its GitHub page or with the commands above. Sites called "yt-dlp online" or similar aren't the project, and some bundle malware.
With Claude Code, you can skip the typing. Open the Claude desktop app, click the Code tab, choose Local, and select a folder for your videos. Set the permission mode to Manual, so Claude asks before it runs anything. Then paste:
I want to install yt-dlp on this computer to download videos.
1. Tell me which operating system I'm on.
2. Check whether yt-dlp, ffmpeg and deno are already installed, and show me the version of each.
3. For anything missing, install it with Homebrew on a Mac or winget on Windows. If Homebrew itself is missing, stop and tell me how to install it from brew.sh.
4. Show me each command before you run it and wait for my OK.
5. At the end, run "yt-dlp --version" and confirm everything is in place.2. Your first download
Copy a video's link and type yt-dlp, a space, and the link inside double quotes:
yt-dlp "https://www.youtube.com/watch?v=VIDEO_ID"Keep the quotes: links often contain & or ?, which the Terminal otherwise reads as instructions of its own. yt-dlp picks the best quality and saves the file in whichever folder the Terminal is in, your home folder at first. Add -P to choose another:
yt-dlp -P ~/Downloads "https://www.youtube.com/watch?v=VIDEO_ID"Start with a video of your own, or one whose creator lets you keep a copy.
3. Five commands worth keeping
Each one is yt-dlp, one or two extra words, and the link.
A file that plays everywhere. The best-quality file is often .webm or .mkv, which some phones and PowerPoint won't open. This asks for MP4, which on YouTube usually tops out at 1080p.
yt-dlp -t mp4 "LINK"Audio only, as an MP3. For talks and lectures you only need to hear.
yt-dlp -t mp3 "LINK"A playlist or channel. -I 1:5 takes the first five, and -t sleep pauses between videos so the site doesn't block you.
yt-dlp -t sleep -I 1:5 "PLAYLIST LINK"Just one part. A clip for a slide, from 10:15 to 12:00:
yt-dlp --download-sections "*10:15-12:00" "LINK"The subtitles and nothing else. YouTube's automatic English captions as a text file: the quickest way to a transcript.
yt-dlp --write-auto-subs --sub-langs en --skip-download "LINK"For anything else, describe what you want and let a chatbot write the command. This works in ChatGPT, Claude or any other assistant:
Write a yt-dlp command for me. I'm not technical.
What I want: [DESCRIBE IT, E.G. "THE AUDIO OF THIS TALK AS AN MP3, SAVED IN MY DOWNLOADS FOLDER"]
The link: [PASTE THE LINK]
My computer: [MAC OR WINDOWS]
1. Give me one command I can paste as it is, with the link in double quotes.
2. Under it, explain each part in one plain line.
3. Only use options that exist in the current yt-dlp documentation. If you're not sure an option exists, say so instead of guessing.
4. If what I want needs ffmpeg, tell me.4. Let Claude run it
With Claude Code set up, you don't touch the Terminal. Paste a link, say what you want, and read the command before you approve it.
Use yt-dlp to download this for me.
Link: [PASTE THE LINK]
What I want: [VIDEO, MP4 THAT PLAYS EVERYWHERE, MP3, SUBTITLES ONLY, OR A CLIP FROM MM:SS TO MM:SS]
Save it in: [FOLDER, E.G. "THE VIDEOS FOLDER I SELECTED"]
File name: [A SHORT NAME, OR "KEEP THE VIDEO TITLE"]
1. Show me the exact command first and wait for my OK.
2. Run it and tell me if anything fails, with the error in plain English.
3. When it's done, tell me the file name, where it is and how big it is.
4. Don't use my browser cookies or any account without asking me first.Claude Code can also read what it downloads. This turns an hour-long talk into notes:
Use yt-dlp to download only the English subtitles for this video, with no video file:
[PASTE THE LINK]
Then read the subtitle file and give me:
1. A summary of the talk in 10 bullet points, each with the timestamp where it starts.
2. The three claims I should check before repeating them.
3. Anything the speaker said they'd share, like slides or links.
If the video has no English subtitles, tell me and stop.5. When it stops working
Sites keep changing how they serve video, and yt-dlp's volunteers release fixes regularly. When a download fails, update first: brew upgrade yt-dlp on a Mac, yt-dlp -U on Windows. If it still fails, paste the error into any chatbot:
I ran this yt-dlp command and got an error. I'm not technical.
My computer: [MAC OR WINDOWS]
The command: [PASTE THE COMMAND]
The error: [PASTE THE LAST 10 TO 20 LINES OF WHAT IT PRINTED]
1. Tell me in plain English what went wrong, in two sentences.
2. Give me one fix to try, starting with updating yt-dlp if I haven't.
3. Don't suggest anything that uses my password or my account. If the only fix needs me to sign in, say so and explain the risk.Heads up: Some fixes online add
--cookies-from-browser, which uses your signed-in browser session. For YouTube, the yt-dlp team warns that using your account "runs the risk of it being banned (temporarily or permanently)". Never use it on an account you can't afford to lose.
Common mistakes
- Leaving out the quotes. The link breaks at the first
&. Put double quotes around every link. - Skipping ffmpeg. You get separate video and sound files, and no MP3. On a Mac, install
yt-dlp ffmpeg, not justyt-dlp. - Downloading a whole channel at full speed. Sites block you for a while. Add
-t sleepand use-Ito take a few at a time.
The honest part
- YouTube's terms forbid most downloading. Its terms don't allow it except where YouTube offers a way or gives written permission, and other platforms have similar rules. Copyright stays with the creator, and whether a private copy is legal depends on your country. When a platform has its own download button, like YouTube Premium, that's the one its terms allow. This isn't legal advice: when in doubt, ask the creator.
- Paid streaming is off the table. Netflix, Disney+ and similar services use copy protection that yt-dlp doesn't support, and copying paid courses or re-uploading other people's videos isn't what it's for.
- Not every site works on a given day. Of the 1,731 entries in yt-dlp's supported sites list, 136 were marked "currently broken" in September 2026.
- An agent runs real commands on your computer. Keep Claude Code in Manual mode. A download command starts with
yt-dlp. If Claude wants to delete files or change settings to make one work, say no and ask why. - Automatic captions mishear names and numbers, and a summary inherits those mistakes. Check a quote against the video before you use it.
Your action plan
- Install yt-dlp and run
yt-dlp --version. - Download one video of your own, or a Creative Commons one.
- Save the audio of a talk you want to hear with
yt-dlp -t mp3 "LINK". - Set up Claude Code and run "Download this for me", or keep step 3's commands to hand.
Run step 1 tonight.
- #tools
- #video
- #claude