On a Linux system, I am intending to convert some audio files (mp3) and write them to an audio CD. Instead of directly writing to an optical disk, I would prefer to somehow redirect the output to an image file which can be burned later.
Specifically, I attempted the following steps:
create a file to be written to (700 MiB, 777 permissions)
dd if=/dev/zero of=./cd.img bs=$((1024 * 1024)) count=700
attach file to loop device (
/dev/loop0
, asroot
)losetup --sizelimit 700MiB /dev/loop0 ./cd.img
use
mp3cd
software to convert, normalize ... and ultimately write audio files to audio CD (as root)mp3cd --verbose --driver generic-mmc-raw --device /dev/loop0 ./audio/{01..03}.mp3
mp3cd
fails on its last step, "burn". The file /tmp/mp3cd-root/tool-output.txt
contains a hint that an SCSI command inquiry on /dev/loop0
failed. Most likely, I am missing some options in the losetup
command.
In addition to achieving the image creation in this particular case of an audio cd, I would be thankful for some pointers on how images for data CDs/DVDs could be prepared in a similar way.