command line ripping and encoding

general = { about, articles, links, projects }     meta = { date-posted: 2006-11-11 }

I found a great program for ripping and encoding my cd's today. It is called abcde.

I found the best results with running abcde twice.

First, you run it with the following command:

$ abcde -N -a cddb,read

You do that for each cd. Then, you are left with a temp directory full of wav files. I created a simple bash script to convert those all into ogg's.

#!/bin/bash
TMPDIR="/path/to/tmp/dir/"
for X in `ls ${TMPDIR}`; do
  if [ ! -f ${TMPDIR}${X}/cdparanoia-audio-tracks ]; then
    ls ${TMPDIR}${X}/*.wav | wc -w > ${TMPDIR}${X}/cdparanoia-audio-tracks
  fi
  abcde -N -a normalize,encode,tag,move,clean -C ${X##abcde.}
done

Here is an example .abcde.conf file.

# temp dir for wave file storage
WAVOUTPUTDIR="/wav/temp/dir"

# output format
OUTPUTTYPE="ogg"

# output directory
OUTPUTDIR="/path/to/storage/dir"

# general output format
OUTPUTFORMAT='${ARTISTFILE}/${ALBUMFILE}/${TRACKNUM}_${TRACKFILE}'

# output for albums with various artists
VAOUTPUTFORMAT='Various_Artists/${ALBUMFILE}/${TRACKNUM}_${TRACKFILE}'

# your cd device
CDROM="/dev/hda"

# set to the number of cpu's you have
MAXPROCS="2"

# do you want to eject the cd?
EJECTCD="y"

# passed to oggenc
OGGENCOPTS="-q6"

# i like my tracks zero padded
PADTRACKS="y"

# set batch mode
BATCH="y"

# path/name of normalizer
NORMALIZE="normalize"