Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

I've got a full album flac, and a cue file for it. How can I split this into a flac per track. I'm a KDE user, so I would prefer a KDE/QT way, I would like to see command line and other gui answer's as well, but they are not my preferred method.

share|improve this question

8 Answers 8

Shnsplit can read a cue file directly, which also means it can access the other data from the cue file (not just the breakpoints) and generate nicer filenames than 'split-*.flac':

shnsplit -f file.cue -t %n-%t -o flac file.flac

Granted, this makes it more difficult to use cuetag.sh if the original flac file is in the same directory.

share|improve this answer
    
The most simple solution. –  Paulo Fidalgo Jul 24 '13 at 9:32
1  
Fellow debian users: sudo apt-get install cuetools shntool –  jwbensley May 3 at 12:47
    
You probably also want to tag the files with cuetag file.cue [0-9]*.flac –  August Karlstrom Aug 28 at 14:41

I only know a CLI way. You will need cuetools and shntool.

cuebreakpoints file.cue | shnsplit -o flac file.flac
cuetag.sh file.cue split-*.flac
share|improve this answer
2  
Thanks for this Kambus. I've been using cuebreakpoints file.cue | shnsplit -o flac file.flac for a long time. The 2nd bit is going to help a lot! –  boehj Apr 12 '11 at 6:44
    
cuetag seems to break on filenames containing spaces but after removing them it worked. –  scai Nov 20 '13 at 17:40
up vote 2 down vote accepted

If you have cue set to use k3b in in the filetype settings, k3b will automatically split the file if you open the cue file, and allow you to re-rip.

share|improve this answer

Flacon will do that for you,l flawlessly:

http://flacon.github.io/

share|improve this answer
1  
Welcome to Unix & Linux Stack Exchange! Whilst this may theoretically answer the question, it would be preferable to include the essential parts of the answer here, and provide the link for reference. –  slm Nov 3 '13 at 15:55

if high-quality files are being used, shnsplit is happily erroring out with

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

fortunately the flac binary supports --skip=mm:ss.ss and --until=mm:ss.ss so a script can use cuebreakpoints like this:

[..]
time[0]="00:00.00"
c=1
for ts in $(cuebreakpoints "${cue_file}"); do
    time[${c}]=${ts}
    c=$((c+1))
done
time[${c}]='-0'
for ((i=0;i<$((${#time[@]}-1));i++)); do
    trackno=$(($i+1))
    TRACKNUMBER="$(printf %02d ${trackno})"
    title="$(cueprint --track-number ${trackno} -t '%t' "${cue_file}")"
    flac --silent --exhaustive-model-search --skip=${time[$i]} --until=${time[$(($i+1))]} --tag=ARTIST="${ARTIST}" --tag=ALBUM="${ALBUM}" --tag=DATE="${DATE}" --tag=TITLE="${title}" --tag=TRACKNUMBER="${TRACKNUMBER}" "${aud_file}" --output-name="${TRACKNUMBER}-${title}.flac"
done
share|improve this answer
    
Thanks for this! –  imiric Mar 7 at 14:16

To split FLAC files with CUE, it will be better to use a FLAC CUE Splitter. I know a quite good FLAC CUE Splitter and a detailed guide to split FLAC CUE files here: http://www.bigasoft.com/articles/how-to-split-flac-cue-files.html

This software can fast load numerous FLAC files and split them to multiple tracks based on associated .cue file in batch.

share|improve this answer

There is an easy way to split CUE associated FLAC here:http://faasoft.com/articles/split-mkv-by-chapter.html

share|improve this answer
    
Note that the software costs $25, but there you have it. –  samiam Mar 6 at 4:12

You may also refer to the following step by step guide on how to split CUE associated FLAC, MP3, APE, WAV, WMA, TAK, MPC, TTA, M4B, M4A, AIFF and etc album, podcast or compilation into separate audio tracks at http://www.idealshare.net/audio-converter/cue-splitter-for-mac-windows.html

share|improve this answer
    
It is better to provide the steps here, and use the link as a reference for further details. That way your answer does not loose all of it value when the link becomes invalid. –  Anthon Oct 25 '13 at 7:00

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.