Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 21 Apr 2001 13:33:23 +0100
From:      Ben Smithurst <ben@FreeBSD.org>
To:        andrew@ugh.net.au
Cc:        freebsd-questions@freebsd.org
Subject:   Re: Duplicating Audio CDs
Message-ID:  <20010421133323.B42151@scientia.demon.co.uk>
In-Reply-To: <20010421221914.X40225-100000@starbug.ugh.net.au>
References:  <20010421221914.X40225-100000@starbug.ugh.net.au>

next in thread | previous in thread | raw e-mail | index | archive | help

--RnlQjJ0d97Da+TV1
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline

andrew@ugh.net.au wrote:

> As this is a duplication (the original CD was burnt by a burning "machine"
> rather than a computer which supported all sorts of funny tricks including
> DAO) I can get a a cd image using dd but how do I burn the image to
> another CD?
> 
> If I use "burncd -f /dev/cdrom -s 8 audio cd.image fixate" I'm guessing it
> will just write it as one track rather than the several on the origianl
> CD? As the file would be a CD image should I use data instead of audio?

I'm sure there's an easier way, but I've used the attached kludgy script
successfully.

-- 
Ben Smithurst / ben@FreeBSD.org

--RnlQjJ0d97Da+TV1
Content-Type: text/plain; charset=us-ascii
Content-Disposition: attachment; filename=copycd

#!/bin/sh

set -e
SRC=/dev/acd1
DST=/dev/cdr
TMPDIR=`mktemp -d /tmp/copycd.XXXXXXXXXX`

cd $TMPDIR

tracks=`cdcontrol -f $SRC info | awk '$6 == "audio" {print $1}'`
fifos=""
for i in $tracks; do
	fifos="$fifos fifo$i"
done

mkfifo $fifos

(sleep 3; burncd -q -s 2 -f $DST audio $fifos fixate) &
for i in $tracks; do
	echo Copying track $i...
	dd if=${SRC}t$i of=fifo$i bs=2352 2>output || {
		cat output
		false
	}
done
echo Written tracks, fixating CD...
wait
test $? = 0
echo Done.
rm $fifos output
cd /
rmdir $TMPDIR

--RnlQjJ0d97Da+TV1--

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20010421133323.B42151>