This addon lets you import Opus, a modern lossy audio encoding with excellent compression, in Godot 4.
Opus GDExtension adds AudioStreamOpus, which is almost identical in features to the built-in AudioStreamOggVorbis.
- Import
.opusfiles in the editor. - Play the
.opusfiles in the editor inspector. - Load
.opusfiles at runtime. - Play
.opusfiles at runtime.
To convert a WAV file to Opus at 128 kbits/s, install FFmpeg and run:
ffmpeg -i input.wav -c:a libopus -b:a 128k output.opus
Opus is transparent (perceptually lossless) at 128 kbits/s for music and 32 kbits/s mono for voice.
If you're looking to save as much space as possible, Opus is very high quality at 96 kbits/s for music.
| Format | Transparent Bitrate (Music) | Transparent Bitrate (Voice) |
|---|---|---|
| Opus | 128 kbits/s | 32 kbits/s mono |
| Ogg Vorbis | 160 kbits/s | 64+ kbits/s mono |
| MP3 | 192 kbits/s | 96+ kbits/s mono |
Opus GDExtension has a baseline of Godot 4.4 and aims to support every platform supported by Godot 4.4.
Note: Every supported platform has binaries for single (but not double) precision and debug/release mode.
| Platform | Supported |
|---|---|
| Windows x64 | ✅ |
| Windows x32 | ✅ |
| Windows ARM64 | ✅ |
| Linux x64 | ✅ |
| Linux x32 | ✅ |
| Linux ARM64 | ✅ |
| Linux ARM32 | ✅ |
| macOS Universal | ✅ |
| Android x64 | ✅ |
| Android x32 | ✅ |
| Android ARM64 | ✅ |
| Android ARM32 | ✅ |
| iOS ARM64 | ✅ |
| Web WASM32 | ✅ |
There is a proposal and pull request to add Opus into Godot core.
Please give them a thumbs up (👍) so it's more likely to be merged!
To use this library, you need to follow the license of the following repositories: