Skip to content

Instantly share code, notes, and snippets.

@romanlv
Created March 31, 2012 17:49
Show Gist options
  • Save romanlv/2267094 to your computer and use it in GitHub Desktop.
Save romanlv/2267094 to your computer and use it in GitHub Desktop.
Convert m4a (and m4b) files in current folder to mp3
mkdir -p mp3s
SAVEIFS=$IFS
IFS=$(echo -en "\n\b")
for i in `find . -type f -iname "*.m4[ab]" -print`; do
echo $i
NAME=`echo $i | sed -e 's/\.\///' -e 's/\.m4b//g' `
echo "doing '$NAME'"
faad --stdio $i | lame --preset standard - "mp3s/${NAME}.mp3"
done
IFS=$SAVEIFS
@pepa65
Copy link

pepa65 commented Sep 18, 2017

If you want chapters, see: https://github.com/valekhz/m4b-converter

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment