copy video url $ youtube-dl VIDEO_URL Change video Format Where “VIDEO_URL” is the url of the video that you want to download.
To download a video file, simply run the following command.
$ sudo chmod a+rx /usr/local/bin/youtube-dl How to use youtube-dl
Youtube- dl it’s available on the repository of the main distribution so, if you want, you can install the package with your package manager, for Debian based distributions such as Ubuntu and Mint the command is: $ sudo apt-get install youtube-dl -yįor any Linux distribution, you can quickly install youtube –dl on your system through the command line interface with: $ sudo wget -O /usr/local/bin/youtube-dlĪfter fetching the file, you need to set a executable permission on the script to execute properly. You’ll also learn how to download YouTube video, channel or playlist of any available quality and formats from the Linux shell. In this article you’ll find how to install YouTube downloader on Ubuntu 15.04/15.10 and Mint 17 linux. It will automatically resume the unfinished download, as long as a partial download is present in the current directory. If youtube-dl is killed in the middle of downloading, you can simply re-run it with the same YouTube video url. The youtube-dl tool supports resuming interrupted downloads.
-extract-audio - Extract the audio stream and discard the video.-prefer-ffmpeg - Tells youtube-dl to prefer ffmpeg (as opposed to avconv).youtube-dl -prefer-ffmpeg -extract-audio -audio-format mp3 -audio-quality 0 -embed-thumbnail īreaking down the meaning of the supplied options:
You can pass it an URL for a single song or even an entire playlist. Youtube-dl -yes-playlist -ignore-errors -sleep-interval 30 -o '%(playlist)s/%(title)s.%(ext)s' "$1"įor this task, I use youtube-dl (w/ a dependency on ffmpeg) with the following options for best results. Youtube-dl -ignore-errors -sleep-interval 30 -i -f bestaudio -extract-audio -audio-format mp3 -audio-quality 0 -o '%(playlist)s/%(playlist_index)s - %(title)s.%(ext)s' "$1" Youtube-dl -ignore-errors -f bestaudio -extract-audio -audio-format mp3 -audio-quality 0 -o '%(title)s.%(ext)s' "$1" This will also help make sure your IP doesn't get banned. It is really simple and also respects YouTube's flood or bot protection by having a 30 second interval between downloads. If I want to download a video as an mp3 I can do that, or download an entire playlist as mp3 I can use mp3p then the url to the playlist. This should honestly just be included aliases when you install the youtube-dl package in my opinion. This question has been answered a lot, but I figured I would add something really useful.
This will list all the flv files you have. Next have a look to make sure the flv file has downloaded from youtube by typing ls *flv Now install ffmpeg from the official repo. c Resume download of a video which was interrupted beforeįor complete list of switches execute man youtube-dl in terminal. You can also specify other options -b Best quality To download a video execute the following: youtube-dl
This will let you upgrade with sudo youtube-dl -U Or as official readme suggest using curl or wget. Install youtube-dl from the official repository in Ubuntu: sudo apt-get install youtube-dl