Up to date
This page is up to date for Godot 4.0
.
If you still find outdated information, please open an issue.
Importing audio samples¶
Supported audio formats¶
Godot provides 3 options to import your audio data: WAV, Ogg Vorbis and MP3.
Each format has different advantages:
WAV files use raw data or light compression (IMA-ADPCM). They are lightweight on the CPU to play back (hundreds of simultaneous voices in this format are fine). The downside is that they take up a lot of disk space.
Ogg Vorbis files use a stronger compression that results in much smaller file size, but require significantly more processing power to play back.
MP3 files use better compression than WAV with IMA-ADPCM, but worse than Ogg Vorbis. This means that a MP3 file with roughly equal quality to Ogg Vorbis will be significantly larger. On the bright side, MP3 requires less CPU usage to play back compared to Ogg Vorbis.
Note
If you've compiled the Godot editor from source with specific modules disabled, some formats may not be available.
Here is a comparative chart representing the file size of 1 second of audio with each format:
Format |
1 second of audio |
---|---|
WAV 24-bit, 96 kHz, stereo |
576 KB |
WAV 16-bit, 44 kHz, mono |
88 KB |
WAV 16-bit, IMA-ADPCM, mono |
22 KB |
MP3 192 Kb/s, stereo |
24 KB |
Ogg Vorbis 128 Kb/s, stereo |
16 KB |
Ogg Vorbis 96 Kb/s, stereo |
12 KB |
Note that the MP3 and Ogg Vorbis figures can vary depending on the encoding type. The above figures use CBR encoding for simplicity, but most Ogg Vorbis and MP3 files you can find online are encoded with VBR encoding which is more efficient. VBR encoding makes the effective audio file size depend on how "complex" the source audio is.
Tip
Consider using WAV for short and repetitive sound effects, and Ogg Vorbis for music, speech, and long sound effects. MP3 is useful for mobile and web projects where CPU resources are limited, especially when playing multiple compressed sounds at the same time (such as long ambient sounds).
Importing audio samples¶
Several options are available in the Import dock after selecting a WAV file in the FileSystem dock:

Import options in the Import dock after selecting a WAV file in the FileSystem dock¶
The set of options available after selecting a Ogg Vorbis or MP3 file is different:

Import options in the Import dock after selecting a MP3 file in the FileSystem dock. Options are identical for Ogg Vorbis files.¶
After importing a sound, you can play it back using the AudioStreamPlayer, AudioStreamPlayer2D or AudioStreamPlayer3D nodes. See Audio streams for more information.
Import options (WAV)¶
Force > 8 Bit¶
If enabled, forces the imported audio to use 8-bit quantization if the source file is 16-bit or higher.
Enabling this is generally not recommended, as 8-bit quantization decreases audio quality significantly. If you need smaller file sizes, consider using Ogg Vorbis or MP3 audio instead.
Force > Mono¶
If enabled, forces the imported audio to be mono if the source file is stereo. This decreases the file size by 50% by merging the two channels into one.
Force > Max Rate¶
If set to a value greater than 0
, forces the audio's sample rate to be
reduced to a value lower than or equal to the value specified here.
This can decrease file size noticeably on certain sounds, without impacting quality depending on the actual sound's contents. See Best practices for more information.
Edit > Trim¶
The source audio file may contain long silences at the beginning and/or the end. These silences are inserted by DAWs when saving to a waveform, which increases their size unnecessarily and add latency to the moment they are played back.
Enabling Trim will automatically trim the beginning and end of the audio if it's lower than -50 dB after normalization (see Edit > Normalize below). A fade-in/fade-out period of 500 samples is also used during trimming to avoid audible pops.
Edit > Normalize¶
If enabled, audio volume will be normalized so that its peak volume is equal to 0 dB. When enabled, normalization will make audio sound louder depending on its original peak volume.
Edit > Loop Mode¶
Unlike Ogg Vorbis and MP3, WAV files can contain metadata to indicat