Converting WAV to MP3

I keep forgetting this, so here it is for all posterity:

afconvert -f mp4f -d aac -b 128000 input.wav output.mp3

I’m working on Bingueau-Android, and need to change literally hundreds of little wav files to mp3.

And if you want a little command-line Ruby script to do it in batches:

# command line test:
# afconvert -f mp4f -d aac -b 128000 douche.wav douche.mp3

path = "/Users/banane/dev/workspace/bingueau/res/raw/sounds/"
Dir.foreach(path) do |entry|
puts entry
system("afconvert -f mp4f -d aac -b 128000 "+entry + " " + entry.gsub(/\.wav/,".mp3"))
puts "Convert a success for: "+entry