diyAudio logo

LINUX Audio DAE


(This is kind of an FAQ, so I'm trying to document it here. For the moment it's a rough draft - please be patient!).

When we think about using a computer as an audio source, the first step of course is getting the music to play. Quite likely, to date most of our music is stored on audio CDs (CDDA). Thus we need a mean to extract the audio data from the CD and store it in a suitable file. This process is named "Digital Audio Extraction", or "DAE" for short.

If we are after the highest possible audio quality, obviously the first thing that we care about is to preserve our audio stream from errors and corruptions. That is, with regard to DAE we want to make sure that the audio data is not altered/corrupted in any way during the extraction so that what we get at the end is an absolutely exact replica of the data originally stored on our CD.

Problem is, audio CDs does NOT have a file system on them. And they have a very limited amount of tracking/positioning information too. This renders Digital Audio Extraction an absolutely NON trivial and "insecure" (error-prone) task. Extracting audio from the very same CD more than once using different drives (sometimes even on the same one) and/or with different extraction software (and/or methods) may lead to different extracted data!

That's why tricky programs such as the well-known [Exact Audio Copy] (EAC) have been developed. Unfortunately EAC is a closed-source, proprietary program developed for the MS Windows OS.

Many people ask how to do "secure DAE" on Linux and/or whether they can use EAC on Linux. These notes are being written to answer these questions.


DAE on Linux: native tools


Digital Audio Extraction (DAE) AKA "CD ripping" can be done with several native Linux tools, among which "cdparanoia", "cd-paranoia" (a libcdio port of cdparanoia), "cdda2wav", "icedax", etc, as well as numerous GUI and TUI interfaces (most of which are either using the aforementioned CLI tools or the "libparanoia" or "libcdio" libraries as back-ends to do the real work).

The applications using the libparanoia backend library (or of course cdparanoia itself) should be able to do DAE as accurately as EAC does (that is "bit-perfect", error-free extraction of CD audio data).

In the past there have been claims and reports that, under some circumstances, DAE performed using cdparanoia (or libparanoia-based apps) could be less accurate than DAE performed with EAC (1).

This was likely due to a long-standing limitation/bug of cdparanoia which made it unable "to correctly handle caches on a substantial fraction of modern drives, which resulted in skipping getting through verification" (https://www.xiph.org/paranoia/bugs.html).

The latest version of cdparanoia and its underlying libparanoia library (that is versions >= 10.2 final) have eventually solved this problem. Thus any software (GUI, TUI, whatever) which use the new "paranoia code" as its DAE back-end will lead to perfect DAE (2).

To achieve "secure", perfect DAE there is really no need to use EAC. Neverteless, if you still like to have EAC running on Linux, you can. Here follows how.


Running Exact Audio Copy (EAC) on Linux


To date there are no native Linux versions of EAC (3). Nevertheless, the unmodified windows version of EAC can be run under Linux using [WINE].

Installing EAC on Linux using wine is as easy as downloading the windows installer from the EAC site and run it through wine.

With most modern Linux distributions, you should end up with either an EAC icon on the Desktop, an EAC entry somewhere in the menu or both.

But there may be a few caveats. To avoid possible troubles, follow these directions.

First of all, before starting the EAC installer, it is a good idea to configure wine using winecfg and/or wineconf (4)(5).

Configuring WINE: Part I


Open your terminal and type in:

winecfg

Go to the "Drives" tab and press the "Autodetect..." button.
It should scan for drives, and find a handful of them. Find /media/cdrom drives, if you have more than one then apply this step to all of them.
Click on the drive letter ( in my case E: ) and press the "Show Advanced" button, and then select the "Type" of the drive to be "CD-ROM", apply
to every drive that is a CD drive, and press "OK".

Installing EAC


Download the installer for Exact Audio Copy.

Important: at this point make sure that there are no CD or DVD of any kind in any drive!

If you are using a GUI, double-click eac-x.y.exe on the downloaded file. If you are at the command line, run

wine eac-x.y.exe

Either way the installer should start. Let it do the install like you would do it in windows. Do NOT let it start EAC now.

Configuring WINE: Part II


Go to your terminal and type:

winecfg

in the Applications tab, press the "Add Applcation" button and browse to EAC.exe, and click on it and select a NT operating system from the Windows select box (those being NT/2000/XP), and press "OK" (6).
As it launches cancel the wizard, and press F9, and under the "Interface" tab, select "Native Win32 Interface for NT/2000/XP". Press "OK", and restart the app.

Now put an audio CD in your drive, and hopefully all will go well.

You should be able to launch EAC from the icon on your desktop and/or from its entry in the "start" menu (if your distribution setup does that). Anyway, you can also start it from the command line by typing:

wine ~/.wine/drive_c/Program\ Files/Exact\ Audio\ Copy/EAC.exe

in your favorite terminal.

Should you have troubles, please refer to [quandar's thread on Ubuntuforum] from which I took most of the above instruction.


References:


{1} https://www.xiph.org/paranoia

{2} https://www.xiph.org/paranoia/faq.html

{3} https://www.xiph.org/paranoia/news.html

{4} https://www.exactaudiocopy.de

{5} https://www.winehq.org

{6} https://ubuntuforums.org/showthread.php?t=142784



Notes:


(1) on the other end I have experienced a few CD/drive combinations with which EAC was failing to do any DAE at all (keep trying to re-read and fix errors forever), while cdparanoia completed the task successfully and without any apparent problem on the extracted data. Should you decide to use EAC routinely, don't forget to keep also cdparanoia at hand, just in case. And perhaps the other way around, too. It's always a good thing to have more than one option available...

(2) Caveat: until all distributions will be updated to the new cdparanoia/libparanoia and the old ones will be completely ruled out, if you use some front-end instead of cdparanoia itself there may be cases where you think you're using the new (fixed) cdparanoia while in fact you are still using some older/broken version. This is because some programs may have libparanoia "built-in" (that is, statically linked to the binary). The version of libparanoia used to build the software may be different from the one installed on the system and it may well be an older and/or broken one.
Even in the case of a program which use the cdparanoia binary externally, for some reason it may provide and use its own copy of cdparanoia. Which again of course can be some older and/or broken one. Thus, before using any front-end, check carefully and make sure that it's actually using the "right" version of the paranoia code.

(3) Being EAC a proprietary, closed source application, the only one who may made a Linux port is its original author. Try to ask him: though I doubt it, if there are enough requests perhaps he may consider doing that...

(4) winecfg is the original wine setup program. It is a wine (windows) binary which is run through wine itself. "wineconf" is a new native Linux app which may or may not be available in your distribution.

(5) If you want to make WINE look better without msstyles read this guide: https://www.ubuntuforums.org/showthread.php?t=142741

(6) I took this advice from [quandar's thread on Ubuntuforum] and included it here, though I'm not sure whether that is really needed. At least to me (EAC 0.99pb4 and wine 1.0 on Debian GNU/Linux) it seems to work well also selecting win 2k or XP.