开发者

what audio compression Algorithm to use in iPhone App?

I am trying to record audio using an iPhone app and send the audio file through Mail. I need to compress the file before sending. what audio compression Algorithm to use i开发者_运维技巧n iPhone App?


It depends very much on your application.

  • Do you need loss-less compression, or can you afford losing some audio quality?
  • How fast to you need the file transfer to be?
  • How fast do you need the compression process to be?

Depending on the answers to these questions, you can choose one of the formats available in iOS.

You can read more here:

http://developer.apple.com/library/ios/#documentation/MusicAudio/Conceptual/CoreAudioOverview/Introduction/Introduction.html

http://developer.apple.com/library/ios/#documentation/MusicAudio/Conceptual/AudioQueueProgrammingGuide/AQRecord/RecordingAudio.html#//apple_ref/doc/uid/TP40005343-CH4-SW4


First choose the right bitrate. Typical bitrates for different purposes:

  • 32kbit/s: AM Radio quality
  • 48kbit/s: Common rate for long speech podcasts
  • 64kbit/s: Common rate for normal-length speech podcasts
  • 96kbit/s: FM Radio quality
  • 128kbit/s: Most common bit rate for MP3 music
  • 160kbit/s: Musicians or sensitive listeners prefer this to 128kbit/s
  • 192kbit/s: Digital radio broadcasting quality
  • 320kbit/s: Virtually indistinguishable from CDs

So if audio contains only speech 48 kbit/s is usually enough. For music 128 should be ok.

Second - you should use good compression codec. For detail information please check this link http://soundexpert.org/encoders-48-kbps but usually you should use AAC codec.

Other options (sample rate, bit depth, etc.) are not so important and usually you should leave them default.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜