Command-Line – How to Burn a .flac to an Audio CD

burningcdcommand lineserver

This is a two part question.

Can I burn .flac to audio cds?

this might seem silly, but I was an early adopter of mp3 players. Think several years before Ipods. I never really had the need to burn too many cds. My girlfriend, however, keeps asking for cds for her cars cd player. I do have a huge collection. Most of which from artists who have a live recording policy. So sorry, no help on illegal downloads from me. So, can I give her great quality music, or will I need to convert these to mp3s? If this is the latter, what format might one suggest? Google seems to indicate that it is indeed possible.

How do I burn these files from the command line?

I am probably going to burn straight from my file-sever, which is headless machine (10.4)? I do have some .cue files, but ironically they seem to point to .wav files, where the files in question are .flac files. Am I able to utilize these .cue files?

Best Answer

Rant:

I would suggest you convert FLAC files to MP3 instead making AudioCD. Why?

  1. You can't possibly notice difference between lame -V 5 (or even lower) and original source listening in a car
  2. You'll save yourself time in the process and save $ on plastic, as space needed would be ~10 times reduced this way, plus you wont need to browse for CDs to find single album ;)

Procedure:

  1. Convert FLACs to MP3 with lame (lame recommends -V2, but in your case I'd go with -V5):

    flac -d -c track.flac | lame -V 5 - track.mp3

    example for processing all FLAC files in current folder:

    for f in *.flac ; do flac -d -c "$f" | lame -V 5 - "${f%.*}.mp3" ; done

  2. Convert MP3 folder structure to Joliet folder structure ISO image
    After you have converted FLAC files to MP3 arange MP3s in folder structure (i.e. /artist/album/track) than make ISO image like this:

    mkisofs -J -o /tmp/MP3-CD.iso /path to root of MP3 folder structure/

    Note: you can't go above 700MB, check for space first

  3. Burn ISO image

    wodim dev=/dev/sg1 -dao speed=8 -eject /tmp/MP3-CD.iso

    Note: Use wodim --devices to check for your device. dev=/dev/sg1 is valid for my system

Voila

Related Question