cd-discid icon indicating copy to clipboard operation
cd-discid copied to clipboard

Fix MusicBrainz TOC compute per current specs

Open jesus2099 opened this issue 3 years ago • 4 comments

Specs: https://wiki.musicbrainz.org/Disc_ID_Calculation

If I take issue #5 problematic example:

$ cd-discid --musicbrainz
5 183 51735 90810 126230 165433 183465

It should be and is now:

$ cd-discid --musicbrainz
1 5 183465 183 51735 90810 126230 165433

I tested, there is no regressions for normal non MusicBrainz discid compute.

jesus2099 avatar Apr 24 '21 15:04 jesus2099

@jesus2099 Do you think the project is alive?

wawrzek avatar Apr 30 '21 23:04 wawrzek

I don't know. I hope @taem comes back here someday and merges this, so good. If you or @TJFOE wants to try this version, you can clone or download my fork's fix-MB-DiscID branch and run make command.

Tell me if issues.

I want to test on special CD (CCCD, Enhanced CD, game CD) if it works correctly or if I need to send a second commit to this PR.

jesus2099 avatar May 01 '21 09:05 jesus2099

OK. I built it and use with Crux (https://crux.nu/) without problem. I keep my patched port here: https://wawrzek.name/crux/repo/. I don't think I have any special CDs to run further tests.

λ europe cd-discid → λ git master → cd-discid --musicbrainz /dev/cdrom
1 15 316881 150 17591 41037 62264 82241 105260 132993 156887 175406 201505 225513 232586 251824 274989 285083
λ europe cd-discid → λ git master → cd-discid /dev/cdrom
c3107f0f 15 150 17591 41037 62264 82241 105260 132993 156887 175406 201505 225513 232586 251824 274989 285083 4225

wawrzek avatar May 01 '21 19:05 wawrzek

Mmh. My fix is great but Enhanced CD (CD Extra) suffer from 2 old known bugs (fixed in official libdiscid):

  1. Last track before data session is seen as 2:32 longer (11400 frames, 152 seconds)
  2. Data session appears as last track (should be omitted)

Example EXPO EXPO.

(Fixed) cd-discid --musicbrainz gives:

1 17 270393 150 5892 26142 32540 54612 74225 95915 99667 120772 146122 149072 175460 180240 206175 231592 235010 269197

Instead of:

1 16 257797 150 5892 26142 32540 54612 74225 95915 99667 120772 146122 149072 175460 180240 206175 231592 235010

So my fix is still good for all Audio only CD. But cd-discid should use the official libdiscid for --musicbrainz option, to benefit from fixed old bugs. :) I don't know how it can be done, though, I am not a real coder.


Update:

To make it clear, my pull request still makes a more correct disc ID for Enhanced CD too. It's just that the 2 above bugs, that are already there, can only be fixed by using the official libdiscid, or something.

jesus2099 avatar May 07 '21 16:05 jesus2099