Use ffmpeg to convert an audio file to VBR AAC in an M4A (MP4) container:

ffmpeg -i input.wav -codec:a libfdk_aac -vbr 3 output.m4a

Use ffmpeg to convert an audio file to CBR 64k kbps AAC, using the High-Efficiency AAC profile:

ffmpeg -i input.wav -c:a libfdk_aac -profile:a aac_he -b:a 64k output.m4a