abcde

Posted by fitheach on Fri 15 May 2015
In the "old days" I used a really nice GNOME GUI app called Grip for ripping CDs. The interface was so nice that I would invariably use it for playing CDs too. I decided recently to make copies of my CDs for use on my tablet and mobile 'phone. However, I was dismayed to find that my old standby no longer existed in Debian. Unfortunately, the last stable release of Grip was in 2005. Around 2010, due to bugs, it was dropped by Debian.
There is a very similar GUI app, for ripping anyway, called Asunder but it doesn't seem to allow sorting rips into Artist/Album/Track hierarchy instead opting for Artist-Album/Track. So, for example, this would give Queen-A-Day-At-The-Races/ and Queen-A-Night-At-The-Opera/ as the top level directories rather than just Queen. I'm fussy, I like things just so. The hundreds of CDs in my collection with sometimes multiple albums per artist would give me too many top level directories.

abcde - obligatory screenshot

abcde - obligatory screenshot

There is another GNOME (GTK) alternative Sound Juicer, which also looks nice, but I couldn't be bothered investigating another GUI app just to find the config didn't allow this or that.
Instead I discovered abcde which is console and script based and most importantly is very flexible. Installation on Debian is the usual:

apt-get install abcde

You might want to spend some time setting up your preferred options in the config file but once that is done ripping is very fast and efficient. The following code block shows my config file with the very verbose comments removed for the sake of brevity.

cat ~/.abcde.conf
CDDBURL="http://freedb.freedb.org/~cddb/cddb.cgi"
CDDBCOPYLOCAL="y"
CDDBLOCALDIR="$HOME/.cddb"
PADTRACKS=y
OGGENCOPTS='-q6'
OUTPUTDIR="$HOME/temp/RIP"
WAVOUTPUTDIR="$HOME/temp/RIP"
OUTPUTFORMAT='${ARTISTFILE}/${ALBUMFILE}/${TRACKNUM}-${TRACKFILE}'
VAOUTPUTFORMAT='Various/${ALBUMFILE}/${TRACKNUM}-${ARTISTFILE}-${TRACKFILE}'
PLAYLISTFORMAT='${ARTISTFILE}/${ALBUMFILE}-${OUTiPUT}.m3u'
VAPLAYLISTFORMAT='${ARTISTFILE}/${ALBUMFILE}-${OUTPUT}.m3u'
EJECTCD=y

You can also find lots of example configs for all the encoding targets on this website.

To begin ripping insert a CD into your drive and run the script using abcde.

abcde
Looking at EXTRAVERBOSE ()
Grabbing entire CD - tracks: 01 02 03 04 05 06 07 08 09 10 11
Retrieving 1 CDDB match...done.
---- Richard Thompson / Electric ----
1: Stony Ground
2: Salford Sunday
3: Sally B
4: Stuck On The Treadmill
5: My Enemy
6: Good Things Happen To Bad People
7: Where's Home?
8: Another Small Thing In Her Favour
9: Straight And Narrow
10: The Snow Goose
11: Saving The Good Stuff For You

Edit selected CDDB data [y/N]?

As you can see, in the code block above, abcde queries your CD in the specified database and presents the data which you can choose to edit if desired. If there are multiple entries you will be prompted to choose one.

I chose not to edit the CDDB entry and the CD is not multi-artist. abcde will now proceed to create an intermediate WAV file for each track on the CD. I have chosen to have the WAV files deleted after processing but it is also possible to save them for further use.

Edit selected CDDB data [y/N]? N
Is the CD multi-artist [y/N]? N
Grabbing track 01: Stony Ground...
cdparanoia III release 10.2 (September 11, 2008)

Ripping from sector       0 (track  1 [0:00.00])
      to sector   21212 (track  1 [4:42.62])

outputting to /home/user/temp/RIP/abcde.a40bbf0b/track01.wav

 (== PROGRESS == [                              | 021212 00 ] == :^D * ==)

Done.


Grabbing track 02: Salford Sunday...
cdparanoia III release 10.2 (September 11, 2008)

Ripping from sector   21213 (track  2 [0:00.00])
      to sector   39842 (track  2 [4:08.29])

outputting to /home/user/temp/RIP/abcde.a40bbf0b/track02.wav

 (== PROGRESS == [                              | 039842 00 ] == :^D * ==)

Done.
....

I have chosen to encode the WAV files as OGG/Vorbis but you could equally choose MP3, FLAC, Opus etc.

...
Encoding track 11 of 11: Saving The Good Stuff For You...
Opening with wav module: WAV file reader
Encoding "/home/user/temp/RIP/abcde.a40bbf0b/track11.wav" to
         "/home/user/temp/RIP/abcde.a40bbf0b/track11.ogg"
at quality 6.00
    [ 99.8%] [ 0m00s remaining] |

Done encoding file "/home/user/temp/RIP/abcde.a40bbf0b/track11.ogg"

    File length:  3m 54.0s
    Elapsed time: 0m 05.1s
    Rate:         46.2210
    Average bitrate: 178.2 kb/s

Tagging track 11 of 11: Saving The Good Stuff For You...
Finished.

Once the encoding is finished each file is then tagged with the data from the CD database. Finally, I have chosen to have the CD ejected once the process is finished as I find it is a useful visual clue that the job is done. The output above may give the impression that the procedure is complex which it isn't. Typically it is just a case of entering "abcde", answering the two boolean questions and then let the script get on with the job.

Depending on the size of CD and the speed of your hardware it is easily possible to rip 10 or more CDs per hour.

Many thanks to the authors of abcde for a great piece of software.


Related posts: