Using YouTube playlists as your offline music collection [Linux]


youtube

Hi guys! Been so long since I’ve made a post…well over a year now. Work, studies and commitment to life keeps me busy but it’s good to be back every once in a while.

I’m a big music fan and at times I use various YouTube  music playlist to listen to a good collection of cherry picked music that interests me. Also there are times when I don’t have internet connectivity so a thought came to my mind on why not just get the entire playlist backed up locally so that I can listen to good music whenever I want.

So first of all since I’m a coder, I thought to myself on why not just go ahead and create a script to automate the entire process; from parsing and downloading content to batch processing and conversion of the videos to be audio only. But then again one of the things I’ve learned in the long run as a coder is to make good use of code reuse; in other words, why reinvent the wheel when there are already existing solutions out there that addresses the problem. This led me to the excellent feature friendly youtube downloading and conversion software for Linux known as youtube-dl.

You can download youtube-dl from your local linux repo or you can go to their hosting site over here.

TLDR; This is the command format to make youtube-dl download all the tracks along with cover photos from a given playlist and convert it to audio only without going through a hiccup.

youtube-dl –yes-playlist -c –write-thumbnail -x -i [ url ]

The command line flags are pretty much self explanatory; youtube-dl works smooth and with in minutes you will have your favorite genre of music all backed up for your convenience.

Disclaimer: The author is not responsible for violation of youtube’s copyright policy in anyway, what you do with this information is your own responsibility. This post has been made for Educational purposes only.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s