I want to record audio with iPhone and then upload it to server.
I could record the audio, but my question is about which format should I use to record audio, so that the Recorder will result a file with smallest file size.
Here are the results for few encoding supported by iPhone. Size of audio file in KB of duration 10 sec.
kAudioFormatMPEG4AAC : 164,
kAudioFormatAppleLossless : 430,
kAudioFormatAppleIMA4 : 475,
kAudioFormatULaw : 889,
kAudioFormatALaw : 889,
Among these kAudioFormatMPEG4AAC is having smallest size.
Apple iOS supports playback audio in these formats:
For recording following formats are possible:
while only AAC supports hardware-assisted encoding (see Apple iOS SDK documentation)
For the universality in availability I prefer MP3.
Check these links to find exact code to record audio - Recording Audio on an iPad with AVAudioRecorder
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With