Converting a APE+CUE file to separate FLAC files
Submitted by Bram Schoenmakers on 9 October, 2008 - 11:50.
APE files are, besides lossless audio files, also quite annoying; they're barely supported on non-Windows platforms. There's a way to convert them to FLAC. It took me some time because I had to combine several pieces from the internet in order to convert a single *.ape file to multiple per-track *.flac files.
There are tools for Linux to encode and decode *.ape files. On the internet it is referred as mac-port, but everyone links to a SourceForge page which is dead by now. But I found a tarball from the Slackware servers which does its job. The tarball is also included with this article.
Here are some easy steps to follow to convert the file to multiple FLAC files:
- To start off, make sure you have the cuetools and shntool packages installed. These are required to read the *.cue file and to split the file accordingly. On Gentoo, simply invoke
emerge cuetools shntool - Install the mac package to handle *.ape files:
tar xzf mac-3.99-u4-b5.tar.gz
./configure --prefix=/usr/local
make
su -c "make install"
su -c "ldconfig" - Now we've all tools in place, we can finally start splitting:
cuebreakpoints sample.cue | shnsplit -o flac sample.ape - You can also tag the FLAC files according to the metadata supplied in the *.cue file. There's a script in the cuetools package (under extras/cuetags.sh), but it couldn't handle spaces properly. So instead of running this script I manually entered the track titles into the FLAC files. Not a big deal, but maybe you have more luck.
Credits go to this site for most of the stuff mentioned here.
thank You
Thank You for sharing this knowledge! Apreciate this!