What is the QOA Audio File Format? Features, Architecture, and How to Open It
In digital audio engineering and game development, balancing file size, playback latency, and CPU overhead has always been challenging. Standard formats like MP3, AAC, and Ogg Vorbis offer high compression ratios but require complex decoding pipelines, heavy floating-point arithmetic, and substantial memory footprints. On the other end of the spectrum, uncompressed PCM (.wav) provides zero-latency playback at the expense of massive disk usage and slow asset delivery.
The QOA (Quite OK Audio) format addresses this gap. Created by Dominic Szablewski (creator of the widely praised QOI image format), QOA is an open-source, lossy audio format tailored for lightning-fast decoding, minimal complexity, and predictable memory usage.
What is a QOA File?
A file with the .qoa extension stores compressed digital audio using the Quite OK Audio format. It operates on pulse-code modulated (PCM) audio data at 16-bit depth across sample rates ranging from $1\text{ Hz}$ up to $16,777,215\text{ Hz}$ and supports up to 31 audio channels.
Unlike psychoacoustic codecs that rely on frequency domain transforms (such as the Modified Discrete Cosine Transform or MDCT), QOA works entirely in the time domain. It compresses audio down to a fixed ratio of exactly $3.2\text{ bits per sample}$, achieving a constant $5:1$ compression ratio over raw 16-bit linear PCM.
For standard CD-quality audio (44.1 kHz, stereo), a QOA stream achieves an exact, constant bitrate of:
$$\text{Bitrate} = 44,100 \times 2 \times 3.2 = 282,240\text{ bits/s} \approx 278\text{ kbps}$$
Detailed Features of QOA
1. Minimalist Specification and Implementation
Traditional modern codecs require hundreds of pages of technical specifications and thousands of lines of code to implement. By contrast, the entire QOA format specification fits on a single-page PDF, and the official reference implementation (qoa.h) consists of roughly 400 lines of standard C code.
2. Time-Domain LMS Prediction
QOA avoids computationally intensive transform algorithms. Instead, it utilizes an adaptive Least Mean Squares (LMS) prediction filter with four historical weights per channel. By estimating future sample values and only recording quantized residual differences, QOA delivers transparent perceptual audio quality without heavy CPU usage.
3. Extremely Fast Decoding
Because QOA relies exclusively on integer arithmetic and lightweight operations, it decodes up to $3\times$ faster than Ogg Vorbis and significantly outperforms standard MP3 decoders. It even decodes faster than Microsoft ADPCM, making it ideal for low-power embedded hardware, microcontrollers, and real-time game engines.
4. Streaming-Ready Chunked Architecture
QOA files are divided into self-contained frames holding up to $5,120$ samples per channel ($256$ slices of $20$ samples). Each frame carries its own LMS filter weights and history, enabling immediate seeking, zero-penalty recovery from dropped packets, and dynamic on-the-fly streaming without mandatory global indexing.
Key Characteristics of QOA
| Characteristic | Specification / Detail |
|---|---|
| File Extension | .qoa |
| Magic Bytes | qoaf (0x71, 0x6f, 0x61, 0x66) |
| Developer / Creator | Dominic Szablewski (PhobosLab) |
| Compression Type | Lossy (Time-domain LMS prediction) |
| Compression Ratio | Fixed $5:1$ relative to 16-bit PCM |
| Storage per Sample | Exactly $3.2\text{ bits per sample}$ |
| Bitrate (44.1 kHz, Stereo) | $\approx 278\text{ kbps}$ ($282.24\text{ kbps}$ payload) |
| Sample Rate Range | $1\text{ Hz}$ to $16,777,215\text{ Hz}$ ($24\text{-bit}$ unsigned) |
| Supported Channels | $1$ to $31$ audio channels (Mono, Stereo, 5.1, 7.1, etc.) |
| Header Overhead | 8-byte file header, 8-byte frame header |
| Licensing | MIT (Source Code) / CC0 (Specification & Logo) |
How to Create and Encode QOA Files
Encoding audio into QOA is straightforward thanks to pre-built developer binaries and community toolchains.
Method 1: Using the Official qoaconv CLI
The primary encoder is distributed directly within the official reference repository.
- Clone the repository and build the binary:
git clone https://github.com/phoboslab/qoa.git cd qoa make - Convert an uncompressed WAV file to QOA:
./qoaconv input.wav output.qoa - (Optional) If compiled with
HAS_DRLIBS=true,qoaconvcan directly transcode from.flacand.mp3files as well.
Method 2: In-Engine Encoding (Godot Engine)
Starting with Godot 4.3, game developers can import uncompressed .wav files and select QOA compression directly from the Godot Import dock. This produces compact game assets that decode natively with negligible CPU latency during heavy gameplay scenes.
Method 3: In-Browser Web Converters
Several web-based WebAssembly utilities (such as those hosted on qoaformat.org and related open-source demos) allow users to drag and drop standard audio files and download an encoded .qoa asset locally without running terminal commands.
How to Open and Play QOA Files
Because QOA is a lightweight format built primarily for runtime integration, conventional consumer media players may require plugins or dedicated builds.
- Dedicated CLI Player (
qoaplay): The official repository compiles intoqoaplay, which uses native audio subsystems (ALSA on Linux, CoreAudio on macOS, WASAPI on Windows) to play.qoafiles directly:./qoaplay audio.qoa - Game Frameworks & Engines:
- Raylib: Native support via the
raudiomodule. - Godot Engine: Full native playback support (Godot 4.3+).
- Raylib: Native support via the
- Media Players & Plugins:
- Qmmp: Advanced multimedia player with native QOA decoding modules.
- OpenCubicPlayer: Classic tracker and audio file player supporting QOA streams.
- Audacious / foobar2000: Supported via open-source community input plugins.
- IDE & Developer Tools:
- VS Code: The QOA Preview extension lets developers preview and play
.qoasound clips directly inside their source tree.
- VS Code: The QOA Preview extension lets developers preview and play
Frequently Asked Questions (FAQ)
What does QOA stand for?
QOA stands for Quite OK Audio, a fast, simple, open-source lossy audio format.
Is QOA audio lossless or lossy?
QOA is a lossy audio compression format, but it maintains near-transparent audio quality for most practical use cases.
How much compression does QOA provide?
QOA compresses 16-bit uncompressed audio at a constant ratio of $5:1$ (exactly $3.2\text{ bits per sample}$).
Can QOA replace MP3 or AAC for general music streaming?
No, QOA prioritizes ultra-fast, lightweight decoding over maximum bandwidth savings, making it better suited for games, microcontrollers, and low-latency applications than high-density web streaming.
Does QOA have licensing or patent fees?
No, QOA is completely patent-free and released under the permissive MIT license, while its specification and logo belong to the public domain (CC0).
Reference URLs & Official Resources
- Official Website: https://qoaformat.org/
- Official Specification (PDF): https://qoaformat.org/qoa-specification.pdf
- GitHub Repository: https://github.com/phoboslab/qoa
- Author’s Technical Deep-Dive: PhobosLab Blog - QOA Announcement & Benchmarks