[Flac] FLAC CD Archive

Dax Kelson dax at gurulabs.com
Tue Sep 26 09:47:01 PDT 2006


On Tue, 2006-09-26 at 13:09 +0200, Dan Phillips wrote:
> I have read some posts about using FLAC to archive CD collections and
> would like to get some feedback. I am torn between creating a bin and
> cue file with CDDB info and compressing that down with FLAC as a single
> file or the second method of ripping all the files out to wav and
> converting to FLAC and maybe saving the cue file in attempt to use it later.
...
> I just wondered if there were any more thoughts on this and if the
> second method could actually be used to reproduce the original CD?

I went with the one song per flac file approach with the ability to
reproduce the exact original CD if needed.

The Ripping/Encoding process goes like this:

cd-discid /dev/hdc > discid.txt
cdrdao read-toc --device /dev/hdc toc.txt
cdrdao read-cddb toc.txt
Now rip and encode to FLAC (each track separate) with metadata. 

I have a modified abcde that does this. The modification is in my
abce.conf I added is:

post_read ()
{
# Figure out what OUTPUTFILEDIR should be
export `eval $($CDDBTOOL parse "$CDDBDATA")`
export ALBUMFILE=$(mungefilename "$DALBUM")
splitvarious
export ARTISTFILE=$(mungefilename "$TRACKARTIST")
export OUTPUTFORMAT='${ARTISTFILE}-${ALBUMFILE}/${TRACKNUM}.${TRACKFILE}'
export VAOUTPUTFORMAT='Various-${ALBUMFILE}/${TRACKNUM}.${ARTISTFILE}-${TRACKFILE}'
if [ "$VARIOUSARTISTS" = "y" ]; then
    export OUTPUTFILE=$(eval echo $VAOUTPUTFORMAT)
    else
    export OUTPUTFILE=$(eval echo $OUTPUTFORMAT)
fi
export OUTPUTFILEDIR=$(dirname "$OUTPUTDIR/$OUTPUTFILE")
# Sheesh glad that is done. Now save the discid.txt for comparison later
# and the toc.txt
mkdir -p "$OUTPUTFILEDIR"
cd-discid $CDROM > "$OUTPUTFILEDIR/discid.txt"
cdrdao read-toc --with-cddb --cddb-timeout 90 --device $CDROM "$OUTPUTFILEDIR/toc.txt"
}

And then I inserted a call to my post_read into abcde.

Edit the abcde script and right before the line:
# We are now finished with the cdrom - it can be safely ejected. ...

Add the line:

post_read # Execute the user-defined post-read function before ejecting

Now to go back to the other direction, create an "original CD" (ie, one
with the same CDDB discid), do the following:

cd /path/to/album/
shntool join --stdout *.flac > data.wav
cdrdao write --device /dev/hdc toc.txt
rm data.wav

This is the procedure I used on several hundred CDs I own in order to
get a FLAC archive of them. I use several Squeezeboxes in my house to
listen to them.

Dax Kelson
Guru Labs



More information about the Flac mailing list