Split MonkeyAudio (.ape + .cue + .log) of whole audio CD into MP3 of individual tracks

31,432

Solution 1

I use CUE Splitter, works like a charm, Windows only.

Solution 2

You can use CUETools, to do it — load up the .cue file or .ape file with the other one in the same directory, select tracks for cue style and mp3 output and it'll automate the whole process.

Solution 3

shnsplit on Ubuntu 14.04

sudo add-apt-repository -y ppa:flacon
sudo apt-get update
sudo apt-get install -y flacon
shntool split -f *.cue -o flac -t '%n - %p - %t' *.ape

flacon is a GUI for shntool, but it comes with all the codecs it needs... otherwise I got the error:

shnsplit: warning: failed to read data from input file using format: [ape]
shnsplit:          + you may not have permission to read file: [example.ape]
shnsplit:          + arguments may be incorrect for decoder: [mac]
shnsplit:          + verify that the decoder is installed and in your PATH
shnsplit:          + this file may be unsupported, truncated or corrupt
shnsplit: error: cannot continue due to error(s) shown above

In particular, the flacon PPA furnishes the mac package (Monkey's Audio Console), on which flacon depends, which has the mac CLI tool, which seems to be the main missing ingredient.

Solution 4

On Linux, you could use mac to dump the .ape into .wav, then bchunk to split the big .wav file into tracks using information from the .cue file.

.wav to .mp3 can be done with lame/ffmpeg.

I'm pretty sure there must be shellscripts that automate the whole process (including the population of ID3 tags), but finding them is a trivial google task, since now you know a lot of keywords.

As you could see, I assumed Linux, if you want to do it using another operating systems, consider to add the os name as tag, to get more precise answers.

Solution 5

Here's the script I use (its dependences are in the comments):

#!/bin/bash
# ll-cue2mp3-320.bash
# cue and audio file basename must be the same. Usage:
# ll-cue2mp3-320.bash `basename *cue .cue`
# It makes mp3 folder in the dir containing rip, put splits
# there in the format 'trackNumber - trackTitle', and convert splits
# to mp3s. Tags are not transfered to the newly born mp3s.
#
# You can specify the this format with a second arg. Default value
# is '%n - %t'. Other options (them are lltag options):
#
# %a means ARTIST 
# %t means TITLE 
# %A means ALBUM 
# %n means NUMBER 
# %g means GENRE 
# %d means DATE 
# %c means COMMENT 
# %i means that the text has to be ignored 
# %F means the original basename of the file 
# %E means the original extension of the file 
# %P means the original path of the file 
#
# Dependences: lltag, lame, cuetools, shntool, flac, wavpack,
# parallel, ape support (if you're going to split ape files)

# Don't forget to put input args in quotes, e.g:
# ll-cue2mp3-320 "name of the cue file" "%a - %t"
#
# TODO:
# convert tags to utf-8 - if they are not


# parsing 1st arg:
fl="$1"
if [ -e "$fl".flac ]; then
    ex="flac"
elif [ -e "$fl".ape ]; then
    ex="ape"
else [ -e "$fl".wv ]
    ex="wv"
fi


# parsing 2nd arg:
frmt="$2"
frmt=${2:-"%n - %t"}


# splitting the dump:
mkdir mp3

cuebreakpoints "$fl".cue | shnsplit -o flac -d mp3 -a split "$fl".$ex && \
    cuetag "$fl".cue mp3/split*\.flac 

cd mp3


# renaming splits basing on tags:
for i in `ls`; do
    lltag --yes --no-tagging --rename "$frmt" $i
done


# converting splits to mp3:
parallel -j+0 flac -d {} ::: *\.flac
parallel -j+0 lame --cbr -b 320 -q 0 {} ::: *\.wav

find . -name "*.flac" | parallel -j+0 rm
find . -name "*.wav" | parallel -j+0 rm

rename 's/\.wav//' *


# done!
Share:
31,432
viam0Zah
Author by

viam0Zah

Updated on September 17, 2022

Comments

  • viam0Zah
    viam0Zah over 1 year

    I have a whole audio CD ripped to single audio file in MonkeyAudio (.ape) format, together with .cue and .log files (using Exact Audio Copy, from comment in .cue file).

    How would one split this one large audio file into MP3 files of individual tracks, best if with correct ID3 information from .cue file?

  • Canadian Luke
    Canadian Luke almost 11 years
    The OP is asking about splitting the .CUE file
  • viam0Zah
    viam0Zah over 9 years
    That was the program I used, though cuesplitter would also work.
  • DavidPostill
    DavidPostill over 7 years
    Please read How do I recommend software for some tips as to how you should go about recommending software. You should provide at least a link, some additional information about the software itself, and how it can be used to solve the problem in the question.
  • Puck
    Puck about 7 years
    Only easy to use open source method. Since windows have bash now, also works like a charm on windows.