This will convert every WAV in a directory into one MP3 and one OGG; note that it's case-sensitive (the above command will convert every file ending in .wav, but not .WAV). If you want a case-insensitive version:

(Max respect to Dennis for his response here for finding me a working implementation of find with ffmpeg)

For case-insensitive search with find, use -iname instead of -name.

A note on -q:a: for MP3, the quality range is 0-9, where 0 is best quality, and 2 is good enough for most people for converting CD audio; for OGG, it's 1-10, where 10 is the best and 5 is equivalent to CD quality for most people.