Configuring abcde on CentOS 8 to Utilize MusicBrainz CDDB

If you’re anything like me, you regard Spotify, YouTube Music, Amazon Music, etc. as giant steaming piles of horse shit. If you’re more like me, you also still buy your music on CD and then rip it in a lossless format to your computer (or purchase albums from Bandcamp icon-external-link-12x12 or Soundcloud icon-external-link-12x12 and download FLAC versions of the songs). And if you’re even more like me, you also run Linux as your primary operating system and refuse to grant conniving technology companies like Apple and Microsoft dominion over your music library.

Modified Spotify logo surrounded by a red circle with a red strike through it. [Formatted]

Enter the command-line utility abcde, which is an acronym for A Better CD Encoder. This program previously defaulted to FreeDB to obtain CD artist, album name, and track title information, but sadly this service shut down back in June. This leaves MusicBrainz icon-external-link-12x12 as the next best alternative, but unfortunately abcde hasn’t been updated yet to reference this different database, which effectively renders its music database lookup features unusable.

So if you’re running CentOS 8, follow the steps below to activate the MusicBrainz database for abcde. (These steps will be similar for previous versions of CentOS and other RHEL-derived distributions.)

Also, if you haven’t done so already, delete Windows and install Linux. You’re going to have to do it eventually—yes, really—so might as well get it out of the way now. Don’t worry… it’s free, and also better in every conceivable way except for handholding….

  • Install the major repositories (epel-release, elrepo-release, rpmfusion-free-release, and rpmfusion-nonfree-release)
  • Enable the AppStream and PowerTools repositories by issuing the commands dnf config-manager --set-enabled PowerTools and dnf config-manager --set-enabled AppStream, or by editing the files CentOS-AppStream.repo and CentOS-PowerTools.repo in /etc/yum.repos.d and setting enabled=1.
  • Install the flac-libs package.
  • (Optional) Install the libvorbis and libogg packages.
  • Install the abcde package, or download the latest version from icon-external-link-12x12 . If downloading, install into /opt, chown -R root:root /opt/abcde-2.9 (or equivalent folder), chmod -R 755 /opt/abcde-2.9, ln -s /opt/abcde-2.9/abcde /usr/local/bin, ln -s /opt/abcde-2.9/cddb-tool /usr/local/bin, and ln -s /opt/abcde-2.9/abcde-musicbrainz-tool /usr/local/bin.
  • dnf install cdparanoia or download from icon-external-link-12x12
  • dnf install cd-discid or download from icon-external-link-12x12
  • Download and build icon-external-link-12x12 , which installs into /usr/local/lib. Issue cp ./libdiscid.pc /usr/lib64/pkgconfig from within the build directory to prevent the Package libdiscid was not found in the pkg-config search path. error when issuing perl Makefile.PL for MusicBrainz-DiscID-0.06. This will be installed into /usr/local/lib which must be added to the library path by editing /etc/ and adding the text /usr/local/lib. Finally, update the libraries cache by issuing the ldconfig -v command.
  • Download icon-external-link-12x12 and issue the following commands: tar -xzvf MusicBrainz-DiscID-0.06.tar.gz, make Makefile.PL, make, make test, and make install. (Check
  • Install the perl-Mojolicious package.
  • Download, build and install module icon-external-link-12x12 .

Also, make sure your ~/.abcde.conf file is updated to reference MusicBrainz and configured for FLAC output (or Ogg/Vorbis if you prefer).

# Specify the method to use to retrieve the track information,
# the alternative is to specify 'musicbrainz':

# Specify the encoder to use for FLAC. In this case
# flac is the only choice.

# Specify the path to the selected encoder. In most cases the encoder
# should be in your $PATH as I illustrate below, otherwise you will 
# need to specify the full path. For example: /usr/bin/flac

# Specify your required encoding options here. Multiple options can
# be selected as '--best --another-option' etc.
# Overall bitrate is about 880 kbs/s with level 8.
FLACOPTS='-s -e -V -8' 

# Output type for FLAC.

And now you’re ready to roll! Piece of cake, right? No..? Well, it’s still worth all the hassle because you will be able to burn CDs to your Linux machine in glorious lossless quality, with full album details, and also keep the grubby fingers of the many crooked schemers at Apple and Microsoft off of your precious music.

I’m guessing the code icon-external-link-12x12 for abcde will eventually be updated to reflect these changes, which would make the instructions above obsolete. If not then I might be writing a related but very different blog post in the future.

Leave a Reply