29 March 2011

Converting .raw ripped CD tracks to WAV format

Why do this?

Because you have a heap of CD audio tracks ripped to Raw format by k3b, however the software intended to use those depends on some kind of file structure.

So... place this in ~/bin/raw2wav.sh & mark it executable (chmod a+x):
if [ -f "$1" ]; then
echo WAVifying [$1]
sox -V -r 44100 -b 16 -c 2 -s "$1" "$(dirname "$1")/$(basename "$1" .raw).wav"
Apply this using a command like:

find . -type f -name '*.raw' -exec raw2wav.sh {} \;

No comments: