Size optimization for Audio

Hello, I wanted to ask a question regarding the size optimization for audio in Monogame, in particular, the background music.

My game is nearing completion and I noticed that the audio takes 25% out of the whole APK size what given the fact that a lot of people don’t play mobile games with sound is quite a lot. One of the optimizations is obviously to loop the music trimming the original track in length.I also tried to reduce the music quality to 64 kbps, but I noticed that I can’t do it using the pipeline tool.

The pipeline tool has just three quality levels, and what is strange only the “best” preset really differs from “low” and “medium”. Nevertheless, using “low”/“medium” I get 96 kbps quality. Is there a way to go lower?

Are you using Sound Effect or Song for your music?

Song, of course :slight_smile:

Unless you’re music is extremely long, it shouldn’t be more than a couple MB for each song. I don’t think you’re gonna get any more compression out of the format.

Yep, that’s exactly what I got. I only thought about lowering the quality - some tracks will sound awful on 64kbits, but for others it would be bearable. Nevertheless, we are talking about a megabyte here and there so that’s not critical at all.
However, I noticed that songs in ogg format with the same quality preset tend to be smaller after using pipeline tool so I’ll stick to these.

1 Like

Hi @elzabbul,

Just to calm your fears a bit. Many times I have got to the end of the project and found it has to go on a diet.

I have two major techniques to deal with this, one of which is relevant.

In the build system I add a quality setting for audio, and I lower the quality of sounds I think don’t need to be full quality. I don’t change the source files, I change them in the build system. Which means I don’t have to tell any of the sound guys what is going on. :grin:

I have done this many times, and never, ever, has anyone noticed.

You should have no problems putting them on a diet.

1 Like