Suppose you have found a favorite YouTube playlist, and want to download all videos in the playlist to play them back locally. There are several ways to download YouTube videos in a batch.
youtube-dl is one of the most powerful YouTube downloader tools available on Linux. In this tutorial, I will describe how to download YouTube playlist by using youtube-dl.
First, install youtube-dl on your Linux by following the guide here.
Next, find out the URL of the YouTube playlist that you want to download. To do so, go to the YouTube playlist page that you want, and copy the URL. The URL format of a YouTube playlist is http://www.youtube.com/playlist?list=XXXXXXXXXXX, as shown in the screenshot below.
Now, go ahead and run the following command to download all YouTube videos in the playlist.
The command-line arguments used in the above command are as follows.
- -c: resume partially downloaded video files
- -i: continue upon download errors
- -t: use video title as the file name
- --max-quality FORMAT: download video in the highest quality format
If you want to download all YouTube videos in the playlist, as well as extract MP3 audio from each video file, then first install FFmpeg on your system, and run the following command.
The additional "-k" option in the above makes youtube-dl keep downloaded videos. Without this option, youtube-dl will erase downloaded video files after extracting MP3 files from them.
The following screenshot shows youtube-dl in action.
Subscribe to Xmodulo
Do you want to receive Linux FAQs, detailed tutorials and tips published at Xmodulo? Enter your email address below, and we will deliver our Linux posts straight to your email box, for free. Delivery powered by Google Feedburner.
Did you find this tutorial helpful? Then please be generous and support Xmodulo!