Shrek 2 - Xbox audio codec [solved]

Codecs, formats, encoding/decoding of game audio, video and music
loudaslife
Posts: 2
Joined: Thu Jun 18, 2020 12:33 am

Shrek 2 - Xbox audio codec [solved]

Post by loudaslife »

Hello. I've been trying to extract audio from Shrek 2 on Xbox. Most of it is in .wma format, except for the sound effects used during gameplay. These are stored in .xwb files that I haven't been able to decode. I've tried decoding them using all 49 ADPCM codecs supported by ffmpeg (I even compiled it myself to get some extra ones not included by default), and some output a heavily distorted version of the audio, but none are usable. xbadpdec.exe also doesn't work.

I've included 4 files in the .zip:
Donkey.xwb - The .xwb file from the Xbox disc.
000.wav - The output extracted by Luigi's unxwb
Donkey000.adpcm - The output extracted by XWB Extractor 1.1
Donkey0.wav - The equivalent audio file from the PC version

BTW, I want the Xbox versions because the PC version sound effects have wildly inconsistent volume. So the volume of Donkey0.wav might not match the other files.
Last edited by loudaslife on Fri Jun 19, 2020 6:57 pm, edited 1 time in total.
loudaslife
Posts: 2
Joined: Thu Jun 18, 2020 12:33 am

Re: Shrek 2 - Xbox audio codec [solved]

Post by loudaslife »

Update: I've discovered that these are, in fact, standard Xbox ADPCM. I had only tried xbadpdec.exe with the raw output from XWB Extractor 1.1, which wasn't handling offsets correctly (and therefore outputting files with a bunch of incorrect header garbage at the beginning.) Feeding the output of unxwb into xbadpdec produced the correct output. Might be worth noting that unxwb sets the format code in the wav header as 0x0002, rather than 0x0069 for Xbox ADPCM.