[Abcde-users] Problem with 'abcde -d disc.flac'
Bjørn Forsman
bjorn.forsman at gmail.com
Thu Nov 15 20:14:03 GMT 2018
Hi Matthias,
On Wed, 14 Nov 2018 at 11:44, Matthias König <mk at silverserver.at> wrote:
> [...]
> According to the data for your CD on the Musicbrainz website, the disc
> ids and track offsets are correct when you read from the CD.
>
> You now know that the disc ids and also the track offsets are not
> correct when you read from the flac file. (Number of tracks and leadout
> are correct.)
>
> The offsets differ by 32 sectors. (1 second = 75 sectors, if I remember
> correctly) There are CDs with a so-called pregap, which means that the
> first track does not start at sector 0 but at sector 32, for example.
>
> With the option -VV you can see if the CD has a pregap. Search for this
> line:
> makeids: PREGAP 0, LEADIN 150, LEADOUT 309237
With -VV option, from CD:
Getting CD track info... makeids: PREGAP 32, LEADIN 150, LEADOUT 185053
With -VV option, from disc.flac:
makeids: PREGAP 0, LEADIN 150, LEADOUT 185085
Ok, so it miscalculates PREGAP and LEADOUT from disc.flac.
I wonder if this error comes from writing the flac in the first step,
or from reading the flac in the second step.
> You can also see in the cuesheet if the CD has a pregap.
I don't see any pregap-like text in the .cue file.
$ head -7 U2-October/October.flac.cue
PERFORMER "U2"
TITLE "October"
FILE "October.flac" WAVE
TRACK 01 AUDIO
TITLE "Gloria"
INDEX 01 00:00:00
TRACK 02 AUDIO
$ grep -i gap U2-October/October.flac.cue
[no output]
Does this mean the bug is in writing the flac and/or cue file? What
does a .cue file with pregap look like? (According to the -VV run
above, the original disc does have PREGAP 32.)
> I own a few CDs with a pregap. But with these only the disc ids are
> calculated incorrectly when reading from the flac file. The track
> offsets are calculated correctly.
And in my case, since I got this from original CD:
$ cat abcde.a309a30b/cddbdiscid
a309a30b 11 182 19082 35557 57645 74005 91327 112280 122847 141040
158885 171790 2471
and this from disc.flac:
$ cat abcde.a109a30b/cddbdiscid
a109a30b 11 150 19050 35525 57613 73973 91295 112248 122815 141008
158853 171758 2471
... I have wrong track offsets too?
> In your first email you mentioned a patch. I wrote this patch. With
> this patch all my CDs work, even when reading from a flac file and even
> if the CD has a pregap.
Ok, so that patch solved the problem with _all_ your CDs? I've been
running abcde-2.9.2 + that patch, but as you can see, my first CD
(U2-October) doesn't work right. How lucky am I? :-)
> As far as debugging is concerned, I think the function makeids() is a
> good starting point. I can not help you with debugging. I do not own
> your CD. And besides, I am an abcde user and not a developer.
OK, thanks.
> Have you already tried other CDs? Maybe this problem only occurs with
> this particular CD.
I haven't tried other CDs. This was my first CD to be ripped, I'd like
to have a stable/working ripping process before continuing. Or at
least a better understanding of why this cannot be fixed, if that is
the case.
The flac image gets the same sha1sum on all runs (I have about 7
copies now), so I think the CD drive reads it OK.
But you're probably right. The smartest thing is to rip whatever can
be ripped and leave the difficult CDs for later. I'm just stubborn.
- Bjørn
More information about the Abcde-users
mailing list