0

Some flac files apparently have a “cuesheet metadata block”. I know how to split flacs files with shnsplit when I have a separate cuesheet at hand (cf. “How do I split a flac with a cue?”), but how do I split a flac when the cuesheet is stored inside a metadata block of the flac file?

Command-line preferred.

1

By exporting the cue-sheet to a file first. For example, metaflac has an --export-cuesheet-to=FILE option.

From man metaflac:

Export CUESHEET block to a cuesheet file, suitable for use by CD authoring software. Use '-' for stdout. Only one FLAC file may be specified on the command line.

For example:

f='file.flac'
bn=$(basename "$f" .flac)
cue="$bn.cue"

[ ! -e "$cue" ] && metaflac --export-cuesheet-to="$cue" "$f"
shnsplit -f "$cue" -t '%n-%t' -o flac "$f"
  • When I try this method the exported cue lacks title data which results in split files like 01-.flac. Is there a way to extract the cue with the titles embedded (because shnsplit uses the titles from the cue) ? – starfry Jul 4 '17 at 9:25

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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