(If you are crazy about the quality like I am, use neroAacEnc -q .75 -if “$j” -of “$i” which is close to mp3’s 320 kbps quality.)

You will need mac compiled and installed as described in [intlink id=”convert-ape-flac-wavpack-ogg-mp3-encoded-files-under-linux” type=”post”]one of my previous posts[/intlink].

Update: mac is available through yum

Shell

1

sudo yum-yinstall mac

Install some necessary stuff.

Shell

1

sudo yum-yinstall cuetools shntool easytag

Allthe rest is pretty simple (if someone asks me I would upload a script I use). The only drawback of this approach is that the id3 tags cannot be written automatically (it seems there is still no way to do, looking in Google at the present moment does not bring any sane result, cuetag works only with flac, ogg and mp3 files, but I am sure it can be overridden).

Convert a single .ape file to a bunch of .wav-s.

Shell

1

mac[input_file.ape]temfile.wav-d

The above will create a bunch of split-track01.wav … split-trackNN.wav files. Now encode to m4a: