Skip to content

poddmo/abcde

Repository files navigation

Introduction

This is a fork of abcde:

abcde version 2.9.3 is the most recent download and was released on February 5th 2019.

The starting point for this GitHub repository was 2.9.4-DEV with the last upstream commit dated 2021-02-14.

I've ripped nearly two thousand CDs with abcde and along the way have fixed some bugs, had a go at some workflow enhancements and introduced new features.

Now up to version 2.12.2 released on 30th April, 2026. I've been actively maintaining this fork of abcde since 5th June, 2024.

My objective is to create music tracks, especially lossless flacs, for listening and also to record as much information from the read process as possible for archival posterity, such as TOC, cue sheet, CD-TEXT, enhanced CD directory listing, media read progress/status/errors and metadata downloaded. Ideally the info should be stored in the audio file metadata. I mostly focus on flac but am considerate to not break existing function.

Your feedback is very welcome. Please open an issue or pull request and I will look at it.

Features

Enhancements

  • Read hidden track one audio tracks, if they exist
  • Rip one track CDs (a bug in older versions prevented ripping discs with only 1 track)
  • Improved handling of CD sets:
    • The -W option is expanded to optionally add the total number of discs in the set. These details are recorded in the FLAC metadata tags DISCNUMBER and DISCTOTAL
    • Create playlist defaults to append instead of erase when the disc number is greater than 1
  • Improved handling of FLACs:
    • comments added on the command line with the -w option are designated as USERCOMMENTS and added to every track
    • CDDB extended data (EXTD) are passed through to FLAC COMMENT tags and added to every track
    • CDDB extended track data (EXTTn) is passed through to FLAC COMMENT tags for the relevant track
    • Configurable FLAC ALBUMARTIST="Various Artists" metadata tag for multi-artist CDs
    • Enhanced whole disk flac archives with hidden track one audio and cue sheet with track titles
    • Whole disk flac archives are now a format of focus due to their ability to capture an entire album, artwork and other metadata in a single file. Additionally, more music players are able to handle them correctly
  • Improved handling of cover art:
    • Album art selection and handling improvements
    • Define a default local album art directory/file location. If the album artwork download fails or the user chooses to overide the downloaded art, abcde will look for ALBUMARTDIR/ALBUMARTFILE before asking the user to manually enter the filename
    • Cover art is now available for use in multiple output formats (eg flac and mp3) in the same pass
  • Created munge helper functions:
    • munge_fs-safe: remove characters that are not Windows and Linux file-system safe or sane
    • munge_Startcase: capitalise the first letter of every word
    • munge_unicodetoascii: transliterate Unicode to ASCII
    • munge_collapsewhitespace: replace multiple spaces with a single space
    • munge_simplify_punctuation: helper function to standardise unicode and ascii punctuation like apostrophe's and ellipsis
    • mungecddb: this is a pre-processor for looked up CDDB entries to apply local standards, such as capitalisation, removing excess spaces, line endings and punctuation
    • Add new config examples to use munge helper functions
  • Generate a MusicBrainz URL that can be used to submit CD Table of Contents (TOC) if they are not found during the lookup
  • Interactive interface improvements
    • show release year in cddb entry display
    • provide help option in cddb entry selection
      • explain how to diff (show the differences between two CDDB entries)
      • provide option to re-list available entries

Bug fixes, patches and pull requests

Todo

  • Move these Todo items from here to GitHub enhancement Issues
  • Improve CDDB selection dialogue:
    • improve the diff display: show cddb entry number and source (ie musicbrainz, cddb, cd-text, local) in the header
    • highlight CDDB entries with extended info and provide a way to view it (ie -s 'genre,year,ext')
    • make the CDDB entry choice prompt for locally cached (line ~2618) the same as in do_cddbedit (line ~3031)
    • add q quit immediately and x exit cleanly options
  • create a completion report a la rubyrip that shows if any tracks have read errors (adding the -l option to cdparanoia logs the progress bar that can be used for analysis and reporting)
  • review playlist generation
    • add a new playlist option: s sort. Keep the existing playlist, append the new tracks, sort numerically, replace the existing playlist with the new sorted playlist. This new option will permit ripping discs in sets in any order and in parallel. Currently discs in sets need to be ripped sequentially for the generated playlist to make sense.
    • or just make a new playlist every time from the files in the directory sorted numerically - this makes most sense and represents current on-disk truth

Known issues

  • see Issues with the bug label

Installation Instructions

Debian-based systems

Package Installation

Install the distribution version of abcde first to pull in the recommended dependencies and be set up for converting to flac and mp3:

sudo apt install abcde flac eject eyed3 glyrc imagemagick

Then install my latest updated version from the github repo with all the bug fixes, workflow and metadata improvements:

wget https://github.com/poddmo/abcde/releases/download/2.12.2/abcde_2.12.2-1_all.deb
sudo dpkg -i abcde_2.12.2-1_all.deb

Build the package from source

Download the source, extract it, create a package from it and then install the fresh package:

wget -O abcde_2.12.2.tar.gz https://github.com/poddmo/abcde/archive/refs/tags/2.12.2.tar.gz
tar zxf abcde_2.12.2.tar.gz
cd abcde-2.12.2
dpkg-buildpackage -us -uc --build=binary
cd ..
sudo dpkg -i abcde_2.12.2-1_all.deb

Red Hat-based Distributions

Sorry we don't have a package or specific instructions yet. If you're handy at building rpm packages, a pull request would be greatly appreciated by this Debian-derived bloke.

Install from source

wget -O abcde_2.12.2.tar.gz https://github.com/poddmo/abcde/archive/refs/tags/2.12.2.tar.gz
tar zxf abcde_2.12.2.tar.gz
cd abcde-2.12.2
chmod 755 abcde abcde-musicbrainz-tool cddb-tool
sudo cp abcde abcde-musicbrainz-tool cddb-tool /usr/local/bin
sudo cp abcde.1 cddb-tool.1 /usr/local/share/man/man1/

There will be dependencies that you will need to satisfy so I suggest to begin trying to rip a CD and install those that make themselves known. For reference, these are the dependency details from the Debian package configuration:

Depends: cd-discid, wget, cdparanoia | icedax, vorbis-tools (>= 1.0beta4-1) | lame | flac | speex | musepack-tools | opus-tools, libmusicbrainz-discid-perl, libwebservice-musicbrainz-perl (>= 1.0.4-1.1), sensible-utils
Recommends: vorbis-tools, libdigest-sha-perl, bsd-mailx, glyrc, imagemagick
Suggests: eject, distmp3, id3 (>= 0.12), id3v2, eyed3 (<< 0.7~), normalize-audio, vorbisgain, mkcue, mp3gain, atomicparsley

Configuration

  • Configuration is a process you will refine over time as you rip more CDs and play the files on a variety of music players
  • I recommend to get started, just put a disc in your optical drive and type:
abcde -V -G -o flac -d /dev/sr0

This will rip a CD to flac and retrieve the cover art. Then you'll start to get an idea of what to set in the configuration file

  • I don't recommend using the system-wide configuration file: /etc/abcde.conf
  • Use the default per-user configuration: $HOME/.abcde.conf or specify your own configuration file location with the -c command line option
  • Use the system config file as a starting template:
cp /etc/abcde.conf $HOME/.abcde.conf

and look at my configuration file below.

Example Command lines

(1) abcde -V -G -o flac -d /dev/sr0
(2) abcde -V -G -o flac,mp3 -d /dev/sr0
(3) abcde -V -G -o flac -d /dev/sr0 -W 1,2
(4) abcde -V -o flac -d /dev/sr1 -W 2,2

  • Line 1: Verbose rip (-V), download albumart (-G), output to FLAC (-o flac) from CDROM drive (-d /dev/sr0)
  • Line 2: Verbose rip (-V), download albumart (-G), output to FLAC and MP3 (-o flac,mp3) from CDROM drive (-d /dev/sr0)
  • Line 3: The CD in my first optical drive (-d /dev/sr0) is the first disc of a set (-W 1,2)
  • Line 4: I only try to download albumart for the first disc in a set. Disc 2 of 2 (-W 2,2) is in my second optical drive (-d /dev/sr1)

Configuration file example

This is my $HOME/.abcde.conf. The FLACOPTS will only work with flac 1.5.0 or later (I've installed that from source from https://xiph.org/flac/)

export LC_ALL=en_AU.UTF-8
ACTIONS=cddb,cue,read,encode,tag,move,clean
READHIDDENTRACK=y
MAXPROCS=4                              # Run a few encoders simultaneously
PADTRACKS=y                             # Makes track numbers 01 02 not 1 2
EXTRAVERBOSE=2                          # Useful for debugging
COMMENT='ABCDE=2.12.2'                  # Place a comment...'
EJECTCD=y                               # Please eject cd when finished :-)
DIFFOPTS=-y
PAGEROPTS="-fM"
ALBUMARTFILE='cover.jpg'
ALBUMARTDIR="${HOME}/Music"
OVERRIDEALBUMARTDOWNLOAD=y
ANYASCIIBIN="$HOME/bin/anyascii"
LOWDISK=n
CDDBMETHOD=musicbrainz,cddb,cdtext
CDDBCOPYLOCAL="y"
CDDBLOCALDIR="$HOME/.cddb"
CDDBLOCALRECURSIVE="y"
CDDBUSELOCAL="y"
CDDBURL="http://gnudb.gnudb.org/~cddb/cddb.cgi"
CDDBSUBMIT=submit@gnudb.org
NOSUBMIT=n
HELLOINFO="music@hostname"
HTTPGETOPTS="-q -nv --timeout=30 --tries=2 -e timestamping=off -O -"
FLACENCODERSYNTAX=flac
FLAC=flac
FLACOPTS='-s -8pV -j3'
FLACTAGSTARTCASE=y
FLACTAGALBUMARTISTTAGNAME="ALBUMARTIST"
FLACTAGALBUMARTISTVALUE="Various Artists"
AACENCODERSYNTAX=ffmpeg
FFMPEGENCOPTS="-c:a aac -b:a 192k"
CDROMREADERSYNTAX=cdparanoia
CDPARANOIA=cdparanoia
CDPARANOIAOPTS="-L --never-skip=2"
CDDISCID=cd-discid
OUTPUTDIR="$HOME/Music"
OUTPUTFORMAT='${ARTISTFILE}/${ALBUMFILE}/${TRACKNUM}.${TRACKFILE}'
VAOUTPUTFORMAT='Various-${ALBUMFILE}/${TRACKNUM}.${ARTISTFILE}-${TRACKFILE}'
ONETRACKOUTPUTFORMAT='${ARTISTFILE}/${ARTISTFILE}-${ALBUMFILE}${DISCNUMBER:+$(printf -- "-Disc-%02d\\n" "$DISCNUMBER")}'
VAONETRACKOUTPUTFORMAT='Various-${ALBUMFILE}/Various-${ALBUMFILE}${DISCNUMBER:+$(printf -- "-Disc-%02d\\n" "$DISCNUMBER")}'
PLAYLISTFORMAT='${ARTISTFILE}/${ALBUMFILE}/${ARTISTFILE} - ${ALBUMFILE}.m3u'
VAPLAYLISTFORMAT='Various-${ALBUMFILE}/${ALBUMFILE}.m3u'
DOSPLAYLIST=n
DISPLAYCMDOPTS="-resize 900x900 -title abcde_album_art"
CONVERTOPTS="-resize 900x900>"
ALBUMARTALWAYSCONVERT="y"
munge_simplify_punctuation ()
{
        # list of targeted punctuation:
        # RIGHT SINGLE QUOTATION MARK, HORIZONTAL ELLIPSIS,
        # HYPHEN, EN DASH
        sed -e "s/\xe2\x80\x99/\'/g" \
            -e "s/\xe2\x80\x9c/\"/g" \
            -e "s/\xe2\x80\x9d/\"/g" \
            -e "s/\xe2\x80\xa6/.../g" \
            -e "s/\xe2\x80\x90/-/g" \
            -e "s/\xe2\x80\x93/-/g" \
            -e 's/\r//g'
}
mungefilename ()
{
        echo "$@" | \
                munge_unicodetoascii | \
                munge_Startcase      | \
                munge_collapsewhitespace | \
                munge_simplify_punctuation | \
                munge_fs-safe | \
                sed -e 's/\.*$//'
}
mungecddb ()
{
        echo "$@" | \
                munge_collapsewhitespace | \
                munge_simplify_punctuation | \
                munge_Startcase
}

About

abcde audio CD ripper development

Topics

Resources

License

GPL-3.0, GPL-2.0 licenses found

Licenses found

GPL-3.0
LICENSE
GPL-2.0
COPYING

Stars

Watchers

Forks

Contributors