rds :: graphikos

[ home | photos | gallery | scheme | notes | blog | facebook | twitter | youtube | last.fm | myspace | del.icio.us | EverythingHerePlus ]

OpenBSD CD Use and Burning Tips (x86)

Various notes and how to information for using and burning CDs with OpenBSD, recorded so I can refer back to them if necessary. Some items may help others. I am greatly indebted to the information on the FreeBSD Diary for getting me started with burning under BSD a little over a year ago. Remember that any write to hardware commands require root or sudo, burning included.

Contents
Audio CD Backup or WAV CD Creation/Duplication
8cm CD-R MP3 CD Experience

Audio CD Backup or WAV CD Creation/Duplication

Backing up a legally purchased Audio CD or creating a CD with audio files generated in a music program isn't very difficult under OpenBSD. Since I have an ATA/IDE based burner that isn't supported by the cdda2wav program, cdparanoia is necessary for Audio CD backups. I use the same directory for these operations so I can have all these commands pre-typed in a file for easy execution.

Audio CD Backup Sequence

# everything as root
cd /mnt/free/wavs
cdparanoia -vsB 
	# cdparanoia flags any errors when extracting, pay attention
	# it may seem superfluous, but don't forget to eject read CD and insert blank
	# I always run -dummy to avoid coasters
cdrecord -v speed=16 -dummy -dao -pad dev=/dev/cd0c /mnt/free/wavs/*.wav
cdrecord -v speed=16 -dao -pad dev=/dev/cd0c /mnt/free/wavs/*.wav

WAV CD Creation/Duplication

# everything as root
cd /mnt/free/wavs
	# make sure that all the files you want are there and that no non-WAV files
	# are in the directory, burns alpha-numeric, so ensure files are named to
	# create desired order I always run -dummy to avoid coasters
cdrecord -v speed=16 -dummy -dao -pad dev=/dev/cd0c /mnt/free/wavs/*.wav
cdrecord -v speed=16 -dao -pad dev=/dev/cd0c /mnt/free/wavs/*.wav

8cm CD-R MP3 CD Experience

The Philips act300 (aka Nike psa[cd8), uses 8cm CDs as its MP3 media. It came with a single CD-R which I promptly burned on the G4 at work with iTunes to make sure the player worked actually worked (I bought as refurbished from Philips online). On the way home I picked up a 50 pack of 8cm CD-Rs and was astonished at their greater capacity at 210MB/24 Minutes. Thinking it was going to be a simple task to create them on my i386 OpenBSD 3.3 box at home, I found myself frustrated for hours. I viewed the burned CD to determine the correct directory structure and decided I wouldn't try duplicating Apple's p-list. I scp'd the directories over to the OpenBSD box and placed prefix numbers on them so they would be in the desired order. I ran mkisofs to create the ISO image.

Everything was ready, now time to burn. For a long time I could get cdrecord to seemingly even acknowledge disks were in the reader. I then tried a dummy run using a 12cm CD-R and saw no problems. I searched the web over and over for clues, but turned up none. I couldn't use mount to check if the reader saw them because they were blanks. I tried mounting the burned 180MB/21 Minute one and it worked. I then realized that it just might be something in cdrecord that I hadn't tried.

Time for careful man page reading and attempts at burns using the -dummy switch until something worked. My first inclination was to try the -overburn option, thinking that it was because they had a larger than original 8cm capacity. That didn't work so I stumbled on the next command in the man page. I tried -ignsize out of desperation and cdrecord recognized the media. The burn still ended in error and I felt uncomfortable with the description of the option, but kept trying various options with it until it seemed that I might get a burn. My first two attempts were coasters. I then added the -data flag before the ISO file. The first successful burn displayed short file names on the MP3 player, so I checked Apple's site for info on MP3 CD formats and I revisited the mkisofs man pages. The mkisofs call below works well.

Directory Structure

I use iTunes' numeric prefix option, so the song files already were numbered. The following directory structure seemed indicated:

/mnt/xtra/mp3/
	Led Zeppelin
		01 Led Zeppelin I
		02 Led Zeppelin II
		03 Led Zeppelin III
		04 IV

ISO Image

The information from Apple's site was helpful, and I might actually try a hybrid CD with a p-list like their's someday. However, there isn't much use in having iTunes automatically recognizing the songs as the songs originated from iTunes in the first place.

# generic call mkisofs for mp3 cds
mkisofs -V name -iso-level 3 -RJ -o new.iso directory

# call used in this example (pwd /mnt/xtra)
mkisofs -V mp3_cd -iso-level 3 -RJ -o mp3.iso mp3

Burn Command

Even though I only have a 16 speed burner, I always run -dummy and then burn if it was successful to avoid coasters. Some people don't care about that, but I think it is wasteful not to even if CD-R media is inexpensive.

# generic call mp3 8cm 210MB
cdrecord -v speed=16 -ignsize -pad dev=/dev/cd0c -data name.iso

# call used in this example (pwd /mnt/xtra)
cdrecord -v speed=16 -ignsize -pad dev=/dev/cd0c -data mp3.iso

act300_l_us.jpg
Needless to say I was overjoyed when the MP3 player read the CD and displayed the long filenames. I am very pleased with unit so far and the ability to fit the first four Led Zeppelin albums on a tiny disk is terrific. I compared MP3 players for a very long time before I decided that an 8cm CD portable fit my needs best. I convert my legally purchased Audio CDs to MP3 using LAME with the following setting --abr 160 -h. I can't distinguish that rate from AIFF/WAV at all, especially with consumer headphones. I use iTunes-LAME in conjunction with iTunes to take advantage of simple ID3 tag and file management with LAMEs better encoding options.