You've got to make sure you output format (specified by ext) matches your codec, so if you're saving with aac you'll need to save as outputfile.aac or if you're using WAV you might want pcm_s16be or so on.
The aac codec is not a good one to use. Are you getting messages that tell you to use "-strict experimental" if you want to use it? You could compile with libfaac support (you can see if it's already supported by doing ffmpeg -version and seeing if it comes up), or you can use libaacplus.
If that doesn't work, post the commands your using and the results you get.
Editor, Animator, Motionographer