Split FLAC+cue

Sometimes I come across CDs that have been ripped into a single FLAC file. Players like Foobar2000 list the tracks separately from the cue file. However, unfortunately, MPD does not do this and I have to split the file.

In Linux, the process is quite simple:

  1. Install the dependencies:

    sudo pacman -S cuetools shntool
    
  2. Split the tracks

    cuebreakpoints sample.cue | shnsplit -o flac sample.flac
    
  3. Copy the tags, if any:

    cuetag sample.cue split-track*.flac
    
  4. If the cue is not in a separate file but included in the flac file itself, run the following command first:

    metaflac --show-tag=CUESHEET sample.flac | grep -v ^CUESHEET > sample.cue
    
Julio Batista Silva
Julio Batista Silva
Data Engineer

I’m a computer engineer passionate about science, technology, photography, and languages. Currently working as a Data Engineer in Germany.

comments powered by Disqus