I just found a way to do this.
ffmpeg -f s16le -sample_rate 16000 -channels 2 -i tentative.raw -c:a aac testing.m4a
If your ffmpeg out of date, you may need to add -strict experimental to encode using your own FFmpeg AAC encoder ( -c:a aac ).
source share