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 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:
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:
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.
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:
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.