Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

All CD-Text appears in single (last) track #18

Open
d0e8414e opened this issue Feb 6, 2023 · 9 comments
Open

All CD-Text appears in single (last) track #18

d0e8414e opened this issue Feb 6, 2023 · 9 comments

Comments

@d0e8414e
Copy link

d0e8414e commented Feb 6, 2023

First, thanks so much for cdrdao! As someone that still rips CDs to our cars' "jukebox"/hard drives, I am super-interested in writing audio CDs that include CD-Text and keeping albums out of the "Unknown/No Name" artist bucket. The cloud dbs the cars connect to, often don't have album info.

I used the article @ https://apocalyptech.com/linux/cdtext/ as my starting point.

I ended up installing the most-recent version from sourgeforce. I have tried many, many iterations of trying to get this to work, with different command options, toc files, etc. It is entirely possible I've JUSTMISSED getting this right, or only ran the simulate, didn't run the real write (I am down about 20 discs at this point :) ) and missed the right mix of options.

Basically, I can get all my CD-TEXT info onto the disc, BUT, it's crammed into the last track.

Burner is ASUS DRW-24B1ST.

Command:

$ cdrdao write --device /dev/sr0 --driver generic-mmc:0x10 -v 3 --eject cd-toc00
Detected SG driver version: 3.5.27
/dev/sr0: ASUS DRW-24B1ST   a   Rev: 1.04
Using driver: Generic SCSI-3/MMC - Version 2.0 (options 0x0010)

[SCSI] Rezero Unit (0x01) failed: Operation not permitted.
[SCSI] Rezero Unit (0x01) failed: Operation not permitted.
Starting write CD-TEXT writing is supported.
at speed 48...
Pausing 10 seconds - hit CTRL-C to abort.
Process can be aborted with QUIT signal (usually CTRL-\).
WARNING: No super user permission to setup real time scheduling.
Waiting for reader process
Buffer filled
Awaken, will start writing
Turning BURN-Proof on
Enabling JustSpeed.
Session format: 0
Drive accepted write parameter mode page variant 0.
Executing power calibration...
Power calibration successful.

Cue Sheet (variant 0):
CTL/  TNO  INDEX  DATA  SCMS  MIN  SEC  FRAME
ADR               FORM
01    00    00     41    00   97   26   66
01    01    00     00    00   00   00   00
01    01    01     00    00   00   02   00
01    02    01     00    00   07   35   72
01    aa    01     01    00   13   19   56
Drive accepted cue sheet variant 0.
Writing CD-TEXT lead-in...
Writing track 01 (mode AUDIO/AUDIO )...
Writing track 02 (mode AUDIO/AUDIO )...
Wrote 134 of 134 MB (Buffers 100%  99%).
Wrote 59831 blocks. Buffer fill min 100%/max 100%.
Flushing cache...
Writing finished successfully.
[SCSI] Rezero Unit (0x01) failed: Operation not permitted.

cd-toc00:

CD_DA

CD_TEXT {
  LANGUAGE_MAP {
    0: 9
  }

  LANGUAGE 0 {
    TITLE "Reflektor"
    PERFORMER "Arcade Fire"
  }
}

TRACK AUDIO
CD_TEXT {
  LANGUAGE 0 {
    TITLE "Reflektor"
    PERFORMER "Arcade Fire"
  }
}
FILE "01-01-Reflektor.wav" 0

TRACK AUDIO
CD_TEXT {
  LANGUAGE 0 {
    TITLE "We Exist"
    PERFORMER "Arcade Fire"
  }
}
FILE "01-02-We_Exist.wav" 0

The disc is created and plays, but cd-info shows:

Disc mode is listed as: CD-DA
CD-ROM Track List (1 - 2)
  #: MSF       LSN    Type   Green? Copy? Channels Premphasis?
  1: 00:02:00  000000 audio  false  no    2        no
  2: 07:35:72  034047 audio  false  no    2        no
170: 13:19:56  059831 leadout (134 MB raw, 134 MB formatted)
Media Catalog Number (MCN):
TRACK  1 ISRC: 000000000000
TRACK  2 ISRC: 000000000000
Last CD Session LSN: 0
audio status: invalid
__________________________________
CD Analysis Report

Language 0 'English':
CD-TEXT for Disc:
CD-TEXT for Track  1:
CD-TEXT for Track  2:
        TITLE: ReflektorReflektorWe Exist
        PERFORMER: Arcade FireArcade FireArcade Fire

It may be my burner as show-toc simulate shows proper cd-text:

$ cdrdao show-toc --simulate --device /dev/sr0 --driver generic-mmc:0x10 -v 3 --eject cd-toc00
TOC TYPE: CD_DA
          TITLE "Reflektor"
          PERFORMER "Arcade Fire"
TRACK  1  Mode AUDIO:
          COPY NOT PERMITTED
          NO PRE-EMPHASIS
          TWO CHANNEL AUDIO
          START  00:00:00(     0)
          END*   07:33:72( 34047)
          TITLE "Reflektor"
          PERFORMER "Arcade Fire"

TRACK  2  Mode AUDIO:
          COPY NOT PERMITTED
          NO PRE-EMPHASIS
          TWO CHANNEL AUDIO
          START  07:33:72( 34047)
          END*   13:17:56( 59831)
          TITLE "We Exist"
          PERFORMER "Arcade Fire"

Finally, generic-mmc-raw versions fail before writing:

$ cdrdao write --simulate --device /dev/sr0 --driver generic-mmc-raw:0x10 -v 3 --eject cd-toc00
Detected SG driver version: 3.5.27
/dev/sr0: ASUS DRW-24B1ST   a   Rev: 1.04
Using driver: Generic SCSI-3/MMC (raw writing) - Version 2.0 (options 0x0010)

[snip . . .]
ERROR: Write data failed.
ERROR: Simulation failed.
[SCSI] Rezero Unit (0x01) failed: Operation not permitted.

$ cdrdao write --simulate --device /dev/sr0 --driver generic-mmc-raw -v 3 --eject cd-toc00
[snip . . .]
ERROR: Write data failed.
ERROR: Simulation failed.
[SCSI] Rezero Unit (0x01) failed: Operation not permitted.

Thanks for having a look!

@denisleroy
Copy link
Member

denisleroy commented Feb 7, 2023

Hi.
Before i try to reproduce, can you make sure you're using cdrdao 1.2.5, i.e. the latest version from github? We no longer use SourceForge for development and releases...
Also, to avoid creating coasters, I would recommend to use a RW disk while we work things out :-)

@kmikita
Copy link

kmikita commented Feb 7, 2023

I confirm the same issue.
I guess something missworking on stage CdTextEncoder and therefore needs feature to generate cdtext.dat for debugging without cd burning -> export from drive.

I was able to successfully write the following .TOC (encoded in ISO 8859-1) using cdrdao 1.2.3:

.TOC
CD_DA

CATALOG "0822186054154"
CD_TEXT {
    LANGUAGE_MAP {
        0 : 9
    }
    LANGUAGE 0 {
        TITLE "Préludes"
        PERFORMER "Francesco Piemontesi"
        COMPOSER "Claude Debussy"
        MESSAGE "Naïve V 5415 | Germany 2014 | Recorded: March & April 2014 at Auditorio Stelio Molo, Lugano (Switzerland)"
        DISC_ID "5D12E618"
        GENRE "Classical"
    }
}

// track 01
TRACK AUDIO
ISRC "CH8291500468"
    CD_TEXT {
        LANGUAGE 0 {
        TITLE "Préludes, premier livre: Danseuses de Delphes"
        PERFORMER "Francesco Piemontesi"
        COMPOSER "Claude Debussy"
        MESSAGE "Naïve V 5415 | Germany 2014"
        DISC_ID ""
        }
    }
    AUDIOFILE "debussi6.wav" 00:00:00 03:41:18

// track 02
TRACK AUDIO
ISRC "CH8291500469"
    CD_TEXT {
        LANGUAGE 0 {
        TITLE "Préludes, premier livre: Voiles"
        PERFORMER "Francesco Piemontesi"
        COMPOSER "Claude Debussy"
        MESSAGE "Naïve V 5415 | Germany 2014"
        DISC_ID ""
        }
    }
    AUDIOFILE "debussi6.wav" 03:41:18 03:41:08

// track 03
TRACK AUDIO
ISRC "CH8291500470"
    CD_TEXT {
        LANGUAGE 0 {
        TITLE "Préludes, premier livre: Le vent dans la plaine"
        PERFORMER "Francesco Piemontesi"
        COMPOSER "Claude Debussy"
        MESSAGE "Naïve V 5415 | Germany 2014"
        DISC_ID ""
        }
    }
    AUDIOFILE "debussi6.wav" 07:22:26 02:15:14

// track 04 maybe too long title
TRACK AUDIO
ISRC "CH8291500471"
    CD_TEXT {
        LANGUAGE 0 {
        TITLE "Préludes, premier livre: «Les sons et les parfums tournent dans l'air du soir»"
        PERFORMER "Francesco Piemontesi"
        COMPOSER "Claude Debussy"
        MESSAGE "Naïve V 5415 | Germany 2014"
        DISC_ID ""
        }
    }
    AUDIOFILE "debussi6.wav" 09:37:40 03:33:01

// track 05
TRACK AUDIO
ISRC "CH8291500472"
    CD_TEXT {
        LANGUAGE 0 {
        TITLE "Préludes, premier livre: Les collines d'Anacapri"
        PERFORMER "Francesco Piemontesi"
        COMPOSER "Claude Debussy"
        MESSAGE "Naïve V 5415 | Germany 2014"
        DISC_ID ""
        }
    }
    AUDIOFILE "debussi6.wav" 13:10:41 03:33:21

// track 06
TRACK AUDIO
ISRC "CH8291500473"
    CD_TEXT {
        LANGUAGE 0 {
        TITLE "Préludes, premier livre: Des pas sur la neige"
        PERFORMER "Francesco Piemontesi"
        COMPOSER "Claude Debussy"
        MESSAGE "Naïve V 5415 | Germany 2014"
        DISC_ID ""
        }
    }
    AUDIOFILE "debussi6.wav" 16:43:62 04:35:50

// track 07
TRACK AUDIO
ISRC "CH8291500474"
    CD_TEXT {
        LANGUAGE 0 {
        TITLE "Préludes, premier livre: Ce qu'a vu le vent d'Ouest"
        PERFORMER "Francesco Piemontesi"
        COMPOSER "Claude Debussy"
        MESSAGE "Naïve V 5415 | Germany 2014"
        DISC_ID ""
        }
    }
    AUDIOFILE "debussi6.wav" 21:19:37 03:42:59

// track 08
TRACK AUDIO
ISRC "CH8291500475"
    CD_TEXT {
        LANGUAGE 0 {
        TITLE "Préludes, premier livre: La fille aux cheveux de lin"
        PERFORMER "Francesco Piemontesi"
        COMPOSER "Claude Debussy"
        MESSAGE "Naïve V 5415 | Germany 2014"
        DISC_ID ""
        }
    }
    AUDIOFILE "debussi6.wav" 25:02:21 02:22:05

// track 09
TRACK AUDIO
ISRC "CH8291500476"
    CD_TEXT {
        LANGUAGE 0 {
        TITLE "Préludes, premier livre: La sérénade interrompue"
        PERFORMER "Francesco Piemontesi"
        COMPOSER "Claude Debussy"
        MESSAGE "Naïve V 5415 | Germany 2014"
        DISC_ID ""
        }
    }
    AUDIOFILE "debussi6.wav" 27:24:26 02:48:18

// track 10
TRACK AUDIO
ISRC "CH8291500477"
    CD_TEXT {
        LANGUAGE 0 {
        TITLE "Préludes, premier livre: La cathédrale engloutie"
        PERFORMER "Francesco Piemontesi"
        COMPOSER "Claude Debussy"
        MESSAGE "Naïve V 5415 | Germany 2014"
        DISC_ID ""
        }
    }
    AUDIOFILE "debussi6.wav" 30:12:44 05:30:66

// track 11
TRACK AUDIO
ISRC "CH8291500478"
    CD_TEXT {
        LANGUAGE 0 {
        TITLE "Préludes, premier livre: La danse de Puck"
        PERFORMER "Francesco Piemontesi"
        COMPOSER "Claude Debussy"
        MESSAGE "Naïve V 5415 | Germany 2014"
        DISC_ID ""
        }
    }
    AUDIOFILE "debussi6.wav" 35:43:35 03:08:49

// track 12
TRACK AUDIO
ISRC "CH8291500479"
    CD_TEXT {
        LANGUAGE 0 {
        TITLE "Préludes, premier livre: Minstrels"
        PERFORMER "Francesco Piemontesi"
        COMPOSER "Claude Debussy"
        MESSAGE "Naïve V 5415 | Germany 2014"
        DISC_ID ""
        //ISRC "CH-829-15-00479"
        }
    }
    AUDIOFILE "debussi6.wav" 38:52:09 02:17:06

// track 13
TRACK AUDIO
ISRC "CH8291500480"
    CD_TEXT {
        LANGUAGE 0 {
        TITLE "Préludes, deuxième livre: Brouillards"
        PERFORMER "Francesco Piemontesi"
        COMPOSER "Claude Debussy"
        MESSAGE "Naïve V 5415 | Germany 2014"
        DISC_ID ""
        }
    }
    AUDIOFILE "debussi6.wav" 41:09:15 03:09:31
    START 00:01:63

// track 14
TRACK AUDIO
ISRC "CH8291500481"
    CD_TEXT {
        LANGUAGE 0 {
        TITLE "Préludes, deuxième livre: Feuilles mortes"
        PERFORMER "Francesco Piemontesi"
        COMPOSER "Claude Debussy"
        MESSAGE "Naïve V 5415 | Germany 2014"
        DISC_ID ""
        }
    }
    AUDIOFILE "debussi6.wav" 44:18:46 03:09:67

// track 15
TRACK AUDIO
ISRC "CH8291500482"
    CD_TEXT {
        LANGUAGE 0 {
        TITLE "Préludes, deuxième livre: La Puerta del Vino"
        PERFORMER "Francesco Piemontesi"
        COMPOSER "Claude Debussy"
        MESSAGE "Naïve V 5415 | Germany 2014"
        DISC_ID ""
        }
    }
    AUDIOFILE "debussi6.wav" 47:28:38 03:23:33

// track 16
TRACK AUDIO
ISRC "CH8291500483"
    CD_TEXT {
        LANGUAGE 0 {
        TITLE "Préludes, deuxième livre: «Les fées sont d'exquises danseuses»"
        PERFORMER "Francesco Piemontesi"
        COMPOSER "Claude Debussy"
        MESSAGE "Naïve V 5415 | Germany 2014"
        DISC_ID ""
        }
    }
    AUDIOFILE "debussi6.wav" 50:51:71 03:28:17

// track 17
TRACK AUDIO
ISRC "CH8291500484"
    CD_TEXT {
        LANGUAGE 0 {
        TITLE "Préludes, deuxième livre: Bruyères"
        PERFORMER "Francesco Piemontesi"
        COMPOSER "Claude Debussy"
        MESSAGE "Naïve V 5415 | Germany 2014"
        DISC_ID ""
        }
    }
    AUDIOFILE "debussi6.wav" 54:20:13 02:35:50

// track 18
TRACK AUDIO
ISRC "CH8291500485"
    CD_TEXT {
        LANGUAGE 0 {
        TITLE "Préludes, deuxième livre: «Général Lavine» - eccentric"
        PERFORMER "Francesco Piemontesi"
        COMPOSER "Claude Debussy"
        MESSAGE "Naïve V 5415 | Germany 2014"
        DISC_ID ""
        }
    }
    AUDIOFILE "debussi6.wav" 56:55:63 02:31:27

// track 19
TRACK AUDIO
ISRC "CH8291500486"
    CD_TEXT {
        LANGUAGE 0 {
        TITLE "Préludes, deuxième livre: La terrasse des audiences du clair de lune"
        PERFORMER "Francesco Piemontesi"
        COMPOSER "Claude Debussy"
        MESSAGE "Naïve V 5415 | Germany 2014"
        DISC_ID ""
        }
    }
    AUDIOFILE "debussi6.wav" 59:27:15 04:57:54

// track 20
TRACK AUDIO
ISRC "CH8291500487"
    CD_TEXT {
        LANGUAGE 0 {
        TITLE "Préludes, deuxième livre: Ondine"
        PERFORMER "Francesco Piemontesi"
        COMPOSER "Claude Debussy"
        MESSAGE "Naïve V 5415 | Germany 2014"
        DISC_ID ""
        }
    }
    AUDIOFILE "debussi6.wav" 64:24:69 03:21:01

// track 21
TRACK AUDIO
ISRC "CH8291500488"
    CD_TEXT {
        LANGUAGE 0 {
        TITLE "Préludes, deuxième livre: Hommage à S. Pickwick Esq. P.P.M.P.C."
        PERFORMER "Francesco Piemontesi"
        COMPOSER "Claude Debussy"
        MESSAGE "Naïve V 5415 | Germany 2014"
        DISC_ID ""
        }
    }
    AUDIOFILE "debussi6.wav" 67:45:70 02:31:74

// track 22
TRACK AUDIO
ISRC "CH8291500489"
    CD_TEXT {
        LANGUAGE 0 {
        TITLE "Préludes, deuxième livre: Canope"
        PERFORMER "Francesco Piemontesi"
        COMPOSER "Claude Debussy"
        MESSAGE "Naïve V 5415 | Germany 2014"
        DISC_ID ""
        }
    }
    AUDIOFILE "debussi6.wav" 70:17:69 02:56:66

// track 23
TRACK AUDIO
ISRC "CH8291500490"
    CD_TEXT {
        LANGUAGE 0 {
        TITLE "Préludes, deuxième livre: Les tierces alternées"
        PERFORMER "Francesco Piemontesi"
        COMPOSER "Claude Debussy"
        MESSAGE "Naïve V 5415 | Germany 2014"
        DISC_ID ""
        }
    }
    AUDIOFILE "debussi6.wav" 73:14:60 02:30:56

// track 24
TRACK AUDIO
ISRC "CH8291500491"
    CD_TEXT {
        LANGUAGE 0 {
        TITLE "Préludes, deuxième livre: Feux d'artifice"
        PERFORMER "Francesco Piemontesi"
        COMPOSER "Claude Debussy"
        MESSAGE "Naïve V 5415 | Germany 2014"
        DISC_ID ""
        }
    }
    AUDIOFILE "debussi6.wav" 75:45:41

To bypass the cdtext.dat size limits, I tried to use aliases according to CD-TEXT standardization (https://www.gnu.org/software/libcdio/cd-text-format.html#Pack-Contents):

    CD_TEXT {
        LANGUAGE 0 {
        TITLE "Préludes, premier livre: Danseuses de Delphes"
        PERFORMER {9}
        COMPOSER {9}
        MESSAGE {9}
        ISRC "CH-829-15-00468"
        }
CD-TEXT size limits The text packs are grouped in up to 8 blocks of at most 256 packs. Each block pertains to one language. Sequence numbers of each block are counted separately. All packs of block 0 come before the packs of block 1.

The limitation of block number and sequence numbers imply that there are at most 2048 text packs possible.

If a text of a track (pack types 0x80 to 0x85 and 0x8e) repeats identically for the next track, then it may be represented by a TAB character (ASCII 9) for single byte texts, and two TAB characters for double byte texts. This is desirable because there is a somewhat limited amount of space for CD Text — 256 * 12 bytes which may have to accomodate up to 99 tracks.

The two binary bytes of pack type 0x87 are written to the first 0x87 pack of a block. They may or may not be repeated at the start of the follow-up packs of type 0x87.

But this led to glitches described by the topicstarter: tags were mixed up or cdtext was not readable at all.

Switching to dev-brunch, everything got even worse and it was not possible to successfully write cdtext even once, neither with a simple .TOC, nor with an advanced one in the example above.

@denisleroy
Copy link
Member

Thanks for the detailed write up, I'll check it out

@d0e8414e
Copy link
Author

d0e8414e commented Feb 7, 2023

Confirming I'm encountering the same issue with git clone source code/build from code on github. Slight change though in that command no longer takes the 0x10 option:
$ cdrdao write --device /dev/sr0 --driver generic-mmc -v 3 --eject cdtoc-00

Thanks for the tip. Didn't know I could do same with CDRW. Those are the only type I don't have lying around. Do have some of those Lightscribe DVD-Rs that you could burn the title onto the top though! Ha. No Lightscribe on my current burner, in case anyone needs. :)

@Noodlez1232
Copy link

Bumping this issue as it's still ongoing. Version is still 1.2.5. I wrote a manual TOC for this CD, and it still put it all into the final track.

I've also tried ripping a CD using read-cd with the --with-cddb option, the re-writing it out, and still getting the same issue. I don't have any CD-TEXT CDs I can test with.

@MagicalTux
Copy link

Confirming same issue with 1.2.5

cdrdao write --speed 16 --driver generic-mmc-raw burn.toc

This is actually blocking as the produced CD is all wrong

@manithree
Copy link

Piling on, confirming the same issue with fedora 38 1.2.5 rpm (cdrdao-1.2.5-5.fc38.x86_64).

I have a python script that generates .toc files packing 40 .wav files onto 6 CDs. gcdmaster .toc files have the same issue for me.

@araymondmiracosta
Copy link

Can confirm I have the same issue. I followed the same article in the original issue as well. Running the latest version.

@dance-party
Copy link

dance-party commented Dec 17, 2023

I am having similar problems with CD-TEXT and cdrdao-1.2.5-2-x86_64.

I downgraded to cdrdao-1.2.4-2-x86_64 which is working as expected (no issues with CD-TEXT using the same toc files I was trying with 1.2.5-2).

Edit: clarification

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

8 participants