Creating audio CD using Cue/Bin

Technical issues/questions of an intermediate or advanced nature.
User avatar
Rava
Contributor
Contributor
Posts: 5416
Joined: 11 Jan 2011, 02:46
Distribution: XFCE 5.01 x86_64 + 4.0 i586
Location: Forests of Germany

Creating audio CD using Cue/Bin

Post#1 by Rava » 01 Nov 2023, 11:36

I did not create an audio CD in many years, I used to be quite proficient in doing it, but it seems the info I stored about the process is lacking some intermediate parts.

As far as I can remember, it is the best to create a Cue/Bin combination out of the *wav files and burn that to a CD, since this way one could easily burn a CD with 10x speed and the resulting audio quality is very good.

I think DAO is the correct writing mode.

But I do not recall which program I did use to create the Cue/Bin file combo out of the wav files (or for my current example: the single wav file)

And I prefer a command line solution.

cdrecord could have been one of the programs for burning.
man mkisofs only speaks of DVDs when it comes to audio, CDDA is not to be found (when searching for uppercase CDDA)

But most likely, cdrdao could have been the program I used:
man cdrdao

Code: Select all

CDRDAO(1)                   General Commands Manual                  CDRDAO(1)

NAME
       cdrdao - reads and writes CDs in disc-at-once mode
Anyone still writing audio-CDs who can give me some pointers on how to create the Cue/Bin from wav file or wav files?


And no, no audio CD source exists, I do not want to copy an audio CD but want to create an audio CD from a wav file that got edited / created on the PC.
Cheers!
Yours Rava

beny
Full of knowledge
Full of knowledge
Posts: 2098
Joined: 02 Jan 2011, 11:33
Location: italy

Creating audio CD using Cue/Bin

Post#2 by beny » 01 Nov 2023, 18:20


User avatar
Rava
Contributor
Contributor
Posts: 5416
Joined: 11 Jan 2011, 02:46
Distribution: XFCE 5.01 x86_64 + 4.0 i586
Location: Forests of Germany

Creating audio CD using Cue/Bin

Post#3 by Rava » 01 Nov 2023, 18:44

beny wrote:
01 Nov 2023, 18:20
hi,https://www.dosbox.com/wiki/Cuesheet
Quoted from the above
In order to produce a CUE/BIN pair with Linux use the commands

Code: Select all

cdrdao read-cd --datafile image.bin --driver generic-mmc:0x20000 --device /dev/cdrom --read-raw image.toc
toc2cue image.toc image.cue
There is no CD as source, all I have is a wav file:
ffprobe tells me about it:

Code: Select all

Input #0, wav, from 'complete.wav':
  Metadata:
    encoder         : Lavf58.76.100 (libsndfile-1.0.31)
  Duration: 01:03:39.46, bitrate: 1536 kb/s
  Stream #0:0: Audio: pcm_s16le ([1][0][0][0] / 0x0001), 48000 Hz, 2 channels, s16, 1536 kb/s
Added in 1 minute 31 seconds:
I think I need to convert it, it should have been 44100 Hz (CDDA) and not 48000 Hz (that would be DAT)
Cheers!
Yours Rava

beny
Full of knowledge
Full of knowledge
Posts: 2098
Joined: 02 Jan 2011, 11:33
Location: italy

Creating audio CD using Cue/Bin

Post#4 by beny » 01 Nov 2023, 19:21

hi, you can try to use audacity but i don't know if it can manage wav stream, you have to search for the silence and split the tracks

User avatar
Rava
Contributor
Contributor
Posts: 5416
Joined: 11 Jan 2011, 02:46
Distribution: XFCE 5.01 x86_64 + 4.0 i586
Location: Forests of Germany

Creating audio CD using Cue/Bin

Post#5 by Rava » 01 Nov 2023, 19:30

beny wrote:
01 Nov 2023, 19:21
hi, you can try to use audacity but i don't know if it can manage wav stream, you have to search for the silence and split the tracks
No need to split anything, it is one continuous track.
I used audacity to convert it into a wav, but it seems audacity did not use the correct parameters; I used an older version of audacity: audacity-2.0.0

I try again using a newer one: audacity-linux-3.2.1-x86_64.xzm


But all that not helps me in creating out of that wav file a Cue/Bin for burning.
Cheers!
Yours Rava

donald
Full of knowledge
Full of knowledge
Posts: 2073
Joined: 17 Jun 2013, 13:17
Distribution: Porteus 3.2.2 XFCE 32bit
Location: Germany

Creating audio CD using Cue/Bin

Post#6 by donald » 01 Nov 2023, 21:48

To create cue/bin from a CD in terminal:

Code: Select all

cdrdao read-cd --read-raw --datafile cdimage.bin --device /dev/cdrom  cdimage.cue
....you said your project is just one wav file, so what what a cue file good for?
[ A CUE file is a plain-text file that organizes the tracks on a CD ]
and yes, for a normal audio CD it has to be 44100 Hz

Example of a cue file:

Code: Select all

CD_DA


// Track 1
TRACK AUDIO
COPY
NO PRE_EMPHASIS
TWO_CHANNEL_AUDIO
FILE "cdimage.bin" 0 06:22:16


// Track 2
TRACK AUDIO
COPY
NO PRE_EMPHASIS
TWO_CHANNEL_AUDIO
FILE "cdimage.bin" 06:22:16 05:03:51
START 00:00:24


// Track 3
TRACK AUDIO
COPY
NO PRE_EMPHASIS
TWO_CHANNEL_AUDIO
FILE "cdimage.bin" 11:25:67 06:20:22
START 00:00:08

User avatar
Rava
Contributor
Contributor
Posts: 5416
Joined: 11 Jan 2011, 02:46
Distribution: XFCE 5.01 x86_64 + 4.0 i586
Location: Forests of Germany

Creating audio CD using Cue/Bin

Post#7 by Rava » 01 Nov 2023, 21:56

donald wrote:
01 Nov 2023, 21:48
....you said your project is just one wav file
Yes
donald wrote:
01 Nov 2023, 21:48
so what what a cue file good for?
[ A CUE file is a plain-text file that organizes the tracks on a CD ]
It is the cue/bin combination. Writing an Audio CD from an image file produces much better results than writing from the wav files themselves when you want to use higher writing speed.

Like I wrote above, several years ago I did the writing Audio CD from an image file at 10x speed regularly, but then stopped since I switched more towards playing via PC / Linux than using my home stereo system.

And now that I again want to create an Audio CD using the writing via image method I realized I do not find accurate HOWTOs written by myself where I just recorded into a text file how all the single steps have to be (from wav to creating of audio-file image to writing the CDDA onto a CD). :wall:

Seems for now, it will be quicker writing that one single CD via 1x speed using cdrecord and the .wav as input (after I converted it again, this time into 44100 Hz instead of 48000 Hz)
Cheers!
Yours Rava

donald
Full of knowledge
Full of knowledge
Posts: 2073
Joined: 17 Jun 2013, 13:17
Distribution: Porteus 3.2.2 XFCE 32bit
Location: Germany

Creating audio CD using Cue/Bin

Post#8 by donald » 02 Nov 2023, 04:43

...via 1x speed...
Most blank disks are designed for very high-speed burning, up to 52x.
Such discs don't give reliable results when burned at low speeds.

I got the best results with 8x burning speed for audio-CDs.

User avatar
Rava
Contributor
Contributor
Posts: 5416
Joined: 11 Jan 2011, 02:46
Distribution: XFCE 5.01 x86_64 + 4.0 i586
Location: Forests of Germany

Creating audio CD using Cue/Bin

Post#9 by Rava » 02 Nov 2023, 07:11

donald wrote:
02 Nov 2023, 04:43
I got the best results with 8x burning speed for audio-CDs.
And how did you burn these audio-CDs?
Via a GUI program, or via a simple

Code: Select all

cdrecord dev=1,0 -v speed=8 -dao -audio *.wav
and test if that would work via

Code: Select all

cdrecord dev=1,0 -v -dummy speed=8 -dao -audio *.wav
Cheers!
Yours Rava

donald
Full of knowledge
Full of knowledge
Posts: 2073
Joined: 17 Jun 2013, 13:17
Distribution: Porteus 3.2.2 XFCE 32bit
Location: Germany

Creating audio CD using Cue/Bin

Post#10 by donald » 02 Nov 2023, 07:53

to be honest -- I used xfburn I think. :)

User avatar
Rava
Contributor
Contributor
Posts: 5416
Joined: 11 Jan 2011, 02:46
Distribution: XFCE 5.01 x86_64 + 4.0 i586
Location: Forests of Germany

Creating audio CD using Cue/Bin

Post#11 by Rava » 02 Nov 2023, 08:14

donald wrote:
02 Nov 2023, 07:53
to be honest -- I used xfburn I think. :)
I presume any X and GUI based Linux CD or DVD editing, backup-ing and burning software will to 99% use the terminal programs and is only a GUI frontend to these anyway (=you are really using cdrecord or cdrdao or cdda2wav or growisofs or cdparanoia or mkisofs or *whatever terminal program there is that also handles reading or writing or both of CDs and/or DVDs or CD and/or DVD images* )
Cheers!
Yours Rava

User avatar
Rava
Contributor
Contributor
Posts: 5416
Joined: 11 Jan 2011, 02:46
Distribution: XFCE 5.01 x86_64 + 4.0 i586
Location: Forests of Germany

Creating audio CD using Cue/Bin

Post#12 by Rava » 04 Nov 2023, 20:21

At least one crucial error have been the wrong sample Hz.

Converting like so did the trick, but at that time I already switched to xfburn - [SOLVED] Creating audio CD using xfburn - missing decoder

This is just as heads up and one small hint towards solving such issues for the lurkers:

Code: Select all

ffmpeg -i original_file_at_48_kHz.wav -ar 44100 out_at_44_1_kHz.wav
when the input is a wav.

But when your source is the highest available compressed file that you could get, e.g. a webm, a mp3, an aac, it doesn't matter.
E.g. for an aac it still would be a similar command:

Code: Select all

ffmpeg -i original_file_at_48_kHz.aac -ar 44100 out_at_44_1_kHz.wav
HTH. :)

Be aware that the corresponding .wav file created by your average compressed webm or mp3 or aac or any similar format would be at least 10 times larger. (usually more than 10 times) - make sure you have enough free space on the partition you choose as target for the ffmpeg resample command.

In my case: the highest quality file I had as source:
58.28 MB webm 48 kHz
The resulting .wav with 44.1kHz: 642.53 MB
(that is 11x the size of the source file.)

And webm, similar to aac and ogg/vorbis are all more advanced audio codex than mp3.
Meaning as example for aac and ogg/vorbis: an aac or ogg/vorbis the same size as the mp3 file is of 10% better quality.
Or an aac 10% smaller than the mp3 file with comparable compression parameters is of the same quality than the mp3. Same with ogg/vorbis.

Added in 23 minutes 38 seconds:
Meaning: You look for a certain track to burn as audio CDDA and want the highest possible source file, but you find no original audio CD (maybe that recording was never published as audio CD)

Do not look for the largest sound file size (e.g. by asking yt-dlp -F URL) - but look for the highest quality.

Often the largest audio file is also the one with the best quality, but now always.
Example cropped output of a yt-dlp -F URL:

Code: Select all

ID  EXT   RESOLUTION FPS CH │  FILESIZE  TBR PROTO │ VCODEC         VBR ACODEC      ABR ASR MORE INFO
───────────────────────────────────────────────────────────────────────────────────────────────────────────────
[…]
599 m4a   audio only      2 │   2.80MiB  31k https │ audio only         mp4a.40.5   31k 22k ultralow, m4a_dash
600 webm  audio only      2 │   3.42MiB  38k https │ audio only         opus        38k 48k ultralow, webm_dash
139 m4a   audio only      2 │   4.44MiB  49k https │ audio only         mp4a.40.5   49k 22k low, m4a_dash
249 webm  audio only      2 │   4.82MiB  53k https │ audio only         opus        53k 48k low, webm_dash
250 webm  audio only      2 │   6.25MiB  69k https │ audio only         opus        69k 48k low, webm_dash
140 m4a   audio only      2 │  11.77MiB 129k https │ audio only         mp4a.40.2  129k 44k medium, m4a_dash
251 webm  audio only      2 │  12.03MiB 132k https │ audio only         opus       132k 48k medium, webm_dash
[…]
In this case, the best quality would also be the largest file, but look for the highest TBR, ABR and ASR.
In this example, that would be the 251 webm - ABR: 132k and ASR: 48k.

And here you see why my source file had 48kHz as sample rate and not 44.1kHz. :) (The above example is not about my file I plan to burn as CDDA but just a recent info of an unrelated yt-dlp download) :D

Post Reply