vod:pod:

flickr:

IMG_1605 IMG_1604

IMG_1601 IMG_1598

IMG_1597 IMG_1596

filtunes:

links:

  • Webmail
  • My Space
  • Blog Home
  • Log in
  • Register

archive:

categories:

search blog:

other:

Talk about a miserable failure.

June 3, 2006

AAC CD Ripping in Linux

by .

I think the two best formats out there today for recording lossy audio are Vorbis and AAC. Vorbis has made some huge quality strides lately with the AoTuv tunings and Apple and Nero have both consistently turned out great quality encoders. When it comes down to it, however, AAC is supported by my favorite portable audio player, the iPod, so that’s what I use. When I used Windows it was dead easy to rip my CDs to AAC with iTunes and EAC (with iTunesEncode as the glue), but I don’t have that luxury now that I’m using Linux. Lucky for us though, Nero has been kind enough to release their excellent encoder as a stand alone binary, for free. Of course, they don’t have a Linux compile yet, but with a little help from Wine, we can get everything working.

First, your going to have to get a copy of the Nero encoder binaries. You can grab them here. You’ll find a version of the encoder with SSE support and one without. If one dies horribly when you run it, use the other one.

I also like my music all at the same volume. For that I like to use AacGain. You can find a Linux universal binary here. If you don’t want your music ReplayGained, you can just skip that. You’re also going to have to have Wine installed. I use Kubuntu, so Wine is installed by default.

Since we’re running three (two if you skip the AacGain) programs, I like to keep that logic in a separate script, just so that the command that I give to my audio ripper isn’t a mile long. Here’s the script I use. Just remove the last line if you’re not using AacGain.

#!/bin/bash
wine neroAacEnc.exe -q .425 -if "$1" -of "$2"
wine neroAacTag.exe "Z:/$2" -meta:artist="$3" -meta:album="$4" -meta:title="$5" -meta:track="$6" -meta:year="$7"
aacgain -r -c "$2"

Save that anywhere you like, you’ll need to refer to it from your audio ripper. That “Z:/” there is what Wine has mapped my root directory to in the Windows world. I don’t need to use it except when calling neroAacTag, for some reason. Your mileage may vary.

The only other thing left to do is set up the encoder in your audio ripper, which is going to be the script you just made. I use KAudioCreator. Here’s how that looks:

/home/phil/bin/aacEncode %f %o %{albumartist} %{albumtitle} %{title} %{number} %{year}

I haven’t been using Linux long, so this may not be the best way to do this. If you know a better way, let me know.