Skip to main content

Notice

Please note that most of the software linked on this forum is likely to be safe to use. If you are unsure, feel free to ask in the relevant topics, or send a private message to an administrator or moderator. To help curb the problems of false positives, or in the event that you do find actual malware, you can contribute through the article linked here.
Topic: bitperfect rips... under Linux (Read 4198 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

bitperfect rips... under Linux

I'm completely stumped by this.

This weekend I've been doing some experimentation with EAC and cdparanoia. The short story is that ripping with EAC on Windows appears to produce consistent results across different CD drives. Ripping with cdparanoia on Linux produces consistent results if you stick to the same CD drive, but each CD drive seems to produce a different rip, none of which agree with EAC (at least with my setup).

The full story:
* On a Windows XP box I used EAC to rip a CD to wav format. This box has two CD drives - a cheap LiteOn brand CD-RW and a recent model Sony DVD-RW. I ripped the CD twice using each drive. Both rips produced identical wav files (I took md5sums and compared them). The CD is free from scratches/blemishes, has hardly ever been used and EAC reports the track quality to be 99.9%.

* On a Linux Box (Ubuntu Breezy, AMD64) I used grip to rip the same CD. This box also has two CD drives - a Sony CDRW and a Pioneer DVR-110d. I ripped the CD multiple times using each drive. Each rip from the same CD-drive produced the same result regardless of the paramaters I passed to cdparanoia, and even ripping with cdda2wav produced the same files (I compared them with the unix diff utility). However files ripped with the Sony drive were different to those from ripped with the Pioneer drive and both of these files were different from the EAC produced files. Note that the different WAV files of each track produced by all rips all had the same size (in bytes) and I used a visual binary diff program to compare the files... they all had identical headers, but the content was quite different (almost every 2nd byte was different, not just a few bits here and there).

* On another Linux Box (Debian stable, hasn't been updated since 2003) I ripped the same CD using cdparanoia (eg cdparanoia -Bvz -d /dev/cdrom 1 track_01.wav for each track). The computer only has one CD drive (a samsung CDROM) and multiple rips produced consistent results, but the rip was again different to all others. I tried this since this computer uses ide-scsi, unlike the AMD64 box.

I tried a few other things too:
* I came across this bug report for cdparanoia. I went to the trouble of downloading RedHat's cdparanoia (I had to apply their patches manually and recompile it). Using this version of cdparanoia on the AMD64 box made no difference at all however.
* I tried to setup EAC under wine on the AMD64 box (this involves setting up a 32-bit chroot). I managed to get it working with the Pioneer drive (it refused to see the Sony drive no matter what I did). Rips produced however were identical to the cdparanoia rips produced by the Pioneer drive.
* I changed both drives on the AMD64 box to use "ide-scsi". This seemed to make no difference but I'm not entirely sure I did this correctly.

Does anybody have any idea what I'm doing wrong? I believe that EAC is producing the correct bitperfect rip here, although I would have to install windows & EAC on my AMD64 box to see if it still produces the same results under this setup (a big ask since I don't own a spare copy of windows). Note that even with a high-quality sound setup I can't actually hear a difference between any of the rips, but I'm still chasing bitperfection!

Any suggestions appreciated. I've wasted quite a bit of time to try and get bigperfect rips under Linux!

PS: I have a screen capture showing a visual binary difference of the start of a sample wav file from each rip... is it possible to post images here? (this is my first post). The image is quite interesting... although there are many differences, it almost looks like the difference between the wav files is a "linear" gain type factor (although the gain appears to waiver slightly, I'm not sure).

bitperfect rips... under Linux

Reply #1
Your EAC rips are offset corrected, and you cdparanoia rips are not.
Check offset settings in both programs.

In  cdparanoia, you need this option:
Code: [Select]
  -O --sample-offset <n>          : Add <n> samples to the offset when
                                   reading data.  May be negative.

bitperfect rips... under Linux

Reply #2
Quote
Your EAC rips are offset corrected, and you cdparanoia rips are not. Check offset settings in both programs.

Thanks - I was unaware of this. Does anybody know of a Linux tool to determine the read sample offset for a drive? Maybe I can work it out myself by looking at the binary diff of the files?

bitperfect rips... under Linux

Reply #3
You could work it out from using EAC's Compare WAV facility.

bitperfect rips... under Linux

Reply #4
Quote
You could work it out from using EAC's Compare WAV facility.

Thanks! Using EAC under wine I got a value of 36 repeat samples for my DVR-110D. I repeated the rip using this offset and now I get identical files to EAC:

Code: [Select]
cdparanoia -Bvz --sample-offset 36 -d /dev/cdrom 3 track_03.wav
cdparanoia III release 9.8 (March 23, 2001)
(C) 2001 Monty <monty@xiph.org> and Xiphophorus

Report bugs to paranoia@xiph.org
http://www.xiph.org/paranoia/

Checking /dev/cdrom for cdrom...
       Testing /dev/cdrom for cooked ioctl() interface
               CDROM sensed: ATAPI compatible PIONEER DVD-RW DVR-110D

Verifying drive can read CDDA...
       Expected command set reads OK.

Table of contents (audio tracks only):
track        length               begin        copy pre ch
===========================================================
 1.    57380 [12:45.05]       33 [00:00.33]    no   no  2
 2.    47175 [10:29.00]    57413 [12:45.38]    no   no  2
 3.    32450 [07:12.50]   104588 [23:14.38]    no   no  2
 4.    54905 [12:12.05]   137038 [30:27.13]    no   no  2
TOTAL  191910 [42:38.60]    (audio only)

Ripping from sector  104588 (track  3 [0:00.00])
         to sector  137037 (track  3 [7:12.49])

outputting to track03.track_03.wav

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

Done.

$ diff track03.track_03.wav ../Desktop/My\ albums/Track03.wav
$
(where Track03.wav was from EAC). If there were differences, diff would have said so.

BTW: according to this list the correct offset of my Pioneer 110D is "+48". Yet I seemingly got "+36". Was my EAC output also wrong? (EAC on that windows box was never calibrated, but it did give consistent results between two different CD drives).

bitperfect rips... under Linux

Reply #5
Actually, it is entirely possible that the drive offsets on the two drives in the windows box were co-incidently both +12 (all liteOn CDROMS on that list and many Sony DVD-RWs have that value). I don't have access to the box to check the exact drive models at the moment but I can follow this up.

bitperfect rips... under Linux

Reply #6
you might want to check out RubyRipper.  it is developed here, by a HA member.  it can use cdda2wav or cdparanoia, and basically functions like EAC's "test & copy" setting, ripping each track twice and then checking the crc values.  if they don't match, it will continue ripping the track until a matching crc is achieved.
a windows-free, linux user since 1/31/06.