youtube-dl for music playlists

Google has amassed the world’s greatest library of music. Here’s how to download the music from a playlist nicely if you’re not worried about licensing questions:

youtube-dl -o ‘%(autonumber)s-%(title)s-%(id)s.%(ext)s’ -f 140 PLAYLIST-URL

The -o option names the file something nice. Note I left the youtube ID in there so you could find the file again.

The -f 140 option means download the 128kbps AAC audio stream only. There may be higher quality audio available but this sounds fine to my tin ear, also it seems to work with absolutely everything.

I tried –write-thumbnail for nice album covers in the files but it seems to only write the image as a second file, not into the m4a metadata. I’ve also had bad luck trying to use command line tools to add metadata to the m4a file afterwards, stuff like artist or whatever. Ended up corrupting the files. I didn’t try very hard.

 

One thought on “youtube-dl for music playlists

Comments are closed.