I'm trying to download some videos in mp3 format. It's a playlist. How do I download the whole playlist using one command?
Both parts of this question (downloading in mp3 and downloading a playlist) are supported by
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-dlstruggle 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
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.
Note:- Old version of youtube-dl is not able to download play-list. first you know what is your youtube-dl version. To check version of Youtube-dl use command
version 2014.02.17 and older version not able to download play-list.
If you use older version then update it by
sudo youtube-dl -U
after successful update use command
youtube-dl -cit https://www.youtube.com/playlist?list=PLttJ4RON7sleuL8wDpxbKHbSJ7BH4vvCk
Also you can create URL list in a simple text file and use following command.
youtube-dl -cit -a file_name_in_which_you_paste_URL_list
For MP3 format Audio can saved. But audio saves as .m4a format on my machine.
youtube-dl -cit --extract-audio --audio-format mp3 https://www.youtube.com/playlist?list=PLttJ4RON7sleuL8wDpxbKHbSJ7BH4vvCk
NOTE :- If you install youtube-dl from Ubuntu software center. You can't update it from terminal.
Go Software center and update from it.
I test this commands on Wine because my youtube-dl also old. And I am unable to Update it.
If you can update your youtube-dl you can download play-list by using above commands.
I hope it helps...
an additon to Oli 's answer. If you have the playlist (in separate lines) with all URLs in it in a text file to download:
youtube-dl --extract-audio --audio-format mp3 --batch-file="/full/path/to/playlist"
If you installed using pip, run the following to update:
sudo pip install youtube-dl --upgrade
Are you really sure you want MP3? A lot of devices nowadays can play AAC and some can even play Opus.
If you want to retain highest quality (Opus 160 kbps) and your player supports Opus codec it's better to use:
youtube-dl -f 251 (Playlist URL)
But if your player only supports AAC (as most entry-level TVs in 2018):
youtube-dl -f 140 (Playlist URL)
If you use MP3 you'll get degraded quality as reencoding (from already reencoded audio by YouTube) will be required.
protected by Community♦ Sep 12 '15 at 17:09
Thank you for your interest in this question.
Because it has attracted low-quality or spam answers that had to be removed, posting an answer now requires 10 reputation on this site (the association bonus does not count).
Would you like to answer one of these unanswered questions instead?