APE (& CUE) to FLAC tracks

You need the following packages:

  • ffmpeg
  • flac
  • shntool
  • cuetools

The following steps will convert a whole ape (with cue) to multiple flac tracks: (assume the system locale is UTF-8, cue has GBK characters)

  1. Convert cue to UTF-8: >$ cat orig.cue|iconv -f GBK -t UTF8 >cdimage.cue
  2. Convert ape to wav: >$ ffmpeg -vn -i cdimage.ape cdimage.wav
  3. Split the wav and encode to flac: >$ shnsplit -f cdimage.cue -o flac -t %n.%t cdimage.wav
  4. Add tags: >$ cuetag cdimage.cue *.flac
This entry was posted in Linux. Bookmark the permalink.

Leave a comment