You must install yt-dlp before downloading videos from YouTube (or any other sites).
Open a command line by pressing Start, write cmd, press Enter.
Navigate to the folder where you downloaded yt-dlp.exe.
The working folder is D:\GIT\SCRIPTS\GET_VIDEO
To change the current folder, enter the command cd D:\GIT\SCRIPTS\GET_VIDEO, pressing Enter;
Replace the path with your working folder
In here, run the command: yt-dlp VIDEO_LINK
Here are the steps:
Replace video-link with the actual link of the video you want to download.
And because we don’t want to always run yt-dlp from the command line, we will …
Create A YouTube Download Script
You will run this script everytime you want to download a video or playlist from YouTube.
We write the script once. And replace only the video link when downloading a new video.
Open Windows Explorer and navigate to your working folder.
In our case, this was D:\GIT\SCRIPTS\GET_VIDEO
Create a New Text File Here.
Name it GET_VIDEO.bat
The extension of the file must end with .BAT, not .TXT!
If your file extensions are hidden, the file might incorrectly be named GET_VIDEO.bat.txt
Open GET_VIDEO.bat with Notepad (or any other text editor).
Do not double click it, as it will try to run it.
.Bat files are batch files and yhey execute programs from the command line.
This is how my script looks like:
The first line – @echo off is something most batch scripts start with.
And the last line – pause will make the script wait so you can see the results of the download.
What interests you is the line in the middle
yt-dlp LINK
This is the one you will update everytime you want to download a video.
Getting The YouTube Download Link
From under the video you want to download, click on Share.
Then when this small popup shows, press copy.
Now you have the link ready to be copied.
Go back to your GET_VIDEO.bat file in Notepad.
And replace the link.
Save the batch file.
And double click it in explorer.
It should start downloading!
Running The Download Script
This is how the script looks like in action:
Final Thoughts
The script is not limited to YouTube videos.
It can download videos from other sites, too.
Also, if you want to download multiple videos at once, you can add multiple download in the script.
Each new link on a new line.
Also, the videos will download as a .webm format.