whipper-team / whipper

Python CD-DA ripper preferring accuracy over speed
GNU General Public License v3.0
1.16k stars 91 forks source link

Can't find offset or rip on apple dvd drive - AccurateRip 404 error #514

Open samliddicott opened 4 years ago

samliddicott commented 4 years ago

TLDR; whipper can't use this drive though abcde can

Here I'm running whipper git HEAD 04ff0058064b52ff9262a4a4820cb8b2b0b95125 on Linux with Ubuntu 20.04 kernel 4.14.24-qnap in a container, with distro stock cd-paranoia and/or cdparanoia (trying both, using symlinks)

I got some new USB apple slot loading DVD drives, which identify as: drive: /dev/cdrom, vendor: MATSHITA, model: DVD-RAM UJ-825S , release: D100

whipper find offset, always fails with: ERROR:whipper.common.accurip:error retrieving AccurateRip entry: HTTP Error 404: Not Found WARNING:whipper.common.accurip:entry not found in AccurateRip database WARNING:whipper.command.offset:AccurateRip entry not found: drive offset can't be determined, try again with another disc

Yet if I try the same disk on my Dell drive, which identifies as: drive: /dev/sr1, vendor: Dell , model: DVD+/-RW DW316 , release: A1B1 find offset doesn't have that error, but continues past that point.

It doesn't matter what disc I use, the Apple (DVD-RAM UJ-825S) always fails, but the Dell drive continues past that point

I looked up http://www.accuraterip.com/driveoffsets.htm manually and tentatively matched against the Panasonic - DVD-RAM UJ-825S and performed: whipper offset find -o +102 /dev/sr0 but that doesn't prevent the error from occurring.

So whatever whipper is ripping for this test, it is messed up enough not to be able to lookup at AccurateRip.

I manually set the offset to 102 in the .config/whipper/whipper.conf and then set to rip with: time whipper cd -d /dev/sr0 rip -x -C embed with this output: using xiph cd-paranoia: cdparanoia III release 10.2 libcdio 2.0.0 x86_64-pc-linux-gnu

INFO:whipper.command.cd:using configured read offset 102
INFO:whipper.command.cd:checking device /dev/sr0
WARNING:whipper.program.utils:command 'eject -t /dev/sr0' returned with exit code '1' (b'eject: CD-ROM tray close command failed: Input/output error')
CDDB disc id: f40dad14
MusicBrainz disc id qdCa_XNd.tRZ9u_Txtcqi8mhJTM-
MusicBrainz lookup URL https://musicbrainz.org/cdtoc/attach?toc=1+20+262784+150+12709+22804+35141+49687+64064+77211+90398+105428+119426+131347+143269+152868+167098+180922+195771+210814+223524+236698+247872&tracks=20&id=qdCa_XNd.tRZ9u_Txtcqi8mhJTM-
Disc duration: 00:58:21.786, 20 audio tracks

Matching releases:

Artist  : Various Artists
Title   : Stars Of: American Songbook (Disc 1 of 3)
Duration: 00:58:21.579
URL     : https://musicbrainz.org/release/a637d13b-c669-41a1-89f8-07364d4bdb2f
Release : a637d13b-c669-41a1-89f8-07364d4bdb2f
Type    : Compilation
Barcode : 698458952028
Country : United Kingdom
Cat no  : USMMKTCD010

Track 1 finished, found 3850 Q sub-channels with CRC errors
Track 2 finished, found 3631 Q sub-channels with CRC errors
Track 3 finished, found 3869 Q sub-channels with CRC errors
Track 4 finished, found 5165 Q sub-channels with CRC errors
Track 5 finished, found 4629 Q sub-channels with CRC errors
Track 6 finished, found 4443 Q sub-channels with CRC errors
Track 7 finished, found 4400 Q sub-channels with CRC errors
Track 8 finished, found 4678 Q sub-channels with CRC errors
Track 10 finished, found 4291 Q sub-channels with CRC errors
Track 11 finished, found 3882 Q sub-channels with CRC errors
Track 12 finished, found 3438 Q sub-channels with CRC errors
Track 13 finished, found 4623 Q sub-channels with CRC errors
Track 14 finished, found 4498 Q sub-channels with CRC errors
Track 15 finished, found 4617 Q sub-channels with CRC errors
Track 16 finished, found 5132 Q sub-channels with CRC errors
Track 17 finished, found 3909 Q sub-channels with CRC errors
Track 18 finished, found 4498 Q sub-channels with CRC errors
Track 19 finished, found 1 Q sub-channels with CRC errors
Track 20 finished, found 4635 Q sub-channels with CRC errors
Traceback (most recent call last):
  File "/usr/local/bin/whipper", line 11, in <module>
    load_entry_point('whipper==0.9.1.dev100+g04ff005', 'console_scripts', 'whipper')()
  File "/usr/local/lib/python3.8/dist-packages/whipper-0.9.1.dev100+g04ff005-py3.8-linux-x86_64.egg/whipper/command/main.py", line 56, in main
    ret = cmd.do()
  File "/usr/local/lib/python3.8/dist-packages/whipper-0.9.1.dev100+g04ff005-py3.8-linux-x86_64.egg/whipper/command/basecommand.py", line 141, in do
    return self.cmd.do()
  File "/usr/local/lib/python3.8/dist-packages/whipper-0.9.1.dev100+g04ff005-py3.8-linux-x86_64.egg/whipper/command/basecommand.py", line 141, in do
    return self.cmd.do()
  File "/usr/local/lib/python3.8/dist-packages/whipper-0.9.1.dev100+g04ff005-py3.8-linux-x86_64.egg/whipper/command/cd.py", line 155, in do
    self.itable = self.program.getTable(self.runner,
  File "/usr/local/lib/python3.8/dist-packages/whipper-0.9.1.dev100+g04ff005-py3.8-linux-x86_64.egg/whipper/common/program.py", line 135, in getTable
    itable.getMusicBrainzDiscId())
  File "/usr/local/lib/python3.8/dist-packages/whipper-0.9.1.dev100+g04ff005-py3.8-linux-x86_64.egg/whipper/image/table.py", line 372, in getMusicBrainzDiscId
    disc = put(values[0], values[1], values[2], values[3:])
  File "/home/admin/.local/lib/python3.8/site-packages/discid/disc.py", line 76, in put
    disc.put(first, last, disc_sectors, track_offsets)
  File "/home/admin/.local/lib/python3.8/site-packages/discid/disc.py", line 176, in put
    raise TOCError(self._get_error_msg())
discid.disc.TOCError: Disc too long

The dell drive can rip (but it is slow even when doing the "reading table" for the Q sub-channels stuff)

And with this output: (using cdparanoia: cdparanoia III release 10.2 (September 11, 2008) )

INFO:whipper.command.cd:using configured read offset 102
INFO:whipper.command.cd:checking device /dev/sr0
WARNING:whipper.program.utils:command 'eject -t /dev/sr0' returned with exit code '1' (b'eject: CD-ROM tray close command failed: Input/output error')
CDDB disc id: f40dad14
MusicBrainz disc id qdCa_XNd.tRZ9u_Txtcqi8mhJTM-
MusicBrainz lookup URL https://musicbrainz.org/cdtoc/attach?toc=1+20+262784+150+12709+22804+35141+49687+64064+77211+90398+105428+119426+131347+143269+152868+167098+180922+195771+210814+223524+236698+247872&tracks=20&id=qdCa_XNd.tRZ9u_Txtcqi8mhJTM-
Disc duration: 00:58:21.786, 20 audio tracks

Matching releases:

Artist  : Various Artists
Title   : Stars Of: American Songbook (Disc 1 of 3)
Duration: 00:58:21.579
URL     : https://musicbrainz.org/release/a637d13b-c669-41a1-89f8-07364d4bdb2f
Release : a637d13b-c669-41a1-89f8-07364d4bdb2f
Type    : Compilation
Barcode : 698458952028
Country : United Kingdom
Cat no  : USMMKTCD010

Track 1 finished, found 3850 Q sub-channels with CRC errors
Track 2 finished, found 3631 Q sub-channels with CRC errors
Track 3 finished, found 3869 Q sub-channels with CRC errors
Track 4 finished, found 5164 Q sub-channels with CRC errors
Track 5 finished, found 4629 Q sub-channels with CRC errors
Track 6 finished, found 4443 Q sub-channels with CRC errors
Track 7 finished, found 4400 Q sub-channels with CRC errors
Track 8 finished, found 4678 Q sub-channels with CRC errors
Track 10 finished, found 4291 Q sub-channels with CRC errors
Track 11 finished, found 3882 Q sub-channels with CRC errors
Track 12 finished, found 3438 Q sub-channels with CRC errors
Track 13 finished, found 4623 Q sub-channels with CRC errors
Track 14 finished, found 4498 Q sub-channels with CRC errors
Track 15 finished, found 4617 Q sub-channels with CRC errors
Track 16 finished, found 5132 Q sub-channels with CRC errors
Track 17 finished, found 3909 Q sub-channels with CRC errors
Track 18 finished, found 4498 Q sub-channels with CRC errors
Track 19 finished, found 1 Q sub-channels with CRC errors
Track 20 finished, found 4635 Q sub-channels with CRC errors
Traceback (most recent call last):
  File "/usr/local/bin/whipper", line 11, in <module>
    load_entry_point('whipper==0.9.1.dev100+g04ff005', 'console_scripts', 'whipper')()
  File "/usr/local/lib/python3.8/dist-packages/whipper-0.9.1.dev100+g04ff005-py3.8-linux-x86_64.egg/whipper/command/main.py", line 56, in main
    ret = cmd.do()
  File "/usr/local/lib/python3.8/dist-packages/whipper-0.9.1.dev100+g04ff005-py3.8-linux-x86_64.egg/whipper/command/basecommand.py", line 141, in do
    return self.cmd.do()
  File "/usr/local/lib/python3.8/dist-packages/whipper-0.9.1.dev100+g04ff005-py3.8-linux-x86_64.egg/whipper/command/basecommand.py", line 141, in do
    return self.cmd.do()
  File "/usr/local/lib/python3.8/dist-packages/whipper-0.9.1.dev100+g04ff005-py3.8-linux-x86_64.egg/whipper/command/cd.py", line 155, in do
    self.itable = self.program.getTable(self.runner,
  File "/usr/local/lib/python3.8/dist-packages/whipper-0.9.1.dev100+g04ff005-py3.8-linux-x86_64.egg/whipper/common/program.py", line 135, in getTable
    itable.getMusicBrainzDiscId())
  File "/usr/local/lib/python3.8/dist-packages/whipper-0.9.1.dev100+g04ff005-py3.8-linux-x86_64.egg/whipper/image/table.py", line 372, in getMusicBrainzDiscId
    disc = put(values[0], values[1], values[2], values[3:])
  File "/home/admin/.local/lib/python3.8/site-packages/discid/disc.py", line 76, in put
    disc.put(first, last, disc_sectors, track_offsets)
  File "/home/admin/.local/lib/python3.8/site-packages/discid/disc.py", line 176, in put
    raise TOCError(self._get_error_msg())
discid.disc.TOCError: Disc too long

The same disc also fails on the dell drive:

WARNING:whipper.program.cdparanoia:file size 0 did not match expected size 29538812
WARNING:whipper.program.cdparanoia:non-integral amount of frames difference
Traceback (most recent call last):
  File "/usr/local/lib/python3.8/dist-packages/whipper-0.9.1.dev100+g04ff005-py3.8-linux-x86_64.egg/whipper/program/cdparanoia.py", line 193, in getTrackQuality
    return min(frames * 2.0 / reads, 1.0)
ZeroDivisionError: float division by zero

I've no reason to think that the drive is otherwise faulty, abcde rips fine ( with either cdparnanoia), windows plays music fine.

github-actions[bot] commented 4 years ago

šŸ‘‹ Thanks for opening your first issue here! If you're reporting a šŸž bug, please make sure you include steps to reproduce it. We get a lot of issues on this repo, so please be patient and we will get back to you as soon as we can.

To help make it easier for us to investigate your issue, please follow the contributing instructions.

samliddicott commented 4 years ago

Now repeating tests with WHIPPER_DEBUG=DEBUG WHIPPER_LOGFILE=whipper.log

samliddicott commented 4 years ago

The apple find is attempting to lookup: www.accuraterip.com/accuraterip/7/d/2/dBAR-020-004422d7-04240b28-291f7f14.bin apple-cd10.2-offset-find-whipper.log.gz

-DEBUG:whipper.image.table:leadout LBA: 604760
-DEBUG:whipper.image.table:cddb values: DiscID(offsets=[150, 12709, 22804, 35141, 49687, 64064, 77211, 90398, 105428, 224854, 236775, 248697, 258296, 272526, 286350, 301199, 316242, 328952, 342126, 589998], total_length=8063, track_count
=20, playable_length=8063)
-DEBUG:whipper.image.table:cddb disc id debug: 291f7f14 20 150 12709 22804 35141 49687 64064 77211 90398 105428 224854 236775 248697 258296 272526 286350 301199 316242 328952 342126 589998 8065
-DEBUG:whipper.command.offset:CDDB disc id: '291f7f14'
-DEBUG:whipper.image.table:leadout LBA: 604760
-DEBUG:whipper.image.table:cddb values: DiscID(offsets=[150, 12709, 22804, 35141, 49687, 64064, 77211, 90398, 105428, 224854, 236775, 248697, 258296, 272526, 286350, 301199, 316242, 328952, 342126, 589998], total_length=8063, track_count
=20, playable_length=8063)
-DEBUG:whipper.image.table:cddb disc id debug: 291f7f14 20 150 12709 22804 35141 49687 64064 77211 90398 105428 224854 236775 248697 258296 272526 286350 301199 316242 328952 342126 589998 8065
-DEBUG:whipper.common.accurip:downloading AccurateRip entry from http://www.accuraterip.com/accuraterip/7/d/2/dBAR-020-004422d7-04240b28-291f7f14.bin
-ERROR:whipper.common.accurip:error retrieving AccurateRip entry: HTTP Error 404: Not Found
-WARNING:whipper.common.accurip:entry not found in AccurateRip database
-WARNING:whipper.command.offset:AccurateRip entry not found: drive offset can't be determined, try again with another disc

With the same disk, the dell find is attempting to lookup: www.accuraterip.com/accuraterip/3/b/b/dBAR-020-00299bb3-0264be76-f40dad14.bin dell-cd10.2-offset-find-whipper.log.gz

+DEBUG:whipper.image.table:leadout LBA: 262634
+DEBUG:whipper.image.table:cddb values: DiscID(offsets=[150, 12709, 22804, 35141, 49687, 64064, 77211, 90398, 105428, 119426, 131347, 143269, 152868, 167098, 180922, 195771, 210814, 223524, 236698, 247872], total_length=3501, track_count=20, playable_length=3501)
+DEBUG:whipper.image.table:cddb disc id debug: f40dad14 20 150 12709 22804 35141 49687 64064 77211 90398 105428 119426 131347 143269 152868 167098 180922 195771 210814 223524 236698 247872 3503
+DEBUG:whipper.command.offset:CDDB disc id: 'f40dad14'
+DEBUG:whipper.image.table:leadout LBA: 262634
+DEBUG:whipper.image.table:cddb values: DiscID(offsets=[150, 12709, 22804, 35141, 49687, 64064, 77211, 90398, 105428, 119426, 131347, 143269, 152868, 167098, 180922, 195771, 210814, 223524, 236698, 247872], total_length=3501, track_count=20, playable_length=3501)
+DEBUG:whipper.image.table:cddb disc id debug: f40dad14 20 150 12709 22804 35141 49687 64064 77211 90398 105428 119426 131347 143269 152868 167098 180922 195771 210814 223524 236698 247872 3503
+DEBUG:whipper.common.accurip:downloading AccurateRip entry from http://www.accuraterip.com/accuraterip/3/b/b/dBAR-020-00299bb3-0264be76-f40dad14.bin
+DEBUG:whipper.command.offset:1 AccurateRip responses found.
+DEBUG:whipper.image.table:leadout LBA: 262634
+DEBUG:whipper.image.table:cddb values: DiscID(offsets=[150, 12709, 22804, 35141, 49687, 64064, 77211, 90398, 105428, 119426, 131347, 143269, 152868, 167098, 180922, 195771, 210814, 223524, 236698, 247872], total_length=3501, track_count=20, playable_length=3501)
+DEBUG:whipper.image.table:cddb disc id debug: f40dad14 20 150 12709 22804 35141 49687 64064 77211 90398 105428 119426 131347 143269 152868 167098 180922 195771 210814 223524 236698 247872 3503
samliddicott commented 4 years ago

It turns out not to be a genuine apple drive (thanks random ebay seller!) but I don't think that affects the validity of the report

Bujiraso commented 3 years ago

I believe I am also seeing this bug with a Lenovo DVD/CD Rewritable Drive on my Thinkpad T430.

I used the same disc that worked minutes before on my ASUS BW-16D1HT Extreme bluray writer on a custom build desktop PC nearby.

I did retry and got the same error twice. I changed CDs to a different one and received the same error.

$ whipper offset find
INFO:whipper.command.offset:checking device /dev/sr0
WARNING:whipper.program.utils:command 'eject -t /dev/sr0' returned with exit code '1' (b'eject: CD-ROM tray close command failed: Input/output error')
Track 1 finished, found 4513 Q sub-channels with CRC errors
Track 2 finished, found 3471 Q sub-channels with CRC errors
Track 3 finished, found 5444 Q sub-channels with CRC errors
Track 4 finished, found 4645 Q sub-channels with CRC errors
Track 5 finished, found 5467 Q sub-channels with CRC errors
Track 6 finished, found 4714 Q sub-channels with CRC errors
Track 7 finished, found 4632 Q sub-channels with CRC errors
Track 8 finished, found 5059 Q sub-channels with CRC errors
Track 9 finished, found 798 Q sub-channels with CRC errors
Track 10 finished, found 5043 Q sub-channels with CRC errors
Track 11 finished, found 3394 Q sub-channels with CRC errors
Track 12 finished, found 5080 Q sub-channels with CRC errors
ERROR:whipper.common.accurip:error retrieving AccurateRip entry: 404 Not Found <Response [404]>
WARNING:whipper.common.accurip:entry not found in AccurateRip database
WARNING:whipper.command.offset:AccurateRip entry not found: drive offset can't be determined, try again with another disc
Bujiraso commented 3 years ago

Hey @JoeLametta ,

What information would you like gathered on this one? I'd like to help out

techno156 commented 8 months ago

This also seems to occur with the GT80N Drive Lenovo packs with the M73 Tiny (Detected as HL-DT-ST GT80N), which is an internal laptop drive connected to the main system by a USB interface.

Drive Version

$ whipper drive list
drive: /dev/cdrom, vendor: HL-DT-ST, model: DVDRAM GT80N    , release: LN82
WARNING:whipper.command.drive:no read offset found. Run 'whipper offset find'
       Can defeat audio cache: True

whipper --version output: whipper 0.10.0

uname -a output: Linux M73-Tiny 6.8.1-arch1-1 #1 SMP PREEMPT_DYNAMIC Sat, 16 Mar 2024 17:15:35 +0000 x86_64 GNU/Linux

OS: Arch Linux x86_64

Offset Find output

AccurateRips provides an offset if I look the drive up manually, but manually providing it with offset find doesn't seem to be particularly helpful.

$ WHIPPER_DEBUG=DEBUG WHIPPER_LOGFILE=./whipper_no_offset.log whipper offset find
Track 1 finished, found 6052 Q sub-channels with CRC errors
Track 2 finished, found 6071 Q sub-channels with CRC errors
Track 3 finished, found 6054 Q sub-channels with CRC errors
Track 4 finished, found 6379 Q sub-channels with CRC errors
Track 5 finished, found 5597 Q sub-channels with CRC errors
Track 6 finished, found 6714 Q sub-channels with CRC errors
Track 7 finished, found 4205 Q sub-channels with CRC errors
Track 8 finished, found 8082 Q sub-channels with CRC errors
Track 9 finished, found 296 Q sub-channels with CRC errors
Track 10 finished, found 7308 Q sub-channels with CRC errors
Track 11 finished, found 5970 Q sub-channels with CRC errors
Track 12 finished, found 6167 Q sub-channels with CRC errors
Track 13 finished, found 6676 Q sub-channels with CRC errors
Track 14 finished, found 6558 Q sub-channels with CRC errors
Track 15 finished, found 6190 Q sub-channels with CRC errors
Track 16 finished, found 4678 Q sub-channels with CRC errors
Track 17 finished, found 5762 Q sub-channels with CRC errors
Track 18 finished, found 7014 Q sub-channels with CRC errors

whipper_no_offset.log

WHIPPER_DEBUG=DEBUG WHIPPER_LOGFILE=./whipper_with_offset.log whipper offset find -o +102
Track 1 finished, found 6051 Q sub-channels with CRC errors
Track 2 finished, found 6071 Q sub-channels with CRC errors
Track 3 finished, found 6054 Q sub-channels with CRC errors
Track 4 finished, found 6380 Q sub-channels with CRC errors
Track 5 finished, found 5596 Q sub-channels with CRC errors
Track 6 finished, found 6714 Q sub-channels with CRC errors
Track 7 finished, found 4205 Q sub-channels with CRC errors
Track 8 finished, found 8081 Q sub-channels with CRC errors
Track 9 finished, found 296 Q sub-channels with CRC errors
Track 10 finished, found 7308 Q sub-channels with CRC errors
Track 11 finished, found 5970 Q sub-channels with CRC errors
Track 12 finished, found 6167 Q sub-channels with CRC errors
Track 13 finished, found 6676 Q sub-channels with CRC errors
Track 14 finished, found 6558 Q sub-channels with CRC errors
Track 15 finished, found 6190 Q sub-channels with CRC errors
Track 16 finished, found 4678 Q sub-channels with CRC errors
Track 17 finished, found 5763 Q sub-channels with CRC errors
Track 18 finished, found 7014 Q sub-channels with CRC errors

whipper_with_offset.log

If it didn't mention it in the logs, I'd have thought that I'd run into a bug where it was ignoring the offset argument completely.

However, this issue seems to be limited to whipper exclusively. Using cyanrip 0.9.0 (a24cd99) with the same offset works perfectly fine, and it is able to correctly detect the offset as +102.