Audio CD Ripper

A customisable cdripper script.

cdripper

It took me a while to get this functioning how I wanted it.. but it seems to do the job.  The script can be run as any user from any location.  It will create a config file in ~/.cdripper and work in ~/tmp.  I bunged it in /usr/local/bin ($PATH) and made it executable.  The config file will be used  for defaults, but any arguments passed on the command line will over rule it.

There are a couple of functions that require an internet connection ie: cddbdb and sample offset values.  If no net connection is available, then cdtext will be used for id3tag and no sample offset will be used.

Features:
Can use CDTEXT or FreeDB for id3tag info.

Dependencies: (Versions at time of creation.)

cdparanoia III release 10.2
cdda2wav 3.00
LAME version 3.98.4
id3tool version 1.2a
id3v2 0.1.11
Uses id3lib-3.8.3
flac 1.2.1
cd-discid 0.9
cddb-tool version 0.4.7
traceroute (used instead of ping due to some networks blocking ICMP traffic)
libwww-perl (used for the GET binary to grep web pages)
vorbis-tools 1.4.0

TO DO:
Add other formats to encode to ie shn, wv, ogg
Add more arguments or config file.
Do an ebuild :)
Convert from bash to perl (add freedb submission)

Tweaks and Fixes:
13th Nov 2011: Added WAV support
19th Nov 2011: Added OGG support
21st Jan 2012: Added ripping to wav image with cue file
11th Feb 2012: Added rip speed, tidy log file, corrected removal of temp files.

How to use:
Several arguments can be passed at runtime.  Any arguments not used, the defaults will be used.

The current defaults are:
Device: /dev/sr0 (auto detected)
Sample Offset: (grepped from accurip)
Encoder: LAME
Bitrate: 320kbps CBR
Mode: Stereo
Quality: 0
CDDB: FREEDB

OPTIONS:

-d<devicenode>      usually /dev/sr0 
-b<bitrate>         lame bitrate 
-o<quality>         ogg quality 
-t<track #>         all|single|range|image
-e<encoder>         lame|flac|wav|ogg 
-c<cddb>            local|net
-s<rip speed>       cdparanoia rip speed