Ripping audio CD's from the shell

Written by Martijn Braam on 2014-11-03

This blogpost describes the tools I use to rip backup audio CD's to FLAC files from the shell using abcde. The same workflow is usable to rip to MP3 files.

The first step is to install the required tools.

# Replace flac with lame for mp3 encoding
$ apt-get install abcde flac

Now you could just run abcde with a lot of command line parameters but that is slightly impractical when ripping 100+ CD's. Luckily you can configure it completly from the config file ~/.abcde.conf

This is my ~/.abcde.conf with some comments:

# Use lame here to encode to mp3
OUTPUTTYPE=flac

# In interactive mode it asks which CDDB information is correct.
INTERACTIVE=y

# The base directory to output to.
OUTPUTDIR=~/Music/

# This makes it export to artist/album/01 - track.flac
OUTPUTFORMAT='${ARTISTFILE}/${ALBUMFILE}/${TRACKNUM} - ${TRACKFILE}'

# This is the output format for disks with various artists
VAOUTPUTFORMAT='Various/${ALBUMFILE}/${TRACKNUM} - ${TRACKFILE}'

# Enable zero padding of track numbers
PADTRACKS=y

# Maximum of 7 encoding processes
MAXPROCS=7

# Eject the disk after encoding
EJECTCD=y

With the config file set-up the only thing left to do is start abcde in your terminal:

$ abcde
# If you use multiple CD drives:
$ abcde -d /dev/sr0

If you have multiple CD drives (I've used 4 cheap USB drives) you can start an abcde process for every drive and rip multiple CD's at the same time.