Raw audio CD image to flac?

I have many old CDs that I want to convert to flac files. I've used safecopy to burn them to iso images. I use safecopy as it is really good at recovering old disks. But my question is: what do I use to convert the iso image to flac files? I've found a few (eg: k3burn) which will happily read the iso image, but it wants to output it to a CD/DVD, which is not what I want. I'd like it to be smart enough to recognise the different tracks: track01, 02, etc, is good enough. I can add the metadata myself. I've also tried VLC (it doesn't seem to work) and handbrake (only seems to be for mv4 format). So, how do I convert a music CD iso image to flac? Thanks!

mount your music iso's in a loopback,
example:
mkdir -p /mnt/music01

mount -o loop music01.iso /mnt/music01

and then use k3b, to convertt tracks inside /mnt/music01 to flac files.

Thanks, but I got this: mount: /mnt/music01: wrong fs type, bad option, bad superblock on /dev/loop0, missing codepage or helper program, or other error.

oh sry, I was thinking ".bin" image file with toc, cue's...?
Not sure how you used "safecopy", but yes, Audio CDs do not have file systems for tracks. It is raw data burned to the disc.
What you have isn't an ISO but raw data of the disc.
mmm?

it's got an .iso extension. I'm assuming it's a disk image.

Hmm... try
mount -t iso9660 nameof.iso /mnt/music

Can k3b load audio ISOs?

yes I know you have ".iso", and here is why it may not work.

thanks again, but same error. I've done this before... I just can't remember how.

You sure it was an ISO file?

Try a CD-ROM drive emulator like cdemu (cdemu-client and cdemu-daemon in the repos)

1 Like

what's the output of:
iso-info -i <your_audio_cd>.iso

++ WARN: unexpected PVD type 0
iso-info: Error in opening ISO-9660 image

did you try @anon23612428 "cdemu" virtual cdrom-drive emulator, from his post above?
As long as your .iso or .bin was imaged properly with safecopy, then just "load" the image file, (preferably the .toc file, if it made it), with the CD-drive emu, and then just rip it.

as @sueridgepipe pointed, ISO don't support multi-track, while audio cds are multi-track

According to safecopy webpage

Safecopy includes a low level IO layer to read CDROM disks in raw mode

Let's make a step behind to see what are really your ISO files with 'file' command

file .iso

Mount the image, when you have find what kind of image is, and then use a CD ripper like Asunder or abcde

Unfortunately "safecopy" doesn't make a companion ".toc" file, and without the respective ".toc" file, K3b will not be able to import it for burning. -cause there's no audio track list, named or otherwise. -so I'm not sure how you did this ?

Anyway, here's what will work for you.
Use Audacity -> File -> Import -> Raw Data... , (select your audioCD.iso), and then adjust the parameter window to:
safecopy_audacity
You can then edit/save/export your own Tracks, by hand, to (lossless)flac, ...

On a side note, in the past I preferred K3b to image/clone my old AudioCD's, because it also created the proper .toc file for easy import/burn later with K3b, and some other tools...

1 Like

a bit OT here, but I remember trying safecopy, years ago, but only once, because of their stated support of AudioCD's from:
http://safecopy.sourceforge.net/ , and their old man page, TL;DR.
"The type of a CD (Audio, Mode1, Mode2, etc...) is now successfully detected, and sector alignments are calculated correctly. "

So ya, now I'm just curious, regarding old AudioCD's,

Were you ever able to import your safecopy made .iso image into Audacity or not !?

@stroudmw I guess title should be changed to Raw audio CD image to flac

1 Like

that's correct.

No, I wasn't successful. Actually, it seems there's an issue with safecopy: It gets to 99% and my computer freezes. This also happens on Debian. Maybe it's related to systemd because it doesn't happen on Antix.

On Mint, or Manjro/Arch, I remember mine got to 99% to, (same as you), and no matter what, it would hang my system?. After a few minutes I would hard-reset, BUT, I was still able to import it successfully into Audacity afterwards.

Ok so, the only (2) safecopy commands that worked for me, (for AudioCD's only), in order of best to worst is:

safecopy -b 2352 -L 2 /dev/sr0 audioCD.iso    (<---best/fastest)
or,
safecopy --stage1 /dev/sr0 audioCD.img

(also, the above dest file doesn't matter if it's named .iso, .img, bin, ..., since it's just RAW data.)

So how did you run safecopy?, 'cause mine were all fine, (importing raw into Audacity), but then again, even my older CD's never needed more than "--stage1" to search for badblocks?

Forum kindly sponsored by