How to download or save streaming video from over 700 sites

Updated: 05/09/2017 by Computer Hope

Video sitesThe youtube-dl utility is an open source command line command maintained by Ricardo Garcia Gonzalez that allows anyone with a computer to download streaming videos from over 700 sites.

Although there are dozens of other available options for downloading videos using a software program, the youtube-dl command is free and has many options that make it highly recommended.

WARNING: Downloading streaming videos is not illegal, as long as you use the video in a manner that conforms to the video's license or terms of use. For example, many YouTube videos use the standard YouTube license and some are licensed under Creative Commons. You can check the license type by inspecting the information box underneath the video, as in the image below.

Find the youtube license here, and comply with it when using any YouTube video.

For more information about viewing and using YouTube videos in accordance with copyrights, make sure to check Google's Frequently Asked Questions about Copyright and Fair Use on Youtube.

Installing youtube-dl

Installing youtube-dl on Windows

Visit the project home at https://rg3.github.io/youtube-dl/ and download the Windows exe Installer. After youtube-dl has been installed on the computer, move the file to a location you'll remember and that can be opened from the command line. For example, create a folder called youtube on the c:\ drive.

Note: For this program to work, you must run the file from the command line.

  • After the file has been copied, jump to using youtube-dl for steps on how to use the program.

Installing youtube-dl on macOS X

If you have Homebrew, you can install youtube-dl by opening a Terminal and running the following command.

brew install youtube-dl

Or, if you have MacPorts, run the command below.

sudo port install youtube-dl

You can also install it using curl:

sudo curl https://yt-dl.org/latest/youtube-dl -o /usr/local/bin/youtube-dl
sudo chmod a+rx /usr/local/bin/youtube-dl

...or wget:

sudo wget https://yt-dl.org/downloads/latest/youtube-dl -O /usr/local/bin/youtube-dl
sudo chmod a+rx /usr/local/bin/youtube-dl

or you can clone and build the current source with git:

git clone https://github.com/rg3/youtube-dl/
make
sudo make install
  • After the file has been copied, jump to using youtube-dl for steps on how to use the program.

Installing youtube-dl on Linux

The youtube-dl utility is available as a binary package in many Linux package management repositories. For instance, on Debian or Ubuntu systems you can install using APT:

sudo apt-get install youtube-dl

You can also install using the curl, wget, or git methods listed above for macOS X.

  • After the file has been copied, jump to using youtube-dl for steps on how to use the program.

Using youtube-dl to download video

After youtube-dl has been installed on the computer, the command can be ran from the command line followed by the URL of the video, as shown in the examples below. If you are not familiar with the command line for your computer or need to refresh your skills, see the links below.

Below is the youtube-dl syntax.

youtube-dl URL

Replace URL with the fully qualified URL of the youtube video. For instance, the below command downloads the video at the designated address to the current directory as an .mp4 MPEG-4 video file, in the maximum available quality.

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

Using youtube-dl to download audio only

To download just the audio, use the --extract-audio option.

youtube-dl --extract-audio https://www.youtube.com/watch?v=dQw4w9WgXcQ

The above example command will download only the audio portion of the video file, saving it in the current directory in an audio format dependent on the encoders available on your system.

For more information and to view the many detailed options available, read the manual:

man youtube-dl