Closed pvagner closed 1 year ago
HE_AAC
didn't seem to work in my tests unfortunately, so that's why it's currently not being used.UNPROCESSED
is very interesting for example and MIC
can be used to use the device microphone while having wired headphones plugged in for example.So all in all these seem to be good ideas, I've already added some strings for it accidentally and added 1., but I'd be happy if you wanted to finish the rest of it :)
Okay, thank you for acknowledging. I will try in the upcoming days, most likelly on weekend.
Greetings
Peter
Describe your suggested feature
Currently when sample rate is configured to auto default sample rate and default encoding bitrate is used for the actual recording. When disabling auto and entering sample rate value manually it may not fully respect that configuration.
On my device Xiaomi Redmi 9 with Android 12 AOSP it's working like this: When configuring recording format to opus, sample rate to auto, the resulting recording is samplet at 48 kHz with audio bitrate about 32 kbps. When configuring recording format to opus, sample rate to 44100, resulting recording is sampled at 48 kHz with audio bitrate about 280 kbps. The system encoder won't apparently accept any value for opus codec than the default. I have tried 44100 and 16000 so far. The bitrate 280 for 48 kHz recording is an overkill I think. The opus codec is tuned for low bitrates and I'd prefer 32 kbps or 40 kbps bitrate for casual recordings, up to 128 kbps for high quality recordings. When configuring recording format to AAC, sample rate to 16000, the resulting AAC file is sampled at 16000 Hz with audio bitrate 96 kbps thus it's not accepting very high bitrate of 16000 32 2 at all.
Most likelly the best way to move forward would be to add an ability to configure bitrate and number of audio channels too so we would be able to make stereo recordings. Now many devices do support stereo recording.
Consider using HE_AAC encoder as it supports higher quality recording than AAC.
Also for stereo recordings without applying the default compression and limiter processing it would be nice to configure recording source. This is device specific but I think at least these should be selectable: MediaRecorder.AudioSource.DEFAULT, MediaRecorder.AudioSource.MIC, MediaRecorder.AudioSource.CAMCORDER, MediaRecorder.AudioSource.UNPROCESSED,
Since API 29 there are some new microphone related settings. I haven't seen a device which I might be able to make some good use out of with but that might become important in the future as well.
Other details
I might be able to work on this however I'd like to know your opinion on this first.
Acknowledgements