Saturday 31 October 2009

How to split a music file (flac, wv ...) when given the corresponding .cue file.

This is the second time I needed to do this, so instead of googling again, I thought that I may post it here for future reference .....

Thanks to fl_bulgarelli from the Fedora Forum here is a small how to, when somebody gives you a complete album encoded in flac and a the corresponding .cue file, while what you want is to be able to split the album into smaller music files corresponding to the songs.

The magic command is:
cuebreakpoints album.cue | shnsplit -o flac album.flac
or
cuebreakpoints album.cue | shnsplit -o wv album.wv if you are using a wavpak file.

More details about how to set this up, can be found here. For the shake of completeness I will add that as of this writing (August 20th 2011) both the cuetools and shntool packages are available from the main fedora repository, so a simple yum install shntool cuetools, will work just fine. For Ubuntu, Mint etc try sudo apt-get install cuetools.

NOTE: For those with a bad attitude towards typing sh commands, try opening the .cue file with k3b. A few clicks and (perhaps) a visit to your distro's Add/remove Software application might get you to splitting your flac file as well :).