Converting ape to ogg files

Other talk about Salix
Post Reply
User avatar
thenktor
Salix Wizard
Posts: 2426
Joined: 6. Jun 2009, 14:47
Location: Franconia
Contact:

Converting ape to ogg files

Post by thenktor »

Because I've been annoyed of converting all the ape files to ogg by hand (mac does not support * in command line), I've written a small script to do it for me:

Code: Select all

#!/bin/sh
# converts ape to ogg vorbis files

case "$1" in
	"-h")
	echo "usage: $0 file1.ape file2.ape [...]"
	exit 0
	;;
	"--help")
	echo "usage: $0 file1.ape file2.ape [...]"
	exit 0
	;;
esac

for n in "$@"; do
	n2=`echo "$n" | sed s/\.ape$//`
	mac "$n" "$n2.wav" -d
	oggenc -q7 "$n2.wav"
	rm "$n2.wav"
done
Of course you can change to mp3, flac, whatever...
Image
burnCDDA (burns audio CDs)
geBIERt (German beer blog)
Post Reply