KLOET.NET

Digital Music Collection

Table of Contents

  1. Introduction
  2. Aquiring
    1. Soulseek
    2. Deemix
    3. Bandcamp
  3. Categorization
  4. Maintainance
    1. Transcoding
    2. Syncing Devices
  5. Playback

1. Introduction

Many people don't want to use streaming services, good. But oftentimes when trying to migrate to something local, they find it's a huge effort to both acquire, categorize, and maintain large amounts of music.

As of writing this article I have about 400GB of music stored locally and my intention is to share any mistakes/wisdom/tips I have for someone who wants to do this themselves.

2. Aquiring Music

There are a lot of places to get music from, I'll recommend three different sources. Firstly though I must say I can never recommend YouTube. The reason for this is first most consistency. Multiple copies of one song exist all over YouTube. There's no way to guarantee the quality of the music you're downloading, as well as any other artifacts that may have been introduced. It's also just much harder to download entire albums as sometimes they're presented as playlists or sometimes as full videos. Downloading from YouTube is a headache.

Instead I will recommend three different sources. Soulseek for the anarchist, Deemix for the pirate, and Bandcamp for everyone.

2.1 Soulseek

Soulseek is a peer-to-peer file sharing platform targeted primarily for music, much like a modern Limewire. Many of its users amass collections of several terabytes. If you listen to really obscure music, it's a bit of a cointoss whether or not you'll find it on here but most people I would imagine could find every song they listen to on this network. Soulseek requires a client to connect to the network, I would recommend either Nicotine+ for a simple experience or slskd If you want a web-based client.

Being peer-to-peer, Soulseek relies on one client having an open port in order to index and transfer files from another client. Most users with the intention of sharing will open up their port and distribute their music collection so others can have a taste of their files. Though sharing is optional, it's good behaviour to not be a leech!

Soulseek gives you the option to search all users indexes and also filter on other criteria like file type, bitrate, and file size. There are plenty of lossless encoded music on the platform for you to grab and transcode at will. Transcoding will be covered later as it's very important.

Soulseek is a fantastic option especially if you are a fan of peer-to-peer networks

2.2 Deemix

Deemix is a class of unmaintained python programs which allow you to scrape music from the streaming platform Deezer.

Why would I recommend out of date software? Especially one which is likely to break as soon as Deezer changes their backend. Well, it's the only one I have experience with and I know it works well. I tried building a few other ones I found while writing this article but the authors either provided lacklustre build instructions, or they just didn't work. Either way I'll list them for you in case you're interested: OrpheusDL-deezer, Streamrip, and ReFreezer (Android).

For all of these, you'll need a Deezer auth token, or, ARL. Now if only there existed a big list of ones you can use for free.

Of the deemix suite, I've only had experience with deemix.py. It's easy to install with just python setup.py install. From there, just run deemix with the URL of a deezer album/track you want to download. There are some good options in the config such as formatting and quality you might want to look at, it will automatically generate a template for you in your config folder.

2.3 Bandcamp

There's not too much to say about Bandcamp, it's a great place to directly support artists and oftentimes there's music on there that doesn't exist on streaming platforms. I recommend Silver Jungle by PUZZLE.

Some albums are free on Bandcamp but most you have to fork over a small bit of money in return for a permanent download link with access to a wide variety of encodings. Purchase your tracks today!

Categorization

Building your library

Okay, you've got a huge folder with all your downloaded music, but it's a mess and everything has a different naming scheme or is missing metadata which makes it look poor in your music player.

Who wants to tag their music manually? Computers are intended to automate menial tasks for us, let's do that. The tool which I use to organize my library is called MusicBrainz Picard. It has a very intuitive graphical interface which is very feature rich with plugin support.

You can drop your music into the interface and either tell it to "Lookup" your music using context clues like file name/metadata. Or you can tell it to "Scan" the music to determine the audio's fingerprint and compare it to their database.

Once it has an idea of what song you're dealing with it'll show you the information that the crowdsourced MusicBrainz database has on your song, hopefully it's correct and has properly grouped all your music together. Sometimes it'll get confused on separate releases, selecting the vinyl/CD/digital release where something else should be selected, but this is all easy to correct with a little manually verification.

Otherwise, features you should know about:

If you dislike Picard and want something more command-line, try beets. It's a client software which can pull from multiple sources like MusicBrainz (again), Discogs, and Beatport. I've heard a lot of very good things about it.

Maintainance

Transcoding

Transcoding is the process of converting digital audio files from one format or codec to another, often to reduce file size, maintain compatibility across devices, or improve playback efficiency. It is important because it allows us to optimize storage space while ensuring audio quality and compatibility with various devices and software.

For example, converting high-resolution audio files like FLAC or AAC to compressed formats like MP3 or OPUS allows for easier storage and sharing. However, repeated transcoding can degrade sound quality due to compression artifacts, thus, transcoding should only happen using lossless audio as a source.

In my library I keep two copies, one in FLAC so I can transcode to any format I want and another in lossy OPUS for more storage demanding devices like my phone.

Here's a script I made to automate the process of cloning my FLAC library to an OPUS copy (it depends on the program fd for multithreading):

#!/bin/sh

FLAC_PATH=$HOME/Music/FLAC/
OPUS_PATH=$HOME/Music/OPUS/

# Generate non-existent directories
fd -0td --base-directory=$FLAC_PATH -x mkdir -p $OPUS_PATH{}

# Transcode non-existent FLACs to 96kbps VBR OPUS
fd -t f -e flac -e m4a -e opus --base-directory=$FLAC_PATH -x ffmpeg -loglevel 16 -n -i "$FLAC_PATH{}" -c: libopus -b:a 96k "$OPUS_PATH{.}.opus"

# Copy album covers
fd -t f -e jpg --base-directory=$FLAC_PATH -x cp -n "$FLAC_PATH{}" "$OPUS_PATH{}"

Syncing between Devices

I synchronize my music library between devices using Syncthing. But some other great options would be rsync, cloud mounted storage like sshfs/NFS (less accessible but requires to only be stored once!), or even a full music streaming server like Mopidy or Ampache.

Playback

Recommended software for listening will be short and sweet, I know what I like to use :p

Conclusion

I hope this guide helps you start your own music collection, if you have any other questions feel free to contact me.

If you'd like to say thanks you can send XMR to:

83BjCwJB9G4WfRPNAF3aox5fskYd9JujvS7HKnxmHL7widrvWjadQXs9nHRZ25BDCgDWzPNarevH9Cxc8aNyqsvg3UECerm