How to download YouTube playlist in Linux

Last updated on September 21, 2020 by Dan Nanni

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 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.

$ youtube-dl -citk --max-quality FORMAT http://www.youtube.com/playlist?list=XXXXXXXXXXX

The command-line arguments used in the above command are as follows.

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.

$ youtube-dl -citk --max-quality FORMAT --extract-audio --audio-format mp3 http://www.youtube.com/playlist?list=XXXXXXXXXXX

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.

Support Xmodulo

This website is made possible by minimal ads and your gracious donation via PayPal (Credit Card) or Bitcoin (1M161JGAkz3oaHNvTiPFjNYkeABox8rb4g).

Please note that this article is published by Xmodulo.com under a Creative Commons Attribution-ShareAlike 3.0 Unported License. If you would like to use the whole or any part of this article, you need to cite this web page at Xmodulo.com as the original source.

Xmodulo © 2021 ‒ AboutWrite for UsFeed ‒ Powered by DigitalOcean