Skip to content

An Open Source, Command-Line App to Download Videos From Youtube & Over 100 Other Sites!

There is a wealth of outstanding content on Youtube and all of the other video sites online. Sometimes I like to download movies for trips, or training videos when I want to cut out distractions.

 

I found the solution; on Github of all places!  Youtube-dl is a simple command line executable you can use to download video quickly, with ease.  It supports hundreds of websites with video content.  Here’s how to use it on Windows.

 

How To Download Videos

 

First, we need to download the latest version of youtube-dl from Github. This link will always produce the latest version of youtube-dl, directly from Github:

 

https://yt-dl.org/downloads/latest/youtube-dl.exe

 

I suggest saving it in your “Videos” folder, located within your user folder.  You can find your user folder on your desktop. It’s the folder with your name.  There is a “Videos” folder already located there, by default.

youtube-dl in videos folder

 

Now we’re ready to start using the program.  Because this is a command line utility, we will use various options to tell it what we would like it to do.

 

To start, open a command prompt by right clicking on your start menu button and selecting “Command Prompt.”

 

Once you’ve opened a command prompt, go to the Videos directory, then the youtube-dl directory.

 

cd Videos

cd youtube-dl

 

If you do a dir you will see youtube-dl.exe listed.

 

2016-10-26_21-50-59

 

To download a video or playlist from Youtube, the process is the same.  You just need to open the video or playlist on youtube’s website, and copy the link in your address bar.  Go ahead and do that now,  or you can use the sample I’m using below.

 

First, we will download a video with my go-to options.  If you have a link to a Youtube video, replace the link in the command below.  Just be sure the link is always between the ” “.

 

youtube-dl -citw "https://www.youtube.com/watch?v=KlEovr29KBU"

 

You should see something like this:

 

youtube-dl download video

 

Here is a breakdown of the-citwoptions I included.

 

-c           Continue's downloading if there is a connection error.

-i            Ignore any errors.

-t           Use the title of the video on the website as the filename of the downloaded video.

-w          Do not overwrite files.

 

There are more options than you will ever use.  Click here to see them all via the youtube-dl documentation.

 

Subtitles

 

Because I usually put all of the videos I download on my Plex server, I like to download subtitles as well.  Youtube will serve up subtitles in WebVV format for most videos.  This format will work with any popular video player, such as VLC.  To download the subtitles with the video, use the--write-auto-sub option.  This will download the subtitles, or the Youtube automatically generated subtitles.

 

Downloading with subtitles looks like this.

 

youtube-dl -citw --write-auto-sub "https://www.youtube.com/watch?v=KlEovr29KBU"

 

One neat little trick to remember.. If you forget to add the subtitle option until after downloading the video(s), just add it in and run the command again before moving your video files.  With the-citw --write-auto-suboptions it will not download the video again because the file already exists, but it will download the subtitles because they are not there to overwrite!

 

One more note, from time to time you will get a connection error and you’ll end up with a.partfile instead of a video.  All you have to do is immediately run the same command again, and youtube-dl will resume downloading the video where it left off.

 

Additional Resources

 

To see a list of the nearly 200 sites youtube-dl supports, head on over to this link to see if your favorite site is listed.  And just in case you missed the earlier link, the full youtube-dl documentation can be found here.

 

I hope you found this guide helpful.  If you have any questions or need help, please feel free to ask in the comments below!  Thanks!