ARCue.pl - Check whole CD rips with AccurateRip |
![]() ![]() |
ARCue.pl - Check whole CD rips with AccurateRip |
May 9 2007, 05:31
Post
#51
|
|
|
Group: Members Posts: 382 Joined: 20-December 06 Member No.: 38861 |
megaupload works for me, or rapidshare I suppose. Either of those are at least 30 days from last download before they're removed.
|
|
|
|
May 11 2007, 05:02
Post
#52
|
|
|
Group: Members Posts: 382 Joined: 20-December 06 Member No.: 38861 |
I made a few additions to your scripts to write the output of arcue.pl to a text file that is then copied to the destination directory(s) as well as embedded in the FLAC image (if that is your desired format).
CODE REM ** run ARCue on source WAV file IF NOT @RunAccurateRip@==1 GOTO endAR ECHO. ECHO Processing image from AccurateRip database... ECHO. "@ARCue@" "@sourcecuesheet@">@arlog@ TYPE @arlog@ REM ** if inaccurate, abort, otherwise continue script IF ERRORLEVEL 1 GOTO error_1 GOTO endAR :error_1 ECHO Some tracks were not accurately ripped, aborting compression... ECHO Exiting script PAUSE REM ** cleanup temp files GOTO Cleanup :endAR add CODE arlog=accuraterip.log to the react.iniadd CODE --tag-from-file="accuraterip=accuraterip.log" to your flac commandline in the flac image section.add CODE COPY /Y @arlog@ %dest% to the image section as well to copy the actual log file.
This post has been edited by wraithdu: May 11 2007, 05:04 |
|
|
|
May 16 2007, 23:31
Post
#53
|
|
|
Group: Members Posts: 21 Joined: 25-March 07 Member No.: 41853 |
add CODE arlog=accuraterip.log to the react.iniadd CODE --tag-from-file="accuraterip=accuraterip.log" to your flac commandline in the flac image section.add CODE COPY /Y @arlog@ %dest% to the image section as well to copy the actual log file.You should use the @arlog@ variable for for your flac command line options as well. CODE --tag-from-file="accuraterip=@arlog@"
|
|
|
|
May 18 2007, 01:14
Post
#54
|
|
|
Group: Members Posts: 382 Joined: 20-December 06 Member No.: 38861 |
My latest additions to my REACT2 code:
REACT.ini CODE RunAccurateRip=1 ARCue=C:\Download\Media\Music\Tools\ARCue\ARCue.pl arlog=accuraterip.log CopyAR=0 TagAR=1 REACT-image.cfg CODE REM ** Initialize accuraterip variables SET ar_copy=0 SET ar_tag= REM ** Run ARCue on source WAV file and output results if desired IF NOT @RunAccurateRip@==1 GOTO endAR REM ** Set accuraterip variables SET ar_copy=@CopyAR@ IF @TagAR@==1 SET ar_tag=--tag-from-file="accuraterip=@arlog@" ECHO. ECHO Processing image from AccurateRip database. Please wait... ECHO. "@ARCue@" "@sourcecuesheet@"|find /v ".cue">@arlog@ TYPE @arlog@ REM ** If inaccurate, ask user what to do, otherwise continue script IF NOT ERRORLEVEL 1 GOTO endAR ECHO. ECHO Error validating image with AccurateRip. ECHO. :ask SET choice= ECHO Enter [c] to continue anyway. ECHO Enter [d] to delete temp files and exit. SET /p choice="Enter [x] to exit without deleting temp files: " IF [%choice%]==[c] GOTO continue IF [%choice%]==[d] GOTO error_1 IF [%choice%]==[x] EXIT ECHO. ECHO [%choice%] is invalid. ECHO. GOTO ask :error_1 REM ** Cleanup temp files GOTO Cleanup :continue REM ** If failed but continuing, set variables so @arlog@ is not copied or embeded SET ar_copy=0 SET ar_tag= :endAR under FLAC image CODE flac.exe @Opt_Flac@ %RG_Flac% %Cover_tag% -T "%ArtistField%=@cdartist@" -T album="@album@" -T totaltracks="$numtracks$" -T date="@year@" -T genre="@genre@" -T encoding="Flac @Ver_Flac@ @Opt_Flac@" --tag-from-file="cuesheet=@cuesheet@" --tag-from-file="eaclog=@eaclog@" %ar_tag% "@source@" -o "@image@" and IF %ar_copy%==1 COPY /Y @arlog@ %dest% under FLAC and LAME tracks CODE IF %ar_copy%==1 COPY /Y "@sourcedir@\@arlog@" . Cleanup section CODE REM ** Cleanup :Cleanup DEL "@source@" DEL "@eaclog@" DEL "@cuesheet@" DEL "@albumfile@.[*].cue" DEL "@cover@" DEL "@arlog@" I hope this is useful for someone else too! EDIT - fixed some logical and syntax errors....must've been tired last night This post has been edited by wraithdu: May 18 2007, 13:15 |
|
|
|
May 22 2007, 10:44
Post
#55
|
|
|
Group: Members Posts: 21 Joined: 25-March 07 Member No.: 41853 |
Nice work.
For anyone interested arcue.pl has been updated with these error codes, you can download it from the normal download link on the first post. |
|
|
|
May 22 2007, 19:47
Post
#56
|
|
|
Group: Members Posts: 78 Joined: 17-March 05 Member No.: 20691 |
Nice work. For anyone interested arcue.pl has been updated with these error codes, you can download it from the normal download link on the first post. Are you taking over ARCue for Chris? Is there still going to be support for cd's with data tracks also added? Thanks for any info. |
|
|
|
May 22 2007, 22:35
Post
#57
|
|
|
Group: Members Posts: 21 Joined: 25-March 07 Member No.: 41853 |
Nice work. For anyone interested arcue.pl has been updated with these error codes, you can download it from the normal download link on the first post. Are you taking over ARCue for Chris? Is there still going to be support for cd's with data tracks also added? Thanks for any info. He is still in the process of moving, he said his desk is coming soon, he's just set up the dev computer on the floor for now. The other features are still on the to do list until such a time as he can get back to them. |
|
|
|
May 23 2007, 00:08
Post
#58
|
|
|
Group: Members Posts: 34 Joined: 21-March 07 Member No.: 41689 |
Nice work. For anyone interested arcue.pl has been updated with these error codes, you can download it from the normal download link on the first post. Are you taking over ARCue for Chris? Is there still going to be support for cd's with data tracks also added? Thanks for any info. He is still in the process of moving, he said his desk is coming soon, he's just set up the dev computer on the floor for now. The other features are still on the to do list until such a time as he can get back to them. Thanks for passing on the update. I had a call from the desk supplier saying they'd made a mistake with the finishing, and it's going to be another 3 weeks whilst they start again!?!! Anyway, I started to look at getting CDs with data tracks supported, and am considering what the best way to achieve this is. Ideally, I'd quite like to have all the necessary data included in the cue sheet if possible. Is there any way to fully detail a data track in a cue sheet? From what I've read, FILE "data.bin" BINARY TRACK 10 MODE... would be valid, but requires the track length to be determined from the file size of data.bin. I'd rather not have to prompt the user to input data, as this would make automation harder. Any thoughts? Regards, Chris |
|
|
|
May 23 2007, 19:39
Post
#59
|
|
|
Group: Members Posts: 78 Joined: 17-March 05 Member No.: 20691 |
I have a question. Does EAC using accruaterip download the cd checksums to the hardisk temporarily? If so, since alot of us want to use EAC + REACT to do our images, which means we want to run ARCue right after the ripping of a cd, could ARCue fetch the downloaded cd checksums that EAC downloads?
Of course, this will not work if EAC + accuraterip just loads the info into memory without saving to the hard drive. Any thoughts? |
|
|
|
May 24 2007, 10:33
Post
#60
|
|
|
Group: Members Posts: 34 Joined: 21-March 07 Member No.: 41689 |
I have a question. Does EAC using accruaterip download the cd checksums to the hardisk temporarily? If so, since alot of us want to use EAC + REACT to do our images, which means we want to run ARCue right after the ripping of a cd, could ARCue fetch the downloaded cd checksums that EAC downloads? Of course, this will not work if EAC + accuraterip just loads the info into memory without saving to the hard drive. Any thoughts? AccurateRip does maintain a cache of checksums, in 'EAC/AccurateRipCache' from memory. I'd rather not hardcode logic to deal with something so specific into ARCue, but a command line option to force the use of a specific file for the checksums might be a good alternative. The calling code then need only identify which the most recently written bin file was, and point ARCue.pl to that. Regards, Chris |
|
|
|
May 28 2007, 03:40
Post
#61
|
|
|
Group: Members Posts: 21 Joined: 25-March 07 Member No.: 41853 |
I think we need a logfile switch
arcue.pl source.cue -L arcue.log Something like that. What Wraithdu has done above works, but redirecting the output leaves you stairing at a blank screen until the entire checking process is done, and then TYPEs the creative log to the screen. If the logfile creation were part of the script itself then you could still have regular file by file output while writing to the log file in perl. |
|
|
|
May 29 2007, 21:09
Post
#62
|
|
|
Group: Members Posts: 382 Joined: 20-December 06 Member No.: 38861 |
A logfile option would be great. I wasn't totally pleased with my solution either, but that was the best option available with batch scripting I think. The user just has to have faith the perl script is actually doing something, lol.
This post has been edited by wraithdu: May 29 2007, 21:09 |
|
|
|
Jun 4 2007, 01:53
Post
#63
|
|
![]() Group: Members Posts: 17 Joined: 21-May 07 Member No.: 43641 |
So, what is the AccurateRip algo anyways? Best I could figure out...
Pseudocode: CODE where a cd frame equals 588 wav frames where each wav frame equals 4 bytes thus a cd frame equals 2352 bytes (read block size) where accuraterip_crc(offset) { sum framevalues[i] * (offset + i) } iterate through PCM WAVE audio data one cd frame at a time { ? first track -> skip first 4 cd frames -> ? 4th cd frame: crc += (value of last wav frame of this cd frame) * 588 * 5 -> ? after 4th cd frame: crc += thiscdframe_wavframevalues.accuraterip_crc(cd_frame_num * 588 + 1) ? not first or last track -> crc += thiscdframe_wavframevalues.accuraterip_crc(cd_frame_num * 588 + 1) ? last track -> skip last cd frames -> ? before last 5 cd frames: crc += thiscdframe_wavframevalues.accuraterip_crc(cd_frame_num * 588 + 1) } Is the algo documented anywhere? I want to be sure I'm getting this right (for my Ruby language implementation). The Ruby implementation has a chunk of inline'd C code which makes it significantly faster than the pure Perl version. The same would be true of the original Perl version if it used inlined code or (more appropriately) a module as Chris mentioned is possible to write. How sure are we that the implementation is correct? *update* I have overhauled my Ruby script skills on this endeavor. Now I've got it reading tocfiles and cuesheets without needing conversion. The algo works on everything I've tested so far. There are recent changes Chris made to ARCue.pl, I would like to know if there is a ChangeLog? (Or any recent communication at all, really. CK- I hope your move is going well and the desk works out!) Code follows: http://osclab.net/foss/releases/notdown-0.22.tar.bz2 This post has been edited by jnc: Jun 14 2007, 09:02 |
|
|
|
Jun 13 2007, 02:48
Post
#64
|
|
|
Group: Members Posts: 100 Joined: 31-December 02 Member No.: 4330 |
To everyone who contributed to the ARCue.pl script and REACT2 config changes - THANK YOU!
I did a slightly modified version of the above with all my other REACT2 changes and all works well. I can now set my Plextor to Burst mode and re-do the CD's that either fail, or AccurateRip doesn't know about. With some of my rare CD's, that's probably 10% of my collection anyway, and I would want to securely rip them for peace of mind. Robert |
|
|
|
Jun 18 2007, 11:29
Post
#65
|
|
|
Group: Members Posts: 100 Joined: 31-December 02 Member No.: 4330 |
wraithdu,
I'm having one problem with a disc that is finally either bad, or not in the AR database. It's not processing REACT any further after the EAC rip, at least from what I can tell. It's not giving me the {C} choice menu. Do you have any updates to your REACT code by chance? Edit: I fixed it so it now just moves past whether or not there are problems on the disc or not. Has anyone verified that errorlevel 1 works and presents the choice menu? Robert This post has been edited by valnar: Jun 18 2007, 23:33 |
|
|
|
Jun 20 2007, 18:00
Post
#66
|
|
|
Group: Members Posts: 382 Joined: 20-December 06 Member No.: 38861 |
wraithdu, I'm having one problem with a disc that is finally either bad, or not in the AR database. It's not processing REACT any further after the EAC rip, at least from what I can tell. It's not giving me the {C} choice menu. Do you have any updates to your REACT code by chance? Hmm, I haven't actually ripped a disc recently that failed. I'll try something if I get a chance tonight that should fail and report. It should work though, the script looks good. I guess it depends if the perl script is actually passing the errorlevel correctly...I can test it, but if it isn't, then I don't know how to fix it unfortunately. |
|
|
|
Jun 21 2007, 00:59
Post
#67
|
|
|
Group: Members Posts: 382 Joined: 20-December 06 Member No.: 38861 |
wraithdu, I'm having one problem with a disc that is finally either bad, or not in the AR database. It's not processing REACT any further after the EAC rip, at least from what I can tell. It's not giving me the {C} choice menu. Do you have any updates to your REACT code by chance? Hmm, I haven't actually ripped a disc recently that failed. I'll try something if I get a chance tonight that should fail and report. It should work though, the script looks good. I guess it depends if the perl script is actually passing the errorlevel correctly...I can test it, but if it isn't, then I don't know how to fix it unfortunately. Well...I tested it tonight. Simple 3 track cue that is certainly not in AR, with the arcue.pl currently available (downloaded it tonight to be sure). I get the message "Disc not present..." which should set the errorlevel to 1. Testing it with a simple bat file, the errorlevel is NOT being returned to cmd.exe. Hence it is 0 and the Choice menu will never be triggered. Can someone familiar with Perl (using ActivePerl-5.8.8.820-MSWin32-x86-274739.msi as the engine) take a look at the script and figure out how to correctly return the error codes to the batch script? Thanks!! This post has been edited by wraithdu: Jun 21 2007, 01:07 |
|
|
|
Jul 4 2007, 19:12
Post
#68
|
|
|
Group: Members Posts: 1540 Joined: 13-August 03 Member No.: 8353 |
Hello guys, I have a request and I'm hoping you can help me with it.
I was thinking about how we can identify different pressings of the same CD album/issue. The problem you might be aware of: the TOC on CD A (made in Germany) and on CD B (made in England) are the same, but the audio isn't, or rather it has a different offset on the two pressings. So the idea is to re-check and shift the offset of one track (ideally the shortest) of a CD that is in the AR database but where all tracks do not match for as long as it takes until we get a AR database match. Can someone write a modified ARCue.pl so will accept an integer on the command line and use it as an offset modifier before checking a rip, plus the option to only check a specific track(s) and not the entire rip? This would be great, it's going to be a proof-of-concept tool to find a safe way of identifying these nasty "different pressings". EDIT: Nope, I can't do it myself. My programming skills are very basic. This post has been edited by Fandango: Jul 4 2007, 19:14 |
|
|
|
Jul 10 2007, 07:18
Post
#69
|
|
|
Group: Members Posts: 4 Joined: 10-July 07 Member No.: 45169 |
Can someone write a modified ARCue.pl so will accept an integer on the command line and use it as an offset modifier before checking a rip, plus the option to only check a specific track(s) and not the entire rip? This would be great, it's going to be a proof-of-concept tool to find a safe way of identifying these nasty "different pressings". This may do what you need: Patched ARCue.pl There's a new origin parameter which accepts an integer that indicates where the audio file begins with respect to the standard AccurateRip origin. For example, --origin=-30 indicates that the audio file begins 30 samples early wrt the AccurateRip origin (ie, it has 30 extra samples at the beginning and is missing 30 samples from the end). --origin=30 indicates that the audio file begins 30 samples late (ie, is missing 30 samples from the beginning but has 30 extra samples at the end). The default is to use the AccurateRip standard origin. Any missing samples are filled with zeros when calculating the AccurateRip check values. There's also a new --tracks parameter that accepts a list of tracks to check. The default is to check all tracks. You can tell the script to check only a subset of tracks like this: --tracks=2 ... or, --tracks=1-3 ... or, --tracks=1,3-5 ... etc. There are a couple of other changes: - When run on Unix/Linux, the script can read cue files with Windows line endings. Similarly, when run on Windows, it can read cue files with Unix line endings. This is useful for running the script on Linux with cue files generated by EAC. - The script searches for the wav file in the same directory as the cue file. You don't need to cd to the directory containing the cue & wav files first. I hope this helps. David |
|
|
|
Jul 14 2007, 02:26
Post
#70
|
|
|
Group: Members Posts: 382 Joined: 20-December 06 Member No.: 38861 |
Does your patched version fix the errorlevel return problem to the REACT2 batch script?
BTW, would the errorlevel be returned as normal and stored in %errorlevel%, or is it in %ErrLevel% as in the script? |
|
|
|
Jul 15 2007, 00:38
Post
#71
|
|
|
Group: Members Posts: 1540 Joined: 13-August 03 Member No.: 8353 |
I hope this helps. David Wow! Great work, thank you! I did a quick test with some old rips where I didn't set the offset correction and they can be verified! Next thing I'll try to verify a different pressing... Btw, looking at the perl script there seems to be a limit of 588 samples... why is that? |
|
|
|
Jul 15 2007, 01:31
Post
#72
|
|
|
Group: Members Posts: 86 Joined: 4-July 05 Member No.: 23121 |
Hello all,
I tried the updated script from David256. I can't get it to work. The CD was ripped by me in Linux (Wine -> EAC). I installed libwww-perl (Gentoo 32 bit, perl-5.8.8). Here's what happens: CODE ARCue.pl Dead\ Again.cue Checking AccurateRip database Track Ripping Status [Disc ID: 00009cfa-1402170a] 1 Track not present in database. [00000000] 2 Track not present in database. [00000000] 3 Track not present in database. [00000000] 4 Track not present in database. [00000000] 5 Track not present in database. [00000000] 6 Track not present in database. [00000000] 7 Track not present in database. [00000000] 8 Track not present in database. [00000000] 9 Track not present in database. [00000000] 10 Track not present in database. [3ef437c4] _______________________ Disc not present in AccurateRip database. Here's the AccurateRip log I got when I initially ripped the CD: CODE Track Ripping Status [Disc ID: 001d413e-88122d0a] 1 Accurately Ripped (confidence 6) [0c9d2efe] 2 Accurately Ripped (confidence 6) [81d7a414] 3 Accurately Ripped (confidence 6) [4494fac6] 4 Accurately Ripped (confidence 6) [2cdf6724] 5 Accurately Ripped (confidence 6) [110f3d17] 6 Accurately Ripped (confidence 6) [a4c2fc17] 7 Accurately Ripped (confidence 6) [f2f37d46] 8 Accurately Ripped (confidence 6) [5f72a931] 9 Accurately Ripped (confidence 6) [7b5ca255] 10 Accurately Ripped (confidence 5) [3ef437c4] _______________________ All Tracks Accurately Ripped. So the last track's crc is correctly calculated somehow it seems. The crc's of the other tracks aren't calculated (all 00000000 crc's pop up instantly). And here's my cue file: CODE REM DATE 2007 REM DISCID 88122D0A REM COMMENT "ExactAudioCopy v0.95b4" PERFORMER "Type O Negative" TITLE "Dead Again" FILE "01. Dead Again.wav" WAVE TRACK 01 AUDIO TITLE "Dead Again" PERFORMER "Type O Negative" ISRC DEA450702170 INDEX 01 00:00:00 FILE "02. Tripping A Blind Man.wav" WAVE TRACK 02 AUDIO TITLE "Tripping A Blind Man" PERFORMER "Type O Negative" ISRC DEA450702180 INDEX 01 00:00:00 FILE "03. The Profits Of Doom.wav" WAVE TRACK 03 AUDIO TITLE "The Profits Of Doom" PERFORMER "Type O Negative" ISRC DEA450702190 INDEX 01 00:00:00 FILE "04. September Sun.wav" WAVE TRACK 04 AUDIO TITLE "September Sun" PERFORMER "Type O Negative" ISRC DEA450702200 INDEX 01 00:00:00 FILE "05. Halloween In Heaven.wav" WAVE TRACK 05 AUDIO TITLE "Halloween In Heaven" PERFORMER "Type O Negative" ISRC DEA450702210 INDEX 01 00:00:00 FILE "06. These Three Things.wav" WAVE TRACK 06 AUDIO TITLE "These Three Things" PERFORMER "Type O Negative" ISRC DEA450702220 INDEX 01 00:00:00 FILE "07. She Burned Me Down.wav" WAVE TRACK 07 AUDIO TITLE "She Burned Me Down" PERFORMER "Type O Negative" ISRC DEA450702230 INDEX 01 00:00:00 FILE "08. Some Stupid Tomorrow.wav" WAVE TRACK 08 AUDIO TITLE "Some Stupid Tomorrow" PERFORMER "Type O Negative" ISRC DEA450702240 INDEX 01 00:00:00 FILE "09. An Ode To Locksmiths.wav" WAVE TRACK 09 AUDIO TITLE "An Ode To Locksmiths" PERFORMER "Type O Negative" ISRC DEA450702250 INDEX 01 00:00:00 FILE "10. Hail And Farewell To Britian.wav" WAVE TRACK 10 AUDIO TITLE "Hail And Farewell To Britian" PERFORMER "Type O Negative" ISRC DEA450702260 INDEX 01 00:00:00 Any idea what went wrong? MODERATION: Codebox. This post has been edited by greynol: Apr 9 2008, 06:19 |
|
|
|
Jul 15 2007, 02:16
Post
#73
|
|
|
Group: Members Posts: 1540 Joined: 13-August 03 Member No.: 8353 |
ARCue.pl only supports single WAV rips. You'll have to find a way to convert it somehow.
|
|
|
|
Jul 15 2007, 13:31
Post
#74
|
|
|
Group: Members Posts: 86 Joined: 4-July 05 Member No.: 23121 |
|
|
|
|
Jul 15 2007, 14:51
Post
#75
|
|
|
Group: Members Posts: 8 Joined: 14-January 07 Member No.: 39653 |
For the programming uninitiated, how do you go about installing Perl to use this script? Download and install ActivePerl and you're ready to go. For the even less initiated how do I continue? I've install perl to C:/Perl, i've placed ARCue.pl in C:/Perl. In windows XP sp2, when i go start/ run/ cmd what should I type then. The best i can do is to open the .pl file in notepad. |
|
|
|
![]() ![]() |
|
Lo-Fi Version | Time is now: 18th May 2013 - 19:24 |