Download YouTube Videos Using CMD with youtube-dl

kashifnaeem

Learner
Joined
Mar 1, 2015
Messages
78
Reaction score
21
youtube-dl is an open source command line tool which is used to download YouTube videos on your computer. you can check available formats and resolution of particular video before download. youtube-dl requires the Python interpreter, version 2.6, 2.7 or 3.2+ (for Linux only), and is not platform specific. It should work on Linux, Windows & Mac OS X. youtube-dl is released into the public domain, which means that you can modify it, redistribute it or use it as you like.
I used to download some music videos and video lectures from YouTube. What I interested was only audio and the HD Resolution.

How to Install youtube-dl on Windows & Linux
To install it on any Linux Distribution (Ubuntu, Mint, etc), type:-







1.sudo curl-Lhttps://yt-dl.org/downloads/latest/youtube-dl-o/usr/local/bin/youtube-dl
-o /usr/local/bin/youtube-dl



2.sudo chmod chmod a+rx /usr/local/bin/youtube-dl

If you do not have curl, you can alternatively use a recent wget:-


1.sudo wget https://yt-dl.org/downloads/latest/youtube-dl -O /usr/local/bin/youtube-dl


2.sudo chmod chmod a+rx /usr/local/bin/youtube-dl

Windows users can download the youtube-dl.exefile and place it in any location on their PATHexcept for %SYSTEMROOT%\System32 (e.g. do not put in C:\Windows\System32).

If you are not familiar with how to set system path to your own folder, then one of the easiest way is to copy the youtube-dl.exe into C:\Users\user folder. In my case it is : C:\Users\kashif123

How to Use youtube-dl to Download YouTube Videos?
  1. Start Windows Command Line Prompt (CMD)
  2. Type youtube-dl and press Enter
You will see the above message, if you have correctly copied the youtube-dl.exe file.

Let’s Download Your First Video with youtube-dl
Grab the URL of any YouTube Video. e.g.

Start your command prompt. Type youtube-dl -F your_video_url_here and press Enter.

For Example:-











1.youtube-dl-F

You will get a list of all the available files for downloading. Now you will be able to see file sizes, extensions and video quality & resolution data.

Suppose, I want to download mp4 video in 854×480 resolution. You have to note down the relevant number for this file from left side in the same row under format column. In my case it is 135.

Type again youtube-dl -f number your_video_url_here in the windows command prompt and press Enter. Do not forget that this time the f is lower case.






1
youtube-dl-f135https://www.youtube.com/watch?v=ogm9Msxnp2k


Your file will be started downloading. This program supports resume download as well. So do not need to worry about interruptions of your internet connection while downloading YouTube videos.


If you want to download the available highest quality video from You tube, it is very simple. Simply Type:- youtube-dl your_video_url_here at windows command prompt and then press Enter.








1.youtube-dl https://www.youtube.com/watch?v=


How to Download the Entire Playlist or Channel from YouTube

1..youtube-dl https://www.youtube.com/playlist=

2&UUMGJ7uJdKp5HjNxJdVnzD4g

2..youtube-dl https://www.youtube.com/user/kashif123/
 
Last edited:

R@J£$H

Talented
Joined
Feb 7, 2016
Messages
776
Reaction score
75
youtube-dl is an open source command line tool which is used to download YouTube videos on your computer. you can check available formats and resolution of particular video before download. youtube-dl requires the Python interpreter, version 2.6, 2.7 or 3.2+ (for Linux only), and is not platform specific. It should work on Linux, Windows & Mac OS X. youtube-dl is released into the public domain, which means that you can modify it, redistribute it or use it as you like.
I used to download some music videos and video lectures from YouTube. What I interested was only audio and the HD Resolution.

How to Install youtube-dl on Windows & Linux
To install it on any Linux Distribution (Ubuntu, Mint, etc), type:-







1.sudo curl-Lhttps://yt-dl.org/downloads/latest/youtube-dl-o/usr/local/bin/youtube-dl
-o /usr/local/bin/youtube-dl



2.sudo chmod chmod a+rx /usr/local/bin/youtube-dl

If you do not have curl, you can alternatively use a recent wget:-


1.sudo wget https://yt-dl.org/downloads/latest/youtube-dl -O /usr/local/bin/youtube-dl


2.sudo chmod chmod a+rx /usr/local/bin/youtube-dl

Windows users can download the youtube-dl.exefile and place it in any location on their PATHexcept for %SYSTEMROOT%\System32 (e.g. do not put in C:\Windows\System32).

If you are not familiar with how to set system path to your own folder, then one of the easiest way is to copy the youtube-dl.exe into C:\Users\user folder. In my case it is : C:\Users\kashif123

How to Use youtube-dl to Download YouTube Videos?

  1. Start Windows Command Line Prompt (CMD)
    Type youtube-dl and press Enter
You will see the above message, if you have correctly copied the youtube-dl.exe file.

Let’s Download Your First Video with youtube-dl
Grab the URL of any YouTube Video. e.g.

Start your command prompt. Type youtube-dl -F your_video_url_here and press Enter.

For Example:-











1.youtube-dl-F

You will get a list of all the available files for downloading. Now you will be able to see file sizes, extensions and video quality & resolution data.

Suppose, I want to download mp4 video in 854×480 resolution. You have to note down the relevant number for this file from left side in the same row under format column. In my case it is 135.

Type again youtube-dl -f number your_video_url_here in the windows command prompt and press Enter. Do not forget that this time the f is lower case.






1
youtube-dl-f135https://www.youtube.com/watch?v=ogm9Msxnp2k


Your file will be started downloading. This program supports resume download as well. So do not need to worry about interruptions of your internet connection while downloading YouTube videos.


If you want to download the available highest quality video from You tube, it is very simple. Simply Type:- youtube-dl your_video_url_here at windows command prompt and then press Enter.








1.youtube-dl https://www.youtube.com/watch?v=


How to Download the Entire Playlist or Channel from YouTube

1..youtube-dl https://www.youtube.com/playlist=

2&UUMGJ7uJdKp5HjNxJdVnzD4g

2..youtube-dl https://www.youtube.com/user/kashif123/
It is not easy...
Use IDM (Internet Download Manager)
 

Wrove

Skilled
Joined
Jun 2, 2015
Messages
503
Reaction score
326
Nice Method to download from Youtube. +1 For Good Work
******************************************************************************************
Use Youtube By Click method for Getting Videos in MP4 Format else IDM as many times it gives MKV files which is not compactible in all devices..
 

R4HUL

Learner
Joined
Oct 15, 2017
Messages
68
Reaction score
8
Thanks for this but it is so mind boggling. I would rather like to download with idm than all this commands
 

BBM

Average
Joined
Jun 16, 2014
Messages
246
Reaction score
50
idm is good but good sharing man. ............
 

Tygradora

Learner
Joined
Aug 14, 2019
Messages
67
Reaction score
0
That's really fantastic and yet that simple anyway. Do you have something like that lately for yourself or no ? I couldn't belive in other side that some stuff like that do exists in our planet really no matter what. Thanks for that matter here, do you ?
 
The Digital Janta Forum has been archived after serving 2008 to 2022 great years as Top leading Free Internet Forum !
Top