encoding a cue/bin raw cd audio file to flacPublicado; 20/10/2010
quite a while ago I downloaded an audio in a pair cue/bin . the cue file is a description of the cd, with the tracks and its lengths, while the bin file is the raw data of the disc.
obviously, I was not willing to burn it to a cd. but, to listen to it and still mantain the quality of the cd audio, I did some research about the how-to-convert stuff and decided for the flac audio format (flac stands for free lossless audio codec).
I’ve done the following steps in a fedora 14 beta 64 bits box.
first of all, you need to split the bin file. for this, you’ll need the bchunk tool
$ bchunk -v myfile.bin myfile.cue <prefix>
you’ll need to provide a prefix for your files, and they will be named prefix01.cdr, prefix02.cdr etc. in my system, bchunk automatically provided the cdr suffix, which, rowghly, means “cd raw”.
after that, you’ll need to encode the files. in the code below, you’ll see how to convert a single file:
$ flac --force-raw-format --endian=little --channels=2 --bps=16 --sample-rate=44100 --sign=signed prefix01.cdr
the parameters mean:
- force-raw-format: informs explicitly that you’re dealing with a raw audio file
- endian=little: the endianness of the raw file
- channels=2: the number of channels of the raw file
- bps=16: the number of bits per audio sample
- sample-rate=44100: the sample rate
- sign=signed: informs that your samples are signed values
i don’t know if these options will be the case for you, but it worked for me. 😀