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 or Soundcloud 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.
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 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
, andrpmfusion-nonfree-release
) - Enable the AppStream and PowerTools repositories by issuing the commands
dnf config-manager --set-enabled powertools
anddnf config-manager --set-enabled appstream
, or by editing the filesCentOS-AppStream.repo
andCentOS-PowerTools.repo
in/etc/yum.repos.d
and settingenabled=1
. - Install the
flac-libs
package. - (Optional) Install the
libvorbis
andlibogg
packages. - Install the
abcde
package, or download the latest version from https://abcde.einval.com/wiki/ . 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
, andln -s /opt/abcde-2.9/abcde-musicbrainz-tool /usr/local/bin
. dnf install cdparanoia
or download from https://xiph.org/paranoia/dnf install cd-discid
or download from http://linukz.org/cd-discid.shtml- Download and build https://musicbrainz.org/doc/libdiscid , which installs into
/usr/local/lib
. Issuecp ./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 issuingperl Makefile.PL
forMusicBrainz-DiscID-0.06
. This will be installed into/usr/local/lib
which must be added to the library path by editing/etc/ld.so.conf
and adding the text/usr/local/lib
. Finally, update the libraries cache by issuing theldconfig -v
command. - Download https://metacpan.org/pod/MusicBrainz::DiscID and issue the following commands:
tar -xzvf MusicBrainz-DiscID-0.06.tar.gz
,perl Makefile.PL
,make
,make test
, andmake install
. (CheckREADME.md
.) - Install the
perl-Mojolicious
package. - Download, build and install module https://metacpan.org/release/WebService-MusicBrainz .
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':
CDDBMETHOD=musicbrainz
CDDBURL="http://freedb.musicbrainz.org/~cddb/cddb.cgi"
# Specify the encoder to use for FLAC. In this case
# flac is the only choice.
FLACENCODERSYNTAX=flac
# 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
FLAC=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.
OUTPUTTYPE="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 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.