Ubuntu – How to download playlist to mp3 format with youtube-dl

command linedownloadsplaylistsyoutubeyoutube-dl

I'm trying to download some videos in mp3 format. It's a playlist. How do I download the whole playlist using one command?

Best Answer

Both parts of this question (downloading in mp3 and downloading a playlist) are supported by youtube-dl:

youtube-dl --extract-audio --audio-format mp3 -o "%(title)s.%(ext)s" <url to playlist>

Some notes from me and the comments:

  • Older versions of youtube-dl struggle with modern playlists. You might need to replace the repo version with the latest.

  • cmo: You can ignore missing ("unavailable in your country", or removed) videos with an -i flag.

  • frans: If your playlist isn't working and the URL contains a v=<ID> element, remove it so there's just the ?list=... item in the querystring.