Many times, there are videos that we want to download but unfortunately, it’s difficult to find a download manager that can fetch the links to these videos.
Youtube-dl is a python based command-line tool that allows download of videos from sites like; Youtube, Dailymotion, Google, Photobucket, Facebook, Yahoo, Metacafe and Depositfiles.
These were the initial websites that the script was designed for but, recently, other new websites – brightcove.com, auengine.com, RingTv, instagram.com, Jukebox, 3sat, Cspan, Statigr.am, gamespot.com – have been added.
Youtube-dl is written in PyGTK and requires Python interpreter to run this program, hence it can run on any Unix, Windows or Mac OS X based system.
Youtube-dl also allows you to choose specific available video quality format to download or let the program itself automatically download higher quality video from the site.
It also has support for user-specific playlist downloads, options to add custom or original title to the downloaded video file and proxy support.
Installing in RHEL/CentOS and Fedora
First of all, enable the epel repository by running the command below:
## RHEL/CentOS 7 64-Bit ## # wget http://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm # rpm -ivh epel-release-latest-7.noarch.rpm
You can then install the youtube-dl application using the command below:
yum install youtube-dl
If you don’t want to add any third party repository, open the terminal and run the following commands:
sudo curl http://yt-dl.org/latest/youtube-dl -o /usr/local/bin/youtube-dl
Alternatively, you can use wget
to download the binary file as well.
sudo wget https://yt-dl.org/downloads/latest/youtube-dl -O /usr/local/bin/youtube-dl
NB: Your system must have curl or wget packages installed
After fetching the file, you need to set a executable permission on the script to execute properly
chmod a+rx /usr/local/bin/youtube-dl
Install in Ubuntu/Linux Mint and Debian
Open terminal, add the repository and install the youtube-dl packages below using the commands listed below:
sudo add-apt-repository ppa:nilarimogard/webupd8 sudo apt-get update sudo apt-get install youtube-dl
Similarly, instead using any thrid party PPA, you can use curl or wget command to install latest version of youtube-dl script as below;
sudo curl http://yt-dl.org/latest/youtube-dl -o /usr/local/bin/youtube-dl sudo wget https://yt-dl.org/downloads/latest/youtube-dl -O /usr/local/bin/youtube-dl
After downloading set the script to executable permission
sudo chmod a+rx /usr/local/bin/youtube-dl
After Installation
To Update Youtube-dl use the command below:
youtube-dl -U
To download a video, use the command below:
youtube-dl https://www.youtube.com/watch?v=iRYvuS90xdA
To list available video formats
youtube-dl –list-formats https://www.youtube.com/watch?v=iRYvuS90xdA
To know all available options
youtube-dl --help
To Download a list of Video files, create a file with all the links
youtube-dl -a youtube_links.txt
If you liked this article, then please subscribe to our mailing list for WordPress video tutorials. You can also find us on Twitter and Facebook.