Skip to content

Instantly share code, notes, and snippets.

@joaopizani
Created May 17, 2012 12:15
Show Gist options
  • Save joaopizani/2718522 to your computer and use it in GitHub Desktop.
Save joaopizani/2718522 to your computer and use it in GitHub Desktop.
Little bash snippet for converting audio formats to MP3
IFS=$'\n'; for i in $(find /media/midia/musicas -type f -name '*.wma'); do
mplayer -vc dummy -vo null -ao pcm:fast:file=/tmp/tmp.wav $i
lame /tmp/tmp.wav $(dirname $i)/$(basename $i .wma).mp3
done; rm /tmp/tmp.wav; unset $IFS
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment