Tokhy's Blog

Migrating To MPD

If you know me, or you've even read my philosophy, you'll see that almost the single network-connected proprietary software I use was Spotify. However, the random 4chan guy who added me to his family years ago decided to cut me out of the virtual family. Thus, I chose not to pay money and get ripped in terms of data collection and go for a self-hosted FOSS.

I have considered MPD before, but I never switched due to multiple concerns (mainly laziness), but now I decided to set up the server.

I had multiple needs that I wanted to achieve:

  1. High Quality, at least Spotify's lossy 320 kb/s OGG for Arabic songs
  2. Fetch my Spotify playlists
  3. Integration with the ecosystem, the Devices feature in Spotify kicked ass
  4. Automatically downloaded lyrics
  5. Simple UI
  6. Likes

High Quality

Shout out to Ahmed Adel which told me about deemix; a tool that fetches songs from the hilarious unencrypted Deezer. The famous/ English albums I like are usually pirated and found in lossless flacs with extravagant qualities. My problem was with Arabic songs (Mostly hip-hop), which can not found in high qualities anywhere. Deemix was maybe the hit software I discovered this year as it allowed me to download the barely known Arabic hip-hop songs in lossless flacs. Now I have got a quality that exceeds that of Spotify!

Spotify Playlists

I got a random online spotify2deezer playlist converter that worked flawlessly and then fetched it instantly using deemix. I made a tiny shell script to find if a song is repeated (I downloaded some albums that included songs in playlists) and then convert it to a symbolic link rather than having multiple instants of the same song.

Ecosystem

I set up the MPD with minimal modifications and added Snapcast to the gang to have my multiple players running in a synchronized environment. I also used M.A.L.P android client, which allowed me to control MPD from my phone.

Likes

MPD sticker feature worked like a charm, and for generating playlists, the client mentioned in the next section will come to a use.

UI/ Lyrics

Here I want to thank CDrummond for the awesome MPD client Cantata, which barely had any issues. I want to quote the README file in the repo:

Cantata is now in a bug-fix only state. Therefore, new features are unlikly to be implemented unless pull requests are submitted. The current release, 2.4.x, is likely to be the last feature release. 

This is fucking legendary. I wish more software get the idea that when you reach the point that you achieved your primary goal, there is no need to implement useless new features just to get more "hype" or have a running issues page. Only caring for bug-fixing will make the application stable as hell.

Now let's get to the features of the Cantata. Using my qt5ct AMOLED stylesheet made the UI more integrated with the window manager. Cantata had a built-in lyrics function that fetches lyrics from genius, musixmatch, and a couple of more websites that had almost all of my songs' lyrics. Lyrics are done.

Cantata had a fucking amazing feature that made me forget about Spotify, Dynamic Playlists. With simple rules like rating range, genre, "similar artists", etc, Cantata can generate playlists/queues according to this set of rules. This feature reminded me of "Your daily mix" but now it is self-hosted!

Conclusion

Man, I am so fucking happy with how it turned out. I now have an utterly lossless-high-bitrate-flac-offline database. I am a data hoarder anyway, so I feel this new setup is an entirely new level for my relationship with music. I wish I have done the migration earlier, and I can not recommend it more.


Posted at Tue, 01 Jun. 2021 - 02:53:46 AM

philosophies blog favs RSS

wanna bang contact me?