I’ve been interested in a way to burn right from the command line, with a possibility of using one of my Linux computers with a mode as a burn station, ideally I could throw in a CD, it would detect it and start the copy process and eject when done. This post is about a small step in that direction.
I researched it a bit and tried the example given by this page….
But, I modded the $HOME/.cdrdao file a bit to include a list of cddb servers that I pulled off of,http://roozster.info/eac/06.html, plus added a timeout for the cddb set to 10 seconds.
The .cdrdao file goes in your home directory and it acts like a configuration file for the cdrdao program. The help site above goes into details. But, briefly the write buffer at 128, which is 128 seconds, at an 8x burn gives 16 seconds of under-run protection. The device has to be set correctly. My CD burner is at /dev/sr0. According to the help.ubuntu site above, running sudo cdrdao scanbus, will produce an output that yields the device name. For me it didn’t yield a /dev type of connection but rather a 1,0,0 bus attachment type of readout. But I hovered over the CD in the file manager and found out the device mount point from there which was /dev/sr0.
Output from running sudo cdrdao scanbus
Cdrdao version 1.2.2 - (C) Andreas Mueller <email@example.com>
SCSI interface library - (C) Joerg Schilling
Paranoia DAE library - (C) Monty
Check http://cdrdao.sourceforge.net/drives.html#dt for current driver tables.
Using libscg version 'ubuntu-0.8ubuntu1'
1,0,0 : QSI , CDRW/DVD SBW-242, UD22
Paranoia mode is interesting as it provides some repair of the ripped audio, from http://www.linuxcommand.org/man_pages/cdrdao1.html
Sets the correction mode for digital audio extraction.
0: No checking, data is copied directly from the drive.
1: Perform overlapped reading to avoid jitter.
2: Like 1 but with addi-tional checks of the read audio data. 3: Like 2 but with addi-tional scratch detection and repair.
The extraction speed reduces from 0 to 3.
Below is the code that I pull from the site and modded by adding the cddb_servers and cddb_timeout this code is used to create the $HOME/.cdrdao file…
A few good command line options for cdrdao
I also fire the cdrdao command with the options –with-cddb to include the text info onto the burned CD and –eject to eject the CD on a completed burn.
sudo cdrdao copy --with-cddb --eject
This code can be put in a bash script. I created cdcopy.sh to make it simple to fire off from the command line.
Download as cdcopy.sh.txt -> cdcopy.sh
Rename cdcopy.sh.txt to cdcopy.sh, put in home and run chmod 755 on it to make it executable
chmod 755 cdcopy.sh
So far I have used this method to burn about 10 CD’s in the first week I finished trying this and tested them out in a CD player and ripped them both with Media Player and iTunes, all worked well!