1

The default iphone audio recorder has a sampling rate of 44.1khz and a bit rate of 64 kbps. When exporting an 8 min audio recording from the recorder I can see that the exported file size comes out to a little under 4MB. When I try to export an audio file from my custom audio recorder my 3 min audio recording fails to export because its 22MB. How are they getting their file size so low with such a high sampling rate? Also, I see that the exported audio file is .m4a but in itunes the file "kind" is AAC. Shouldn't that make the audio file .AAC?

Just read this: What is the difference between M4A and AAC Audio Files?. So an m4a file can contain an AAC audio track?

Kind of confused here.

Community
  • 1
  • 1
Brosef
  • 2,945
  • 6
  • 34
  • 69

1 Answers1

0

AAC is one of many audio codec which is the flavor of compression ... once encoded it becomes binary data which needs to get wrapped inside a container format for transport over the wire or into a file ... once such container is m4a

Doing the math on 64 kbps (this is an uncompressed figure) for an 8 minute clip ... 64 * 60 * 8 == over 30 meg ... AAC typically does a 10 to 1 compression so it becomes the 4mb you quote ... bit rate is based on two underlying factors : sample rate (44.1 kHz) and bit depth or the number of bits of resolution per sample ... standard CD quality bit depth is 16 bits, whereas telephone audio can be as low as a bit depth of 8 bits per sample ... single channel mono versus 2 ch stereo would double the required bit per second

under the covers all audio processing/recording/playback uses PCM which is raw audio prior to compression

Your figure of 22 meg for 3 minutes --> 22000000 / 60 / 3 == 122 kbps which is about right for stereo uncompressed PCM ... so I would say your 22 meg is uncompressed

hope this helps

Scott Stensland
  • 26,870
  • 12
  • 93
  • 104
  • 1
    Thanks for the thorough explanation. I've been struggling with this for nearly a week now. For anyone new to audio recording who might be having the same problem with file sizes - make sure you check the AVFormatIDKey you're using. I was initially using kAudioFormatAppleLossless. I thought I had to do some crazy compression to export my audio files or use a super low sample rate. All I had to do was to change AVFormatIDKey to kAudioFormatMPEG4AAC and now I get the same results as the standard apple recorder. – Brosef Feb 11 '15 at 03:57