Reputation: 1
I am creating a game that uses a lot of small (5K-40K)sound bites (15M of mp3) to make voice responses. Apple's best practices talk about compressed formats. If I use "afconvert -f AIFC -d ima4 sound.wav" to compress any of the files, I get one almost four times the size. Should I just use mp3s? Is there another way of compressing files, or am I doing something wrong? Being a newbie to programming, I would appreciate any advice on how to keep my app bundle smaller.
Upvotes: 0
Views: 2731
Reputation:
Please note the difference between the following concepts:
Answer:
WAV is actually an uncompressed audio codec. MP3 is a compressed format.
In your example, you are converting “backwards” to a larger file size. Your files are already MP3; so they should require no further codec compression.
Additionally: MP3 is a “lossy” compression format, so you can not recover information removed in compression. For this reason, you should basically never convert from MP3 to WAV (audio quality begins to suffer quickly when doing that). Ensure that all audio processing is finished using an uncompressed format first, then convert to a lossy format as the very last step.
Upvotes: 2
Reputation: 17043
First off all check that audio bitrate is not too big. Typical bitrates for different purposes:
So for speech 48 kbit/s is usually enough.
Second - you should use better compression codec than AIFC. For detail information please check this link http://soundexpert.org/encoders-48-kbps but AAC codec is always the best.
Other codec options (sample rate, bit depth, etc.) are not so important and usually you should leave them default.
Upvotes: 0