Set up youtube-dl to command YouTube movies to the Linux terminal
youtube-dl is a Python-based, small command-line software that lets you obtain movies from YouTube, Dailymotion, Photobucket, Fb, Yahoo, Metacafe, Depositfiles, and lots of extra.
Major options of youtube-dl
This little software has such a lot of options that we will name it the most productive YouTube video obtain utility for Linux.
- No longer simplest from YouTube, Dailymotion, Fb, and so on. Obtain movies from different fashionable video websites.
- MP4, WebM, and so on. It lets you obtain movies in more than a few video codecs similar to.
- You’ll additionally make a choice the standard of the downloaded video. If the video is to be had in 4K, 4K, 1080p, 720p and so on.
- Robotically pause and resume video downloads.
- YouTube lets in bypassing geographical restrictions
The right way to set up Youtube-dl?
In case you are the use of a Ubuntu-based Linux distribution, you’ll be able to set up it the use of the command under:
sudo apt set up youtube–dl
For different Linux distributions, you’ll be able to additionally set up youtube-dl in your device by way of the command-line interface:
sudo wget //yt-dl.org/downloads/newest/youtube-dl -O/usr/native/bin/youtube-dl
After receiving the document, you wish to have to set executable permission within the script for it to paintings correctly.
sudo chmod a+rx /usr/native/bin/youtube–dl
Let’s use YouTube-dl to obtain movies:
The next command is enough to obtain the video. “VIDEO_URL” is the URL of the video you need to obtain.
You’ll additionally obtain YouTube movies in several high quality and genres.
It is going to be sufficient to make use of the command under to look the prevailing codecs of the Youtube video. This may display us an inventory of the to be had codecs.
The output will likely be as follows:
Environment the language BlXaGWbFVKY:
Downloading the video internet web page BlXaGWbFVKY:
Downloading the video data document BlXaGWbFVKY:
Video data extraction To be had codecs: 37: mp4 [1080×1920] 46: webm [1080×1920] 22: mp4 [720×1280] 46: webmaster [1080×1920] 22: mp4 [720×1280] ] 44: ağ [480×854] 34: flv [360×640] 18: mp4 [360×640] 43: ağm [360×640] 5: flv [240×400] 17: mp4 [144×176]
Now we will make a choice the layout you need. For instance, if you wish to obtain it in MP4 model and 720 pixels, it must be achieved as follows:
Now obtain subtitles of movies the use of Youtube-dl.
First, test if there are subtitles for the video. Use the next command to checklist the entire subsections of a video:
To obtain all sub movies, however to obtain the video:
youtube–dl —all–subs —skip–obtain
Obtain all of the YouTube playlist
Simply run the command under to obtain a playlist. “Playlist_url” is the URL of the playlist you need to obtain.
Obtain audio from YouTube movies simplest
For those who simplest wish to obtain the audio from a YouTube video, you’ll be able to use the -x way to extract the audio document from the video.
The default document layout is downloaded as Ogg. You’ll exchange the document layout of the audio document as follows:
youtube–dl –x —audio–layout mp3
I’m hoping it was once an invaluable article.