How To: Rip CDs with EAC and Lame in Linux

I think I’ve tried pretty much every piece of CD ripper software on Linux, and my considered weapon of choice is none of them. That’s not to say there aren’t good CD rippers for linux, there are some great ones – but they all either have problems or quirks or lack features I deem essential for my own personal ripping tastes, so one by one they get ruled out until there is literally nothing left. What I wanted to use all along was simply EAC (Exact Audio Copy) with the Lame encoder – just in Linux. So that’s exactly what I’m going to do…

Wine Setup

Wine is a piece of software which acts as a Microsoft Windows compatibility layer / API interpreter, that is, it contains a rewrite of the Windows APIs and interprets the calls made by Windows software (which a Linux system cannot natively understand) into a Linux-specific system calls (which of course Linux can work with). If this is all a bit more detail than you need then the take away is this: You can run most Windows applications on Linux through Wine.

Installing and configuring Wine on any modern Linux distribution is pretty straight-forward, assuming you’re using Ubuntu just snag it from the standard repositories through Synaptic or grab it through apt-get with:

sudo apt-get install wine

Next, you’ll want to configure it, so if the Wine configuration window isn’t launched as part of the install, then run the following command to bring up the configuration dialogue:


From here hit the Drives tab and then click on the [Autodetect…] button – what you see on your machine will obviously differ from what I see on this machine in terms of detected drives:

Wine EAC Drive Autodetect

With the drives detected (don’t worry about not seeing your CD drive for the moment) just click the [OK] button and we’re done for this bit.

A final note – Wine creates a hidden folder called .wine in your home folder, and this is where it puts its configuration files along with all installed Windows applications. If you can’t see this folder (i.e. you have Show Hidden Files disabled) and you’re using Gnome/Nautilus then you can toggle it through the View | Show Hidden Files menu option (Shortcut: Ctrl+H).

Getting and Installing Exact Audio Copy

EAC is freely available from here. Get yourself a version =D

Update: I found when re-installing EAC at a later point that 1.0 beta 1 version of EAC would fail to start with Wine, while 0.99 beta 5 would work perfectly. Find older versions here.

Once you’ve downloaded the installer .exe, right-click on it and select Properties from the pop-up menu, then go to the Permissions tab and check the Allow executing as a program checkbox followed by the [Close] button:

EAC Allow Executing As A Program

Because not every Windows program will work through Wine, and it’s often useful to see at what point it’s failing, it’s good practice to launch Windows apps through Wine via the command line by using:


This way, you can see any Wine or program output in the console, and see what’s going on. You’re free to just right-click on an exe and choose Open with Wine Windows Program Loader (and if you know a program works properly that’s probably the best option), but first time at least, run it through the command-line so you can see what (if anything) is happening when you launch the executable.

EAC itself is pretty easy to install, just click Next / Next / Finish etc and let it install to the default location (do pay attention to the part of the install process where it wants you to install the Ask toolbar though – you probably don’t want that rubbish). Skip ahead briefly at this point if you’d like to grab Lame in time to configure it during install, otherwise you can always configure it later on.

Once EAC’s installed, you can launch it from the terminal with the following (rather fugly) command:

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

Installing the Lame Encoder (Windows version)

Lame is IMHO the best mp3 encoder available, and is free, open-source software – but you probably don’t want to build it yourself. It’s a lot quicker and easier to grab a copy from somewhere like here. Once you’ve got the zip file, extract it and move the lame.exe and lame_enc.dll files into your Exact Audio Copy folder (wine ~/.wine/drive_c/Program\ Files/Exact\ Audio\ Copy/) then navigate to that folder, right click on lame.exe and enable the execution flag on it just like we did for the EAC installer earlier.

Two points to note are that you need to get the 32-bit version of Lame, as Wine won’t handle the 64-bit version, and that you shouldn’t get an alpha/testing version because it’ll occasionally crash during the encoding. Something like the 32-bit 3.98.4 version is perfect.

During install EAC will ask you where it can find lame, and will have a try at finding it itself – either allow it to or click the [Cancel] button to manually point it at the lame executable.

Using EAC

Configuration of EAC is a huge topic, and how far you want to go with it is entirely up to you (and entirely outside the scope of this article) – but I will say that when you’re ripping any audio, you’re going to rip it once, and listen to it a hundred times – so it makes sense to go for a relatively slow and accurate rip, and then encode the rip at a high bitrate using variable-bitrate encoding.

For my own Lame encoding, I use the following set of parameters to maximise the quality and bitrate of the final mp3 using variable-bitrate encoding:

-q 0 -V 0 --vbr-new %s %d

These need to be entered into the Compression options section of EAC (from the File menu), so my setup looks like this:

EAC Lame Compression Options

Wrap Up

With all this in place, you should be able to use EAC just like you might’ve done before in Windows, with the exact same functionality, and obtaining the exact same quality results. It’s worth noting that although once configured and working you can easily launch EAC through the Wine menu entry in Gnome or KDE or whatever you’re using, but if you launch it from the command line get to see the lame encoding output so you can see what kind of bitrate different parts of any given song are using.

Flattr this

21 thoughts on “How To: Rip CDs with EAC and Lame in Linux”

  1. Hi r3dux,
    Did you ever rip an audio cd to flac which was not, or incorrect, in the database? Did you try(!) to edit the track names in EAC running under wine? How did it feel? 8^)

    Harrie Baken

    1. Hi Harrie,

      I’ve changed track names which were incorrect in freedb and ripped the tracks to mp3 (in EAC through Wine) without any issues whatsoever – I don’t rip to flac as I (personally) feel it’s a massive waste of disk space, 320kbps VBR mp3s sound fine to me and are about an eighth of the size or there-abouts.

      I assume that it’s not working well for you – when you launch EAC through wine through the console what kind of errors are displayed in the console? Or if it just doesn’t work properly, you could try searching the HydrogenAudio forums – they usually have some useful commentary on these sorts of issues.


      1. Years I’ve looked for in linux equivalent for EAC(Easy Audio Converter)to split wav files into individual named tracks with cue files, without having to use wine.
        Now I have used flacon, found at

        get it:
        sudo add-apt-repository ppa:flacon
        sudo apt-get update
        sudo apt-get install flacon

        I’m using Xubuntu 12.04. Flacon has all the tools for different audio formats.

  2. Thanks for this guide. I am using crunchbang linux rather than ubuntu, but i could follow all the instructions except ticking the “allow executing file as program” flag. instead i used chmod +x on the exe file.

    initially thought this had worked. However, when I run EAC it seems to crash instantly – I cannot get the cursor to appear in the window and the the window just takes on the physical appearance of anything that ventures over it place on the screen.

    terminal output is…

    Any idea what my problem is?

  3. You may be able to tell from the above that I am quite inexperienced with linux, and am not totally sure what I’m doing. Generally my experiences with it are very positive and EAC is the only thing that makes me want to switch back to windows.

    Any help with this issue would be much appreciated.

    1. Hi ETL, my thoughts are going along the lines of:

      – Your chmod +x is fine, I just did it the graphical way for simplicity

      – Are you sure you’re using EAC 0.99 beta 5 and not the latest version of EAC? I tried the latest version maybe a month or six weeks ago and EAC would crash on startup much like yours is – only older versions would work.

      – Are you using the most recent version of WINE available? My version (where EAC works) is 1.2.2. If the precompiled binary for crashbang isn’t as up-to-date, then maybe try to find a newer binary somewhere or build Wine yourself?

      – Have you ran winecfg and are sure that wine can see your CD drive? If it can’t (and it’s moaning about not being able to open some SCSI drivemap registry key in your pastebin ouput) then that could be a part of it.

      – I see that some people have managed to get EAC working by uninstalling and reinstalling it… very odd, but maybe worth a go.

      – Maybe try this?

      Hope this helps.

  4. Aha, a breakthrough.

    I hadn’t configured the CD drive so I ran winecfg and set my E drive as CDROM. I didn’t understand the drive label and serial number section (manually assign or autodetect) so I just left that alone.

    Now if I start EAC it opens properly and I can interact with it – a big step forward. (Perhaps it’s worth emphasising the need to do this in the above guide – maybe I accidentally missed out the relevant section but I think it just says “don’t worry about not seeing your CD drive for the moment” and then doesn’t come back to the topic).

    However, all is still not well – if I run the EAC setup wizard it doesn’t seem to recognise my CD drive – do you think this is because I failed to fill out the drive label settings I mentioned above?

    Anyhow, thanks for the detailed response.

    1. You’re good to go – just opt not to do the wizard part and manually configure EAC – as far as I recall the wizard would crash on me also, forcing me to kill Wine until I opted not to set things up via wizard and then all works manually.

      I didn’t have to fill out any drive label settings or anything for mine and it runs just fine – I just ran winecfg, went to the drives tab and hit autodetect then ok to close winecfg.

      Happy ripping =D

  5. Wish it was that simple!

    No matter what I do I keep getting messages like “Drive does not contain a music CD”, “no audio CD in drive”, “EAC couldn’t find a CD in the drive to be tested”, etc. There is definitely a CD in the drive. Hmm…

    1. That’s pretty odd… Have you maybe tried running EAC through VirtualBox or something? It might be able to take that negotiation about what’s in the drive out of the loop…

      Or, uninstall EAC, reinstall it, don’t run any wizards and have a go just getting something to rip without using AccuRip or anything fancy.

      Also, maybe try mounting the audio CD to a state where you can play it normally through linux, re-run winecfg | autodetect and hope it picks up something useful which’ll stop EAC moaning?

      Or, there’s always ruby-ripper, or Ubuntu ;)

    2. Hi, I know its an old post but I thought this may help someone.

      I am using puppy linux &, unlike ubuntu, puppy linux does NOT automatically mount a CD/DVD. If i use a windows program under wine I need to mount my DVD/CD before a windows program will “see” it.

      However ubuntu will mount a CD/DVD soon after it finds one in the drive & will open a file manager (if it finds a data disc), an audio player (if it finds an audio cd) or a DVD movie player (if it finds a DVD).

      Perhaps crunchbang linux does not automount.

  6. I’ve just re-installed EAC and had problems with the command line options.
    The following worked for me

    EAC: Exact Audio Copy V1.0 beta 3 (including CDRDAO and Flac packages) last changed on 22.09.11
    Lame: LAME 64bits version 3.99.5 (

    Additional Command Line Options:

    -q 0 -V 0 --vbr-new %hascover%--picture="%coverfile%"%hascover% %source% -o %dest%
    1. Cheers! I need to install EAC myself so will give your options a shot.

      Have just been using RubyRipper of late – it works just fine apart from it’s stupidly slow to get going! (Analysing TOC…. 10 minutes later still Analysing TOC….)

  7. The previous command line was mixed up – and had the picture options for FLAC not LAME

    This is the new command line for EAC/LAME
    -q 0 -V 0 –vbr-new %hascover%–ti %coverfile% %hascover% %source% -o %dest%

    Apologies :/

    1. Another thing was that my CD drive was not detected. Using the comments helped me out again:

      “You can work around this by setting “EAC options”>“Interface”>“Use of SCSI interface” from “Native Win32 interface for XP/Vista/Win 7” to “Installed external ASPI interface”. Ripping seems to work just as well for me.”

      as described in the comments here:

Leave a Reply

Your email address will not be published.

This site uses Akismet to reduce spam. Learn how your comment data is processed.