Ore Miner is an addictive clicking game where you mine ores to craft new picks and equipment to increase your ore income!

Post tutorial Report RSS Reducing mobile app download size (part 2)

It can be quite hard to determine what is and what isn’t good enough when it comes to audio. Humans are very sensitive to audio imperfections, but at the same time we don’t want audio files to have a huge impact on the game’s download size.

Posted by on - Basic Other

Sound compression

It can be quite hard to determine what is and what isn’t good enough when it comes to audio. Humans are very sensitive to audio imperfections, but at the same time we don’t want audio files to have a huge impact on the game’s download size.

The audio files we were working with were all over the place in terms of their bitrate. The audio folder, which included both the music and sound effects, was 7MB in size. This is also the impact on size audio had in the APK, so Unity didn’t do any meaningful compression by default. The background music was a 128kbps MP3 file, the sound effects were either 1411kbps or 2304kbps WAV files. In the audio import settings, there’s a handy drop down, which lets Unity optimise the track’s bitrate. Some sound effects went from 300kB to 59.1kB when this was selected. The music, which was already at 128kbps didn’t see as drastic a drop in size. It went from 3.7MB to 3.2MB.



Unity supports three compression formats: Pulse Code Modulation (PCM, used in wav file format), Adaptive PCM (ADPCM) and Vorbis (used in ogg file format). PCM and ADPCM formats both increased the file size of our original music file (originally a 3.7MB MP3) to 16MB and 4MB respectively. Vorbis was the only one which reduced it (initially from the 3.7MB MP3 to 3.2 MB when imported with optimised bitrate. We didn’t look further into PCM and ADPCM. In the end, we simply enabled the bitrate optimisation feature and selected the Vorbis format and left it at that.

The other thing we looked at here was whether files were stereo or mono. The sounds we are using are all single-channel, just encoded as stereo, so there is really no benefit to keeping them as stereo files. Stereo and mono files are clearly marked in Unity itself with their icons in the project browser. The ones with a single waveform are mono, the ones with two waveforms are stereo.


Most of our sound effects and music, as it turns out, were encoded as stereo. In Unity’s import settings, there is a checkbox, which forces the imported file to become mono. We enabled it and were quite surprised by the reduction in file size. We expected some difference, but because of the way stereo encoding is done in files and because the two channels are identical in our sound effects and music, we assumed that encoding the second channel required minimal extra file size. This was however not the case as forcing mono reduced the file size of sound effects by around 50%. The music file was also reduced from the previous best 3.2MB (using optimised bitrate in stereo) to just 2.0MB (using optimised bitrate in mono). This reduced the total import size of audio to just 2.1MB from the 7.0MB we started at. Did we lose audio quality? Probably. but as best as we can tell, it can’t be perceived. I think the overwhelming majority of users will prefer the smaller download size.


Next time we will explore image sizes and shaders.

Matevž Baloh, programmer

Post a comment

Your comment will be anonymous unless you join the community. Or sign in with your social account: