{"id":23756,"date":"2020-08-22T00:08:30","date_gmt":"2020-08-22T07:08:30","guid":{"rendered":"http:\/\/unwisdom.org\/chadspace\/?p=23756"},"modified":"2022-09-22T22:31:50","modified_gmt":"2022-09-23T05:31:50","slug":"configuring-abcde-on-centos-8-to-utilize-musicbrainz-cddb","status":"publish","type":"post","link":"http:\/\/unwisdom.org\/chadspace\/?p=23756","title":{"rendered":"Configuring abcde on CentOS 8 to Utilize MusicBrainz CDDB"},"content":{"rendered":"<p>If you&#8217;re anything like me, you regard Spotify, YouTube Music, Amazon Music, etc. as giant steaming piles of horse shit. If you&#8217;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 <a href=\"https:\/\/bandcamp.com\/\" rel=\"noopener noreferrer\" target=\"_blank\">Bandcamp<\/a> <img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/unwisdom.org\/chadspace\/wp-content\/uploads\/icon-external-link-12x12.png\" alt=\"icon-external-link-12x12\" width=\"12\" height=\"12\" \/> or <a href=\"https:\/\/soundcloud.com\/\" rel=\"noopener noreferrer\" target=\"_blank\">Soundcloud<\/a> <img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/unwisdom.org\/chadspace\/wp-content\/uploads\/icon-external-link-12x12.png\" alt=\"icon-external-link-12x12\" width=\"12\" height=\"12\" \/> and download FLAC versions of the songs). And if you&#8217;re even <em>more<\/em> 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.<\/p>\n<p><a href=\"http:\/\/unwisdom.org\/chadspace\/?attachment_id=23761\" rel=\"attachment wp-att-23762\"><img loading=\"lazy\" decoding=\"async\" data-attachment-id=\"23762\" data-permalink=\"http:\/\/unwisdom.org\/chadspace\/?attachment_id=23762\" data-orig-file=\"http:\/\/unwisdom.org\/chadspace\/wp-content\/uploads\/spotify-000000-f500.jpg\" data-orig-size=\"500,277\" data-comments-opened=\"0\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"spotify-000000-f500\" data-image-description=\"\" data-image-caption=\"\" data-large-file=\"http:\/\/unwisdom.org\/chadspace\/wp-content\/uploads\/spotify-000000-f500.jpg\" src=\"http:\/\/unwisdom.org\/chadspace\/wp-content\/uploads\/spotify-000000-f500.jpg\" alt=\"Modified Spotify logo surrounded by a red circle with a red strike through it. [Formatted]\" width=\"500\" height=\"277\" class=\"aligncenter size-full wp-image-23762\" srcset=\"http:\/\/unwisdom.org\/chadspace\/wp-content\/uploads\/spotify-000000-f500.jpg 500w, http:\/\/unwisdom.org\/chadspace\/wp-content\/uploads\/spotify-000000-f500-300x166.jpg 300w\" sizes=\"auto, (max-width: 500px) 100vw, 500px\" \/><\/a><\/p>\n<p>Enter the command-line utility <code>abcde<\/code>, which is an acronym for <em>A Better CD Encoder<\/em>. 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 <a href=\"https:\/\/musicbrainz.org\/\" rel=\"noopener noreferrer\" target=\"_blank\">MusicBrainz<\/a> <img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/unwisdom.org\/chadspace\/wp-content\/uploads\/icon-external-link-12x12.png\" alt=\"icon-external-link-12x12\" width=\"12\" height=\"12\" \/> as the next best alternative, but unfortunately <code>abcde<\/code> hasn&#8217;t been updated yet to reference this different database, which effectively renders its music database lookup features unusable.<\/p>\n<p>So if you&#8217;re running CentOS 8, follow the steps below to activate the MusicBrainz database for <code>abcde<\/code>. (These steps will be similar for previous versions of CentOS and other RHEL-derived distributions.)<\/p>\n<p>Also, if you haven&#8217;t done so already, delete Windows and install Linux. You&#8217;re going to have to do it eventually&#8212;yes, really&#8212;so might as well get it out of the way now. Don&#8217;t worry&#8230; it&#8217;s free, and also better in every conceivable way except for handholding&#8230;.<\/p>\n<ul>\n<li>Install the major repositories (<code>epel-release<\/code>, <code>elrepo-release<\/code>, <code>rpmfusion-free-release<\/code>, and <code>rpmfusion-nonfree-release<\/code>)<\/li>\n<li>Enable the <em>AppStream<\/em> and <em>PowerTools<\/em> repositories by issuing the commands <code>dnf config-manager --set-enabled powertools<\/code> and <code>dnf config-manager --set-enabled appstream<\/code>, or by editing the files <code>CentOS-AppStream.repo<\/code> and <code>CentOS-PowerTools.repo<\/code> in <code>\/etc\/yum.repos.d<\/code> and setting <code>enabled=1<\/code>.<\/li>\n<li>Install the <code>flac-libs<\/code> package.<\/li>\n<li>(Optional) Install the <code>libvorbis<\/code> and <code>libogg<\/code> packages.<\/li>\n<li>Install the <code>abcde<\/code> package, or download the latest version from <a href=\"https:\/\/abcde.einval.com\/wiki\/\" rel=\"noopener noreferrer\" target=\"_blank\">https:\/\/abcde.einval.com\/wiki\/<\/a> <img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/unwisdom.org\/chadspace\/wp-content\/uploads\/icon-external-link-12x12.png\" alt=\"icon-external-link-12x12\" width=\"12\" height=\"12\" \/> . If downloading, install into <code>\/opt<\/code>, <code>chown -R root:root \/opt\/abcde-2.9<\/code> (or equivalent folder), <code>chmod -R 755 \/opt\/abcde-2.9<\/code>, <code>ln -s \/opt\/abcde-2.9\/abcde \/usr\/local\/bin<\/code>, <code>ln -s \/opt\/abcde-2.9\/cddb-tool \/usr\/local\/bin<\/code>, and <code>ln -s \/opt\/abcde-2.9\/abcde-musicbrainz-tool \/usr\/local\/bin<\/code>.<\/li>\n<li><code>dnf install cdparanoia<\/code> or download from <a href=\"https:\/\/xiph.org\/paranoia\/\" rel=\"noopener noreferrer\" target=\"_blank\">https:\/\/xiph.org\/paranoia\/<\/a> <img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/unwisdom.org\/chadspace\/wp-content\/uploads\/icon-external-link-12x12.png\" alt=\"icon-external-link-12x12\" width=\"12\" height=\"12\" \/> <\/li>\n<li><code>dnf install cd-discid<\/code> or download from <a href=\"http:\/\/linukz.org\/cd-discid.shtml\" rel=\"noopener noreferrer\" target=\"_blank\">http:\/\/linukz.org\/cd-discid.shtml<\/a> <img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/unwisdom.org\/chadspace\/wp-content\/uploads\/icon-external-link-12x12.png\" alt=\"icon-external-link-12x12\" width=\"12\" height=\"12\" \/> <\/li>\n<li>Download and build <a href=\"https:\/\/musicbrainz.org\/doc\/libdiscid\" rel=\"noopener noreferrer\" target=\"_blank\">https:\/\/musicbrainz.org\/doc\/libdiscid<\/a> <img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/unwisdom.org\/chadspace\/wp-content\/uploads\/icon-external-link-12x12.png\" alt=\"icon-external-link-12x12\" width=\"12\" height=\"12\" \/> , which installs into <code>\/usr\/local\/lib<\/code>. Issue <code>cp .\/libdiscid.pc \/usr\/lib64\/pkgconfig<\/code> from within the build directory to prevent the <em>Package libdiscid was not found in the pkg-config search path.<\/em> error when issuing <code>perl Makefile.PL<\/code> for <code>MusicBrainz-DiscID-0.06<\/code>. This will be installed into <code>\/usr\/local\/lib<\/code> which must be added to the library path by editing <code>\/etc\/ld.so.conf<\/code> and adding the text <code>\/usr\/local\/lib<\/code>. Finally, update the libraries cache by issuing the <code>ldconfig -v<\/code> command.<\/li>\n<li>Download <a href=\"https:\/\/metacpan.org\/pod\/MusicBrainz::DiscID\" rel=\"noopener noreferrer\" target=\"_blank\">https:\/\/metacpan.org\/pod\/MusicBrainz::DiscID<\/a> <img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/unwisdom.org\/chadspace\/wp-content\/uploads\/icon-external-link-12x12.png\" alt=\"icon-external-link-12x12\" width=\"12\" height=\"12\" \/> and issue the following commands: <code>tar -xzvf MusicBrainz-DiscID-0.06.tar.gz<\/code>, <code>perl Makefile.PL<\/code>, <code>make<\/code>, <code>make test<\/code>, and <code>make install<\/code>. (Check <code>README.md<\/code>.)<\/li>\n<li>Install the <code>perl-Mojolicious<\/code> package.<\/li>\n<li>Download, build and install module <a href=\"https:\/\/metacpan.org\/release\/WebService-MusicBrainz\" rel=\"noopener noreferrer\" target=\"_blank\">https:\/\/metacpan.org\/release\/WebService-MusicBrainz<\/a> <img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/unwisdom.org\/chadspace\/wp-content\/uploads\/icon-external-link-12x12.png\" alt=\"icon-external-link-12x12\" width=\"12\" height=\"12\" \/> .<\/li>\n<\/ul>\n<p>Also, make sure your <code>~\/.abcde.conf<\/code> file is updated to reference MusicBrainz and configured for FLAC output (or Ogg\/Vorbis if you prefer).<\/p>\n<pre><code># Specify the method to use to retrieve the track information,\r\n# the alternative is to specify 'musicbrainz':\r\nCDDBMETHOD=musicbrainz\r\nCDDBURL=\"http:\/\/freedb.musicbrainz.org\/~cddb\/cddb.cgi\"\r\n\r\n# Specify the encoder to use for FLAC. In this case\r\n# flac is the only choice.\r\nFLACENCODERSYNTAX=flac\r\n\r\n# Specify the path to the selected encoder. In most cases the encoder\r\n# should be in your $PATH as I illustrate below, otherwise you will \r\n# need to specify the full path. For example: \/usr\/bin\/flac\r\nFLAC=flac\r\n\r\n# Specify your required encoding options here. Multiple options can\r\n# be selected as '--best --another-option' etc.\r\n# Overall bitrate is about 880 kbs\/s with level 8.\r\nFLACOPTS='-s -e -V -8' \r\n\r\n# Output type for FLAC.\r\nOUTPUTTYPE=\"flac\"\r\n\r\n<\/code><\/pre>\n<p>And now you&#8217;re ready to roll! Piece of cake, right? No..? Well, it&#8217;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. <\/p>\n<p>I&#8217;m guessing the <a href=\"https:\/\/git.einval.com\/cgi-bin\/gitweb.cgi?p=abcde.git;a=summary\" rel=\"noopener noreferrer\" target=\"_blank\">code<\/a> <img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/unwisdom.org\/chadspace\/wp-content\/uploads\/icon-external-link-12x12.png\" alt=\"icon-external-link-12x12\" width=\"12\" height=\"12\" \/> for <code>abcde<\/code> 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.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>If you&#8217;re anything like me, you regard Spotify, YouTube Music, Amazon Music, etc. as giant steaming piles of horse shit. If you&#8217;re more like me, you also still buy your music on CD and then rip it in a lossless &hellip; <a href=\"http:\/\/unwisdom.org\/chadspace\/?p=23756\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[841],"tags":[886,883,884,887,888,522,885,889],"class_list":["post-23756","post","type-post","status-publish","format-standard","hentry","category-music","tag-a-better-cd-encoder","tag-centos","tag-centos-8","tag-flac","tag-freedb","tag-linux","tag-musicbrainz","tag-spotify"],"jetpack_featured_media_url":"","jetpack_shortlink":"https:\/\/wp.me\/p3DQCb-6ba","jetpack_sharing_enabled":true,"jetpack_likes_enabled":true,"_links":{"self":[{"href":"http:\/\/unwisdom.org\/chadspace\/index.php?rest_route=\/wp\/v2\/posts\/23756","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/unwisdom.org\/chadspace\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/unwisdom.org\/chadspace\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/unwisdom.org\/chadspace\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/unwisdom.org\/chadspace\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=23756"}],"version-history":[{"count":33,"href":"http:\/\/unwisdom.org\/chadspace\/index.php?rest_route=\/wp\/v2\/posts\/23756\/revisions"}],"predecessor-version":[{"id":28127,"href":"http:\/\/unwisdom.org\/chadspace\/index.php?rest_route=\/wp\/v2\/posts\/23756\/revisions\/28127"}],"wp:attachment":[{"href":"http:\/\/unwisdom.org\/chadspace\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=23756"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/unwisdom.org\/chadspace\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=23756"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/unwisdom.org\/chadspace\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=23756"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}