Categories
Blog Portfolio

Convert A Spotify Playlist To MP3 Files

Want to convert all your favorite tunes from your Spotify playlist to mp3 files that can be imported to iTunes? Look no further. šŸŽµ

Disclaimers: I am subscribed to Spotify Premium.

Want to convert all your favorite tunes from your Spotify playlist to mp3 files that can be imported to iTunes? Look no further than this short and sweet tutorial.

Cause Iā€™m about to show you how to convert your favorite Spotify playlist to a bunch of mp3 files in justĀ 5 simple steps.

ā—Ā Some Terminal experience is required.

šŸ›  This tutorial is certifiably macOS & developer friendly.

1. Create a playlist of songs you want to download on Spotify.

Here in this playlist called Tutorial, I have 5 songs I want to download for later listening.

IMAGE HERE

2. Go toĀ playlistbuddy.comĀ and login with your Spotify account.

Here, convert your desired playlist to a YouTube playlist.

Iā€™d recommend selecting the filter Lyric Videos so you donā€™t get that annoying music video dialogue/sound effects.

IMAGE HERE

3. Install Homebrew

HomebrewĀ allows us to install, remove and updated applications and packages. To install it, paste the following command in your Terminal (located underĀ Applications/Utilities/Terminal).

/usr/bin/ruby -e "$(curl -fsSL //raw.githubusercontent.com/Homebrew/install/master/install)"

4. InstallĀ youtube-dlĀ andĀ libav

Now that you have Homebrew, itā€™ll be super easy to perform the following commands in order to install the command-line programĀ youtube-dlĀ andĀ libav.

To convert music to different audio formats,Ā youtube-dlĀ needs eitherĀ ffmpegĀ orĀ avconv, and their helper programsĀ ffprobeĀ orĀ avprobe. We can just installĀ libavĀ for all this.

brew install youtube-dl

# necessary dependency

brew install libav

5. Download your music!

Now that we have all the necessary packages installed, letā€™s explore what command to use!

If you want to download the MP3 file(s) of a YouTube video or playlist and place it in ourĀ DownloadsĀ folder, then we will use the following command:

youtube-dl --extract-audio --audio-format mp3 -o '~/Downloads/%(title)s.%(ext)s' video_playlist_link

And thatā€™s it! Now all those songs I wanted are in myĀ DownloadsĀ folder, ready to use!


Troubleshooting

  1. If you have any videos that were deleted from the YouTube Playlist due to copyright infringement, then there will be an error so you should remove those from the playlist before trying the command again.
  2. If you already have a file in yourĀ DownloadsĀ folder calledĀ Song.mp3Ā and there is a video calledĀ SongĀ in the YouTube Playlist, then that file in yourĀ DownloadsĀ folder will beĀ overwritten.

By Frances Coronel

Frances Coronel is a software engineer specializing in UI development on the Customer Acquisition Team at Slack where her mission is to make your working life simpler, more pleasant, and more productive.

She has been working professionally as a developer since 2015 and holds a Bachelors in Computer Science from Hampton University and a Masters in Computer Science from Cornell Tech.

Outside of Slack, Frances is an Executive Director of Techqueria, a 501c3 nonprofit that serves the largest community of Latinx in Tech in the US.

She also supports Code Nation as a member of their Bay Area Leadership Council and the Latino Community Foundation as a member of their Latinos in Tech Giving Circle.