And so, a little research lead me to this interesting command line:
~$ cuebreakpoints "filename.cue" | shntool split -o flac "filename.flac"
To work this little magic, you'll first need a few tiny packages installed. So, install cuetools & shntool like so:
~$ sudo apt-get install cuetools shntool
After which (assuming the cue/flac files are in your current working directory) you run the above mentioned command line to split the file into individual tracks named 001.flac, 002.flac, etc...
A little explanation is probably in order. I doubt I'd remember what the command means a few months from now. The first part of the command takes the cue sheet, and outputs where a track ends and the next begins:
cuebreakpoints "filename.cue"
Next, we redirect the output to shntool for splitting and naming:
shntool split -o flac "filename.flac"
Here, we're telling shntool that we want to split the flac file into individual files. Using -o flac means we want the output format to be in flac as well. There's other formats that could be specified including wave (just use -o wav instead). Read the manual for more info.
Note: You need to use shntool split -n '' -o flac "filename.flac" instead if you happen to have an older version of shntool.
Put everything together, and we have a fairly simple command to split cue/flac files into individual audio tracks. Enjoy! :-)
Related posts:
Dealing with uif files
Converting cue/bin to ISO
Converting CCD images to ISO
this is a simplified command, which accomplishes the same thing:
ReplyDeleteshntool split -f filename.cue -o flac filename.flac
where 'filename' is replaced with the name of your cue and flac files (obviously...)
Thanks for pointing that out :-D
ReplyDeleteGreat stuff, glad I found it. Now if people would just stop using Monkey Audio and get flac...
ReplyDeletea new version of shntool is out, thus you should use this command without -n '', otherwise you'll yet an error.
ReplyDelete:~$ cuebreakpoints "filename.cue" | shntool split -o flac "filename.flac"
Thanks for pointing it out, Andrew.
ReplyDeleteit's a complex and useful tool, and i'm resurrecting an old post, a really old one, but, i found this blog cause i forgot how to use it again. since i'll likely need to remember, and end up here again, and others will come too...
ReplyDeleteshntool split -f "cuesheet.cue" -o filetype "filename.filetype" -t %p_%a_%n_%t
works for me, and names my files properly, automatically.
This is good. But also you can use k3b to load the cue sheet & then convert to flac.
ReplyDelete(Basically just splitting it).
All the tag and file name are used from the cue sheet.
If you have .cue linked to k3b it's a two click operation.
ie click .cue file
then click convert (From within k3b).
No disk burning is required obviously.
@Oz: Thanks. I never used K3B before. This is nice to know :-)
ReplyDeleteUse Flacon instead, has gui, is in Ubuntu Software Center, works well on FLAC/APE/CUE.
ReplyDelete@Jon
ReplyDeleteWhich Ubuntu version are you using? It's not in Ubuntu Software Center on my side.
It's not working on my ubuntu 12.04 :(
ReplyDeleteAny errors in terminal?
Delete