Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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?

share|improve this question
How does your CUE sheet look like? – zetah Sep 19 '11 at 21:09
You can make data CD with MP3s (as FLACs probably wont play on any car CD player) or you can convert FLAC to WAV and create AudioCD. Choice is yours – zetah Sep 19 '11 at 21:10
1. Cue sheet looks like every other proper cue sheet i've ever seen. Less the .wav in place of .flac. 2. How would I accomplish this from the command line? – matchew Sep 20 '11 at 0:43
I was asking because it was not clear to me if CUE sheet was referencing one "image" WAV file or separate files. However I'll provide you solution in couple of minutes/hours which I think would be best for your scenario. – zetah Sep 20 '11 at 15:57
ah, I see. its not a single file/img to such a .bin/.cue but instead I have multiple .flac files and the .cue sheet reads as multiple wav files. I have been able to convert to .wav simply by flac -d *.flac, but now I am searching for a command line alternative to write the disc. I did find a solution but it required me finding my write offset of my drive. I was going to research more after work. Thanks – matchew Sep 20 '11 at 16:05
up vote 3 down vote accepted


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 ;)


  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


share|improve this answer
thanks, although your rant is wasted. While I may not be able to empirically argue point one, point two is mute. Space is hardly an issue. its not hard to do rm *wav, but the money on plastic is not a problem either due to my preference to make exact copies of some CDs, I do accept your notion on being able to add more tracks, but it does not apply in my case.... Also any thoughts on burning from the .cue's I have laying around. Anyway +1, I am going to leave this open a few days before accepting an answer. Thanks. – matchew Sep 20 '11 at 18:52
Sorry to read your comment, but you have your preferences. I won't be able to provide you walk through for making AudioCDs with your CUE sheets, because of my already posted answer. Look for cdrdao package, and accompanied documentation – zetah Sep 20 '11 at 19:47
thanks your answer has been helpfull =) – matchew Sep 20 '11 at 19:55
well, I still didn't find precisely what I'm after, but I appreciate the help. Looking at cdrdao it looks rather simple, but i keep recieving the error Pregap Out of Range. I feel this may be an error with the .cue file, but its hard to understand. Thanks. – matchew Sep 25 '11 at 20:40
Something must be wrong with your CUE sheet(s) and there are many ways for it. I guess cue2toc will report same error. You could try cdrtools (cdrecord) as alternative, or just convert files to WAV and make AudioCD without CUE sheet – zetah Sep 26 '11 at 6:31

For those that don't need to have a command line option, K3b and Brasero are supposed to be able to do it, however I could not make the latter work on my 12.04 64 bit machine, but it's working fine with K3b.

For this to work you need to:

  • have a .cue file for your image, make one manually if you don't
  • enable the K3b FLAC Decoder plugin
  • install the FLAC++ library (sudo apt-get install libflac++6)

See also the K3b requirements page.

share|improve this answer
The last two points were unnecessary for me. I had a .cue file available. I installed the K3b and I was able to burn .cue file without changing any option - right out of the box. – djhurio Jul 4 '14 at 5:14
Brasero works just fine for me on 14.04 – Jeff Puckett II Jun 16 at 4:07

In a directory that contains the .flac files you want to burn and nothing else:

for x in *.flac ; do flac -d "$x" ; done
wodim dev=/dev/cdrw -v -sao -useinfo -text -audio -pad driveropts=audiomaster *.wav
/bin/rm *.wav

(Assuming the location of your optical drive is /dev/cdrw.)

share|improve this answer

Stumbled upon this old question as I was googling around with the same problem. I think this guide explains pretty well how to deal with .flac & .cue combos, especially with noncompliant .cue.

share|improve this answer
Welcome to Ask Ubuntu! Whilst this may theoretically answer the question, it would be preferable to include the essential parts of the answer here, and provide the link for reference. – Eric Carvalho Jul 8 '13 at 17:50

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.