Our CD’s are getting a bit old now, and if you have a large collection, ripping them to your iTunes collection gets tedious quickly. The fastest, most efficient way as always, is to use the command line. The Linux program abcde “A Better CD Encoder” is a fantastic, simple binary for the task. Like many other Linux packages, it has dependencies. The following line, is an example of how to rip an Audio CD, and re-encode the wav file to quality 320Kbps mp3 files written to your home directory.
abcde -o mp3:”-b 320″ -a move,clean
The following script, which I’ve called mytunes.sh will handle all dependencies if needed, and run the above command so you don’t have to remember the syntax. Don’t forget to chmod 777 it to make it executable.
#!/bin/sh
# This script will turn your CD into a bunch of fully tagged mp3 files. Just pop the CD in, and run ./mytunes.sh
# Software pre-req checks…
if [ ! -f /usr/bin/cdparanoia ]; then
print “Attempting to retrieve the cdparanoia cd ripping package…”
sudo apt-get install cdparanoia
fi
if [ ! -f /usr/bin/lame ]; then
print “Attempting to retreive the lame mp3 encoding package…”
sudo apt-get install lame
fi
if [ ! -f /usr/bin/abcde ]; then
print “Attempting to retreive abcde A Better CD Encoder package…”
sudo apt-get install id3v2 cd-discid abcde
fi#Yes, you read it right. One line of actual code to do the meaty bit.
abcde -o mp3:”-b 320″ -a move,clean# SOFTWARE PRE-REQUISITES (handled by script if non-existent)
# cdparanoia Takes the wavs off the CD
# lame mp3 encoder
# abcde A Better CD Encoder
# cd-discid Uses the Disc ID to obtain CDDB information for mp3 files.
# id3v2 Command line id3 tag editor