bleskodev / rubyripper

Fork of the original rubyripper from code.google.com/p/rubyripper + some bugs fixes
125 stars 21 forks source link

Failure to rip hidden track. #608

Closed andbandss closed 6 years ago

andbandss commented 7 years ago

Ruby Ripper fails to rip the 10 minute hidden track before track 1 on Arcade Fire's Reflektor (I have not yet reproduced the error on any other disc). "Rip hidden audio sectors" is checked. I have tried values 0-2 in "Mark as hidden track when longer than _ second(s)". I successfully ripped this album with the hidden track a year or two ago. I have not yet tried rolling back versions (hopefully I will have time to do so in the next few days). This is on Linux Mint with all dependancies installed. I will update as I discover more information, but I don't know Ruby and have not looked at this code much at all, so I hope somebody else has some insights.

bleskodev commented 7 years ago

Hi, thanks for reporting. When you say 'fails to rip ...', what is exactly happening? Can you activate verbose/debug options (in Preferences->Other tab) and attach the output here? Thanks.

andbandss commented 7 years ago

Thank you so much for the quick response. I imagine that you are busy, and this project probably isn't top priority. Thank you for adopting it.

I've attached ripping.log below. It appears to detect the pregap, but simply ignores it and starts ripping track 1, as if "Rip hidden audio sectors" isn't checked. I've tried both rubyripper-master and -stable just to see if there is a difference, but there does not appear to be. I will try v0.6.2 this evening, but I am sure that I used that version to rip my whole collection last time and it worked fine. I am also trying to remember which other albums of mine have a track "0" so that I can test different inputs, but I haven't come across one yet. I'll continue to post as I learn more.

ripping.log.txt

andbandss commented 7 years ago

I ran it one more time with Debug on. The console output through track 1 is below. Again, it appears to simply skip the pregap as if ripping it is not enabled. There does not appear to be any relevant error message.

DEBUG: cdparanoia -d /dev/sr1 -vQ DEBUG: cd-discid /dev/sr1 DEBUG: cdrdao read-toc --device /dev/sr1 "/tmp/sr1.toc" DEBUG: trackselection = [1, 2, 3, 4, 5, 6, 7] DEBUG: date DEBUG: cdparanoia --version DEBUG: flac --version DEBUG: Ripping track 1 DEBUG: Expected filesize for track 1 is 80076236 bytes. DEBUG: LC_ALL=C; df "/media/andrew/Documents and Media/Ruby Ripper Rips/Arcade Fire/2013 - Reflektor" DEBUG: Free disk space is 431604016 MB DEBUG: Minutes ripping is 0.5171059276833333. DEBUG: cdparanoia -Z [.45150]-[.34045] -d /dev/sr1 -O 0 "/media/andrew/Documents and Media/Ruby Ripper Rips/Arcade Fire/temp_sr1/track_1_1.wav" DEBUG: Minutes ripping is 1.0616309380166666. DEBUG: cdparanoia -Z [.45150]-[.34045] -d /dev/sr1 -O 0 "/media/andrew/Documents and Media/Ruby Ripper Rips/Arcade Fire/temp_sr1/track_1_2.wav" DEBUG: Minutes ripping is 1.6057734093. DEBUG: cdparanoia -Z [.45150]-[.34045] -d /dev/sr1 -O 0 "/media/andrew/Documents and Media/Ruby Ripper Rips/Arcade Fire/temp_sr1/track_1_3.wav" DEBUG: Start of hashes algorithm 2017-06-25 16:18:29 -0700. DEBUG: End of hashes algorithm 2017-06-25 16:18:30 -0700. DEBUG: LC_ALL=C; sox "/media/andrew/Documents and Media/Ruby Ripper Rips/Arcade Fire/temp_sr1/track_1_1.wav" -n stats DEBUG: Start of hashes algorithm 2017-06-25 16:18:31 -0700. DEBUG: End of hashes algorithm 2017-06-25 16:18:32 -0700. DEBUG: Start of hashes algorithm 2017-06-25 16:18:32 -0700. DEBUG: End of hashes algorithm 2017-06-25 16:18:33 -0700. DEBUG: Adding track 1 (flac) to the queue.. DEBUG: Ripping track 2 DEBUG: Expected filesize for track 2 is 60644012 bytes. DEBUG: LC_ALL=C; df "/media/andrew/Documents and Media/Ruby Ripper Rips/Arcade Fire/2013 - Reflektor" DEBUG: flac -o "/media/andrew/Documents and Media/Ruby Ripper Rips/Arcade Fire/2013 - Reflektor/01 - Reflektor.flac" --best -V --tag ARTIST="Arcade Fire" --tag ALBUM="Reflektor" --tag GENRE="Album" --tag DATE="2013" --tag ENCODER="Rubyripper 0.7.0rc1" --tag DISCID="5c088207" --tag TITLE="Reflektor" --tag TRACKNUMBER=1 --tag TRACKTOTAL=7 "/media/andrew/Documents and Media/Ruby Ripper Rips/Arcade Fire/temp_sr1/track_1_1.wav"

andbandss commented 7 years ago

For the sake of completeness, here are the ripping log and console output through track 1 for the same disc using v0.6.2.

ripping.log.txt

Scanning disc with cdrdao Cdrdao version 1.2.3 - (C) Andreas Mueller andreas@daneb.de /dev/sr1: TSSTcorp CDDVDW SE-208AB Rev: TS03 Using driver: Generic SCSI-3/MMC - Version 2.0 (options 0x0000)

Reading toc data...

Track Mode Flags Start Length

1 AUDIO 0 10:02:00( 45150) 07:33:71( 34046) 2 AUDIO 0 17:35:71( 79196) 05:43:59( 25784) 3 AUDIO 0 23:19:55(104980) 02:42:15( 12165) 4 AUDIO 0 26:01:70(117145) 06:30:61( 29311) 5 AUDIO 0 32:32:56(146456) 04:22:27( 19677) 6 AUDIO 0 36:55:08(166133) 03:59:05( 17930) 7 AUDIO 0 40:54:13(184063) 05:26:39( 24489) Leadout AUDIO 0 46:20:52(208552)

PQ sub-channel reading (audio track) is supported, data format is BCD. Raw P-W sub-channel reading (audio track) is supported. Cooked R-W sub-channel reading (audio track) is supported. Analyzing track 01 (AUDIO): start 10:02:00, length 07:33:71... Found pre-gap: 10:02:00 Found 14 Q sub-channels with CRC errors. Found ISRC code. Control nibbles of track match CD-TOC settings. Analyzing track 02 (AUDIO): start 17:35:71, length 05:43:59... Found 12 Q sub-channels with CRC errors. Found ISRC code. Control nibbles of track match CD-TOC settings. Analyzing track 03 (AUDIO): start 23:19:55, length 02:42:15... Found 3 Q sub-channels with CRC errors. Found ISRC code. Control nibbles of track match CD-TOC settings. Analyzing track 04 (AUDIO): start 26:01:70, length 06:30:61... Found 8 Q sub-channels with CRC errors. Found ISRC code. Control nibbles of track match CD-TOC settings. Analyzing track 05 (AUDIO): start 32:32:56, length 04:22:27... /media/andrew/Documents and Media/Ruby Ripper Rips/flac/Arcade Fire (2013) Reflektor status = ["dir_exists", "/media/andrew/Documents and Media/Ruby Ripper Rips/flac/Arcade Fire (2013) Reflektor"] /media/andrew/Documents and Media/Ruby Ripper Rips/flac/Arcade Fire (2013) Reflektor /media/andrew/Documents and Media/Ruby Ripper Rips/vorbis/Arcade Fire (2013) Reflektor 01 - Reflektor.flac 02 - We Exist.flac 03 - Flashbulb Eyes.flac 04 - Here Comes the Night Time.flac 05 - Normal Person.flac 06 - You Already Know.flac 07 - Joan of Arc.flac 01 - Reflektor.ogg 02 - We Exist.ogg 03 - Flashbulb Eyes.ogg 04 - Here Comes the Night Time.ogg 05 - Normal Person.ogg 06 - You Already Know.ogg 07 - Joan of Arc.ogg 00 - Hidden Track.flac 00 - Hidden Track.ogg Found 9 Q sub-channels with CRC errors. Found ISRC code. Control nibbles of track match CD-TOC settings. Analyzing track 06 (AUDIO): start 36:55:08, length 03:59:05... Found 1 Q sub-channels with CRC errors. Found ISRC code. Control nibbles of track match CD-TOC settings. Analyzing track 07 (AUDIO): start 40:54:13, length 05:26:39... Found 9 Q sub-channels with CRC errors. Found ISRC code. Control nibbles of track match CD-TOC settings. Found disk catalogue number.

Reading of toc data finished successfully. Loading file: /tmp/temp_sr1.toc Disc type = CD_DA Found info of tracknumber 1 Found info of tracknumber 2 Found info of tracknumber 3 Found info of tracknumber 4 Found info of tracknumber 5 Found info of tracknumber 6 Found info of tracknumber 7 Ripping track 0 Expected filesize for track 0 is 106192844 bytes. Free disk space is 431469996 MB Minutes ripping is 9.22267e-05. cdparanoia -Z [.0]-[.45149] -d /dev/sr1 -O 0 "/media/andrew/Documents and Media/Ruby Ripper Rips/flac/temp_sr1/track0_1.wav" cdparanoia III release 10.2 (September 11, 2008)

Ripping from sector 0 (track 0 [0:00.00]) to sector 45149 (track 0 [10:01.74])

outputting to /media/andrew/Documents and Media/Ruby Ripper Rips/flac/temp_sr1/track0_1.wav

(== PROGRESS == [ >| 044399 00 ] == :^D . ==) scsi_read error: sector=44994 length=27 retry=0 Sense key: 5 ASC: 64 ASCQ: 0 Transport error: Illegal SCSI request (rejected by target) System error: Invalid argument scsi_read error: sector=44994 length=13 retry=1 Sense key: 5 ASC: 64 ASCQ: 0 Transport error: Illegal SCSI request (rejected by target) System error: Invalid argument (== PROGRESS == [ e| 045149 00 ] == :^D * ==)

Done.

Minutes ripping is 0.8963153502833333. cdparanoia -Z [.0]-[.45149] -d /dev/sr1 -O 0 "/media/andrew/Documents and Media/Ruby Ripper Rips/flac/temp_sr1/track0_2.wav" cdparanoia III release 10.2 (September 11, 2008)

Ripping from sector 0 (track 0 [0:00.00]) to sector 45149 (track 0 [10:01.74])

outputting to /media/andrew/Documents and Media/Ruby Ripper Rips/flac/temp_sr1/track0_2.wav

(== PROGRESS == [ >| 044399 00 ] == :^D ==) scsi_read error: sector=44994 length=27 retry=0 Sense key: 5 ASC: 64 ASCQ: 0 Transport error: Illegal SCSI request (rejected by target) System error: Invalid argument scsi_read error: sector=44994 length=13 retry=1 Sense key: 5 ASC: 64 ASCQ: 0 Transport error: Illegal SCSI request (rejected by target) System error: Invalid argument (== PROGRESS == [ e| 045149 00 ] == :^D * ==)

Done.

Adding track 0 (flac) to the queue.. Adding track 0 (vorbis) to the queue.. Ripping track 1 Expected filesize for track 1 is 80076236 bytes. command = flac --best -V -o "/media/andrew/Documents and Media/Ruby Ripper Rips/flac/Arcade Fire (2013) Reflektor/00 - Hidden Track.flac" --tag ALBUM="Reflektor" --tag DATE="2013" --tag GENRE="Album" --tag DISCID="5c088207" --tag ARTIST="Arcade Fire" --tag TITLE="Hidden Track" --tag TRACKNUMBER=0 --tag TRACKTOTAL=7 "/media/andrew/Documents and Media/Ruby Ripper Rips/flac/temp_sr1/track0_1.wav" command = oggenc -o "/media/andrew/Documents and Media/Ruby Ripper Rips/vorbis/Arcade Fire (2013) Reflektor/00 - Hidden Track.ogg" -q 9 -c ALBUM="Reflektor" -c DATE="2013" -c GENRE="Album" -c DISCID="5c088207" -c ARTIST="Arcade Fire" -c TITLE="Hidden Track" -c TRACKNUMBER=0 -c TRACKTOTAL=7 "/media/andrew/Documents and Media/Ruby Ripper Rips/flac/temp_sr1/track0_1.wav"

flac 1.3.1, Copyright (C) 2000-2009 Josh Coalson, 2011-2014 Xiph.Org Foundation flac comes with ABSOLUTELY NO WARRANTY. This is free software, and you are welcome to redistribute it under certain conditions. Type `flac' for details.

Free disk space is 431500304 MB Minutes ripping is 1.75349689195. cdparanoia -Z [.45150]-[.34045] -d /dev/sr1 -O 0 "/media/andrew/Documents and Media/Ruby Ripper Rips/flac/temp_sr1/track1_1.wav" Opening with wav module: WAV file reader Encoding "/media/andrew/Documents and Media/Ruby Ripper Rips/flac/temp_sr1/track0_1.wav" to "/media/andrew/Documents and Media/Ruby Ripper Rips/vorbis/Arcade Fire (2013) Reflektor/00 - Hidden Track.ogg" at quality 9.00 cdparanoia III release 10.2 (September 11, 2008)

[  1.2%] [ 0m11s remaining] \ Ripping from sector   45150 (track  1 [0:00.00])
  to sector   79195 (track  1 [7:33.70])

outputting to /media/andrew/Documents and Media/Ruby Ripper Rips/flac/temp_sr1/track1_1.wav

(== PRO[ 66.Verify OK, wrote 38795517 bytes, ratio=0.36500 ] == :^D O ==)
Removing track 0 (flac) from the queue.. (== PRO[ 99.9%] [ 0m00s remaining] \ | 059549 00 ] == :^D O ==)

Done encoding file "/media/andrew/Documents and Media/Ruby Ripper Rips/vorbis/Arcade Fire (2013) Reflektor/00 - Hidden Track.ogg"

File length:  10m 02.0s
Elapsed time: 0m 15.0s
Rate:         40.1911
Average bitrate: 266.1 kb/s

Removing track 0 (vorbis) from the queue.. (== PROGRESS == [ | 079195 00 ] == :^D * ==)

Done.

Minutes ripping is 2.2979179471499998. cdparanoia -Z [.45150]-[.34045] -d /dev/sr1 -O 0 "/media/andrew/Documents and Media/Ruby Ripper Rips/flac/temp_sr1/track1_2.wav" cdparanoia III release 10.2 (September 11, 2008)

Ripping from sector 45150 (track 1 [0:00.00]) to sector 79195 (track 1 [7:33.70])

outputting to /media/andrew/Documents and Media/Ruby Ripper Rips/flac/temp_sr1/track1_2.wav

(== PROGRESS == [ | 079195 00 ] == :^D * ==)

Done.

Adding track 1 (flac) to the queue.. Adding track 1 (vorbis) to the queue.. Ripping track 2 Expected filesize for track 2 is 60644012 bytes. command = flac --best -V -o "/media/andrew/Documents and Media/Ruby Ripper Rips/flac/Arcade Fire (2013) Reflektor/01 - Reflektor.flac" --tag ALBUM="Reflektor" --tag DATE="2013" --tag GENRE="Album" --tag DISCID="5c088207" --tag ARTIST="Arcade Fire" --tag TITLE="Reflektor" --tag TRACKNUMBER=1 --tag TRACKTOTAL=7 "/media/andrew/Documents and Media/Ruby Ripper Rips/flac/temp_sr1/track1_1.wav" command = oggenc -o "/media/andrew/Documents and Media/Ruby Ripper Rips/vorbis/Arcade Fire (2013) Reflektor/01 - Reflektor.ogg" -q 9 -c ALBUM="Reflektor" -c DATE="2013" -c GENRE="Album" -c DISCID="5c088207" -c ARTIST="Arcade Fire" -c TITLE="Reflektor" -c TRACKNUMBER=1 -c TRACKTOTAL=7 "/media/andrew/Documents and Media/Ruby Ripper Rips/flac/temp_sr1/track1_1.wav" Free disk space is 431468356 MB Minutes ripping is 2.8524259311666667. cdparanoia -Z [.79196]-[.25783] -d /dev/sr1 -O 0 "/media/andrew/Documents and Media/Ruby Ripper Rips/flac/temp_sr1/track2_1.wav"

flac 1.3.1, Copyright (C) 2000-2009 Josh Coalson, 2011-2014 Xiph.Org Foundation flac comes with ABSOLUTELY NO WARRANTY. This is free software, and you are welcome to redistribute it under certain conditions. Type `flac' for details.

Opening with wav module: WAV file reader Encoding "/media/andrew/Documents and Media/Ruby Ripper Rips/flac/temp_sr1/track1_1.wav" to "/media/andrew/Documents and Media/Ruby Ripper Rips/vorbis/Arcade Fire (2013) Reflektor/01 - Reflektor.ogg" at quality 9.00 cdparanoia III release 10.2 (September 11, 2008)

bleskodev commented 6 years ago

Hello again, I'm deeply sorry for the late reply. Your logs are very helpful. I have analysed the code and I can confirm that this feature got broken in the huge refactoring the original author did just before abandoning the project. I will make the fix and update this bug report (hopefully) very soon. Thanks for your patience!

bleskodev commented 6 years ago

From what I see in the code, while waiting for the fix, you should be able to workaround this problem if you use rubyripper_cli (from the terminal). You should be able to select track 0 for ripping (this is broken in the gtk2 version). It is even possible that it will be selected by default (rip all tracks is default and it should include track 0). I'm not 100% sure about all that since I don't have any disc with the hidden track to test it, but it would be cool if you could confirm if this works. Thanks!

andbandss commented 6 years ago

I'll see if I can give the CLI a shot later this week. Thanks again for taking responsibility for this code. No rush on the fix. I hope it goes smoothly for you.

bleskodev commented 6 years ago

I have pushed a fix to the master branch. According to my tests, it should fix the problem. It would be great if you could confirm the fix. Thanks!

(BTW, rubyripper_cli did not work either, no need to test).

andbandss commented 6 years ago

Seems to work! In a month or so I plan on re-ripping my whole collection, so maybe I'll come crying back here, but I see no reason why that would happen.

I noticed your note on the fix as well, regarding intuitiveness. Unfortunately, I don't see any way improve the workflow, unless freedb stores information on hidden tracks (I don't believe it does). RubyRipper doesn't seem to know if a disc has a hidden track until after Advanced TOC Analysis, and that would be a time consuming step to take before the disc's metadata is even displayed. It would be great if RubyRipper could present a more complete table of contents in the "Disc Info" display with a checkbox for track 0, and perhaps even for other pregaps, but I don't think it would be worth time investment upfront.

In any event, good work and thank you.