Format:WEM (Wwise RIFF audio)
| Developer | Audiokinetic |
|---|---|
| Magic | RIFF or RIFX, form WAVE |
| Extensions | .wem, .ogg (old), .wav |
| Endianness | little (PC, RIFF) or big (X360, RIFX) |
| License | proprietary; readers: vgmstream (ISC), ww2ogg |
| On this wiki | Facts · Code · Notes · Topics |
Audiokinetic Wwise's audio file (.wem, or the same data inside a SoundBank DATA chunk): a RIFF (little-endian) or RIFX (big-endian) wave whose fmt chunk carries a Wwise codec id (0xFFFF Vorbis, 0x3041 Opus, 0x0002 IMA ...) and, for Vorbis, a vorb or extended-fmt header.
Identification
RIFF/RIFX+ size +WAVE, then afmtchunk, optionalvorb,seek,smpl,cue,LIST/akd,junkchunks anddata. Chunks are even-aligned without the padding byte of real RIFF files. The RIFF size field is often wrong (varies with codec), so do not trust it.- File names are numeric ids (
123456789.wem), the 32-bit FNV-1 hash of the original name or of a GUID; games store them inStreamingfolders, in.pckpackages, or inside.bnkbanks (the DIDX/DATA chunks of Format:Wwise SoundBank (BNK)). RIFXmeans a big-endian platform (Xbox 360, PS3, Wii U).
Codec id in fmt
The 16-bit format tag of fmt selects the codec (see Fact:WEM (Wwise RIFF audio)/enum/fmt codec ids): 0x0001 PCM, 0x0002 IMA ADPCM (newer Wwise; platform ADPCM), 0x0069 IMA (older), 0x0161 xWMA (WMAv2), 0x0162 xWMA Pro, 0x0165 and 0x0166 XMA2, 0xAAC0 AAC, 0xFFF0 GameCube DSP, 0xFFFB Vita HEVAG, 0xFFFC ATRAC9, 0xFFFE PCM (Wwise authoring), 0xFFFF Vorbis, 0x3039 Opus for Switch (renamed from Opus in Wwise 2018.1), 0x3040 Opus, 0x3041 Opus WEM (Wwise 2019.2.3 and later), 0x8311 PTADPCM (Wwise 2019.1 and later, replaces IMA).
Wwise Vorbis
The most common codec in PC games. The Ogg framing is gone: packets have a small custom size header, the identification and comment headers are rebuilt from the vorb/fmt data and the setup header (codebooks) is either stored inline (earliest, 2009), trimmed, or replaced by an index into a table of packed codebooks that Wwise carries internally (packed_codebooks.bin, and the aoTuV 6.03 set from Wwise 2011.2). Block sizes are two exponents (small, large), and 'mod packets' change the packet header layout. ww2ogg rebuilds a standard Ogg Vorbis file from these parts; vgmstream decodes directly.
The size of the extra data after the fmt tag identifies the generation: 0x2C and 0x28 (~2009, bank version 34-36), 0x34 (2010-2011, versions 38-48), 0x32 (52), 0x2A (53), 0x30 (56 and later; extended fmt with 0x42 chunk size, inline vorb fields moved into fmt). See Fact:WEM (Wwise RIFF audio)/struct/Wwise Vorbis fmt extra data for the field offsets of the newer layout (total sample count, loop packet offsets, seek table size, data offset, max packet size, decode allocation sizes, codebook hash, block size exponents).
Details now recorded as facts: how the generation is read from the vorb size (Fact:WEM (Wwise RIFF audio)/identification/Vorbis generation by vorb size); the three packet header forms, 2 bytes (size), 6 bytes (u16 size, u32 granule) and 8 bytes (u32 size, u32 granule) (Fact:WEM (Wwise RIFF audio)/behavior/Vorbis packet header forms); the modified-packet signal at vorb+4 (Fact:WEM (Wwise RIFF audio)/behavior/Modified packets signal); telling full inline, trimmed inline and external setups apart for 0x34 files (Fact:WEM (Wwise RIFF audio)/identification/Setup header type of 0x34 files); and that ww2ogg needs its codebook options chosen by the caller (Fact:WEM (Wwise RIFF audio)/behavior/ww2ogg setup flags are not auto-detected). The codebook id in an external-codebook setup is 10 bits wide (ww2ogg wwriff.cpp).
Tools
ww2ogg (BSD-3-Clause, hcs) and vgmstream (ISC); both are listed below.
Related
Library:Wwise, Format:Wwise SoundBank (BNK), Format:Vorbis, Format:Ogg, Technique:Game audio and video middleware.
Code & repositories
- https://github.com/vgmstream/vgmstream @
db77f98f405a45ad08df98aa444cae3848f95e6c· license: ISC (declared by the contributor; GitHub's detector did not recognize COPYING)
vgmstream (ISC): reads FSB1-5, FMOD banks, Wwise WEM/BNK, Bink audio, CRI ADX/HCA/AWB/CPK/USM; the parsers in src/meta document the formats.
Tested on: source read, not run: source read, not run · checked 2026-10-18; last activity 2026-10-16; Note: the latest release ships binaries; the wiki links only the source, never the binaries - https://github.com/hcs64/ww2ogg @
14ed9b0dd62e815a38702b5f03c57006cbe2501b· license: BSD-3-Clause
ww2ogg (BSD-3-Clause): rebuilds Ogg Vorbis from Wwise RIFF/RIFX Vorbis; packed_codebooks.bin and aoTuV 6.03 variant.
Tested on: source read, not run: source read, not run · checked 2026-10-18; last activity 2024-10-12; Note: the latest release ships binaries; the wiki links only the source, never the binaries
Evidence & references
- vgmstream commit db77f98f405a45ad08df98aa444cae3848f95e6c (ISC):
src/meta/wwise.c(codec switch at lines 899-915, vorb version detection at 190-260, format research notes at 1036-1098). - ww2ogg commit 14ed9b0dd62e815a38702b5f03c57006cbe2501b: README.md, notes.md.