Why .ogg

In the Intro to Unity Audio video, Project Boost project, Rick said “we never want huge files in our games, so always use .ogg or .mp3”. That makes sense if you are trying to make the size of your Repo as small as possible, but since it doesn’t matter what supported format you use, Unity will still compress them when you build the final game. Unity Docs even go on to say that you should always use the most lossless audio files possible, i.e. 48kHz 24-bit WAV or 96kHz 32-bit AIFF, so that the audio doesn’t get compressed twice, severely reducing the quality. This is not the case for extended dialog, but there are good options there as well.

In summary, I would say the best option would be to use:
On Windows targets (In order from top to bottom):

  • 96kHz, 32-bit .wav
  • 48kHz, 24-bit .wav
  • 24kHz, 16-bit .wav
  • .ogg
  • .mp3
    On MacOSX targets:
  • 96kHz, 32-bit .aif
  • 48kHz, 24-bit .aif
  • 24kHz, 16-bit .aif
  • .ogg
  • .mp3
    On Linux targets:
    Unfortunately, most linux distributions don’t support .wav or .aif, as the lossless audio format that is typically used is .flac
    You could attempt to get high frequency and bit-rate .ogg files, but that would be the best option.

I am an audiophile when it comes to listening and love signal processing, so to me this makes the most sense, but I posted this as an “ask” because I wanted to know Rick’s reasoning for mentioning that we should always use smaller files.

1 Like

Hi PlemonsBrett,

Rick’s reasoning was mainly the file size. He did not use any high quality audio file in the first place. He recorded a few sounds at home with a normal microphone and a normal computer. Nobody wants to download several gigabytes of audio files just to hear every single detail of Rick’s low quality audio. (Well, maybe there is an exception.)

Furthermore, most people use rather “cheap” hardware. Even if they were audiophiles (meaning those with a rather “cheap” computer), they would not notice any difference between high quality wav files and compressed mp3s. When developing a game, we always have to keep our target group in mind.

Nevertheless, in the end, you are the developer of your game meaning you will have to decide yourself what makes sense in your game. If you feel that your game needs high quality audio files and if you are able to get/produce those files, I don’t see any reason why you should not use your preferred file format.

Also please feel free to ask our helpful community of students for additional opinions over on our Discord chat server. :slight_smile:


See also:

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.

Privacy & Terms