When I record Audio in my iPhone application, the file size is huge. How can I compress audio?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
I’ve not done this, but it looks pretty straightforward.
When you create your AVAudioRecorder, you can specify the destination URL, format and nitrate. If you choose a compressed format and appropriate bitrate, the data will be automatically compressed for you. If you choose AAC, it should also be compressed in hardware.
You want to use AVAudioRecorder’s initWithURL:settings:error:
The constants you need are in General Audio Format Settings.
I’d guess your best bet would be kAudioFormatMPEG4AAC.
You only want to compress audio using an audio codec, any other way is inefficient and will produce poor audio.