I am trying to record audio on Android and run into quality problems, correspondingly with the selected format.
I use the following setting
mr=new MediaRecorder(); mr.setAudioSource(MediaRecorder.AudioSource.MIC); mr.setOutputFormat(MediaRecorder.OutputFormat.MPEG_4); mr.setOutputFile("somepath"); mr.setAudioEncoder(MediaRecorder.AudioEncoder.AAC);
This code, however, returns very different results on two devices running under different versions of Android (4.4.4 and 5.1.1).
When I look at the file headers, it shows different formats for both files (3gp4 on 4.4.4 - mp42 on 5.1.1). VLC, however, insists on using AAC, but shows very different sample rates, 8k for a 4.4.4 file and 48k for 5.1.1.
Does anyone know why?
xml
user5854159
source share