youtube-dl is a tool built in python programming language for the purpose of downloading videos from youtube and some other sites. This command-line app should work on any platform that supports python, but this tutorial is focused on linux.
Before continuing any further make sure you have python installed on your machine. The version of python on which youtube-dl works includes the following:
- 2.6
- 2.7
- 3.2+
How to setup youtube-dl on your linux machine
To install youtube-dl for all linux users we need to copy the application in /usr/local/bin directory by using the following command.
sudo wget https://yt-dl.org/downloads/latest/youtube-dl -O /usr/local/bin/youtube-dl
The above command downloads the latest youtube-dl tool and places it in the /usr/local/bin directory for us.
If the above command does not work and you get warnings about some certificate stuff then use the --no-check-certificate option like shown below.
If the above command does not work and you get warnings about some certificate stuff then use the --no-check-certificate option like shown below.
sudo wget https://yt-dl.org/downloads/latest/youtube-dl --no-certificate -O /usr/local/bin/youtube-dl
The next step consists in changing permissions of the youtube-dl binary so we can execute it.
sudo chmod a+rx /usr/local/bin/youtube-dl
How to download a video from youtube
Before doing any downloading work it is recommended to do an update of youtube-dl in order to get the latest features and code fixes.
The following command can be used for running an update on youtube-dl.
youtube-dl -UMine is already up-to-date so I get the following output on the linux console.
youtube-dl is up-to-date (2016.04.06)
To download a video from youtube with the youtube-dl tool all you have to do is provide the url of the video.
Once the download of the video starts youtube-dl will show information on the time it will take to fully get the data from youtube.
The following is a screenshot during a download for the purpose of this article.
youtube-dl https://www.youtube.com/watch?v=P7QDjqDEajs
Once the download of the video starts youtube-dl will show information on the time it will take to fully get the data from youtube.
The following is a screenshot during a download for the purpose of this article.
I prefer not to use the full url, but the id of the video.
Make sure to watch the following video on which I show how to download a video from youtube using youtube-dl.
Make sure to like Linuxtuts on facebook for the latest articles.
youtube-dl P7QDjqDEajs
Make sure to watch the following video on which I show how to download a video from youtube using youtube-dl.
Conclusion
youtube-dl is not a very simple tool to use as it offers many options for video download, but the purpose of this article was to show you how to exactly download a video from youtube using this tool.Make sure to like Linuxtuts on facebook for the latest articles.
No comments:
Post a Comment