Skip to content

Instantly share code, notes, and snippets.

@andrey-str
Forked from jingle/ape2mp3.sh
Created January 6, 2016 09:08
Show Gist options
  • Save andrey-str/3d05d7ff24f9745278c2 to your computer and use it in GitHub Desktop.
Save andrey-str/3d05d7ff24f9745278c2 to your computer and use it in GitHub Desktop.
Convert ape to mp3 using avconv, split with mp3splt and cue
#!/bin/bash
find "$1" -type f -name "*.ape" -print0 | while read -d $'\0' song
do
output=${song%.ape}.mp3
cue=${song%.ape}.cue
avconv -i "$song" -b 192k "$output"
if ls "$cue" &> /dev/null; then
mp3splt -a -c "$cue" "$output"
rm "$output"
else
echo "no need to split"
fi
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment