Tuesday, April 20, 2010

Converting and chunking single-file CDs (with CUE sheets)

Issue 1: You have a number of files with .ape extension, for which there is no default player on Ubuntu.

Solution: Convert them with ffmpeg:
for f in *.ape; do ffmpeg -i "$f" "${f%.ape}.wav"; done



Issue 2: You have a music CD which you ripped to .ape, .flac, or whatever else, but instead of splitting the file you just created a CUE sheet for re-burning and would like to split it for your digital music player.

Solution: Use shnsplit:
shnsplit -o flac -f [file].cue -t "%n. %a - %p - %t" -m \ _ [file].flac


Replace [file] with the appropriate filename (or wildcard). If your input file is not .flac (e.g. .wav, as per the .ape file converted above) just use the appropriate extension. Check the manpages for shnsplit for additional configurations.

No comments: