User Tools

Site Tools


linux:split_cue_files

How to split big AUDIO files based on cue

17 March 2009
Updated: 09 September 2015

If the big file is a mp3 one, you need mp3splt utility. ( RPM)

mp3splt -c file.cue bigfile.mp3

For FLAC|wav you'll need shnsplit from shntool package, and cuebreakpoints from cuetools package.

cuebreakpoints <file.cue> | shnsplit -o flac <bigfile.flac>

Note: for *.ape files you'll need to install an additional package for shnsplit called mac.

Because the resulted files don't have tag information, you can use cuetag to add this info:

cuetag <file.cue> split-track*.flac

Cuetag works with flac, ogg and mp3 files.

Error: shnsplit: error: m:ss.ff format can only be used with CD-quality files

To fix this error, several steps are needed:

Replace the current shntool package

Remove the current shntool package and install one from these sources . You have to compile it, but it´s not a biggie, and it will treat nice that error (making it a warning, beside some math).

Add a dummy last record

This will get rid of the last file conversion error.

So, open the cue file with a text editor and add a dummy track by the end with the INDEX set to the total time of the flac file (you have to use a player or similar to get this).

Example:

....
TITLE "Sad Lover"
INDEX 01 30:35:62
TRACK 10 AUDIO
TITLE "Rock Out"
INDEX 01 34:04:07
TRACK 11 AUDIO
TITLE "Dummy"
INDEX 01 39:47:00

Then run again the command

This time with a little twist:

cuebreakpoints input.cue | sed s/$/0/ | shnsplit -o flac input.flac

linux/split_cue_files.txt · Last modified: 2015/09/10 15:02 by admin