Stream ripping tools

Here's a collection of tools related to ripping streamed video game music. All are by hcs except where otherwise noted. Most have no license included; if you're interested in reusing the code contact me and I'll probably put your permissive license of choice on it.

These are also mostly on GitHub at vgm_ripping and ww2ogg.

dkdsp

I've put together, on request, a program to convert the standard mono DSP files created by the devkit DSPADPCM.exe into stereo (either by doubling a mono file or using one mono file for each channel) files for Donkey Konga or Star Fox Assault. It's been tested on a Gamecube with Japanese Donkey Konga 2.
dkdsp v0.4
Notice that the point of this program is to generate new DSP files for use in Donkey Konga. It is not necessary to combine right and left channel DSPs for playback with in_dsp or in_cube, if you choose either it will load the other as well.

SSMEx

Several games (specifically those HAL had a hand in) contain SSM files, which are collections of DSP files. SSMEx (v0.1) will extract those files. I don't have the algorithm exactly right yet, but this produces usable files.

adXtract

adXtract (0.2) extracts ADX files from any archive (uncompressed, that is) containing them. Note that it will also attempt to extract the audio stream from Sofdec video (SFD), but it doesn't work (it should produce a warning message). bero has a tool that does that well, sfd2mpg.

TMNT3:MN extractor

Teenage Mutant Ninja Turtles 3: Mutant Nightmare (Gamecube) has a file called strbgm.bin which contains all the DSPs. I wrote an extractor (0.1) which converts them to standard dual-file stereo DSPs.

bigfat

bigfat extracts the files from the "soundgc.big" and "soundgc.fat" files in Prince of Persia: The Two Thrones. I don't know how to play these files yet, though.

bbegex

bbegex extracts the files from "Filelist.000" and "Filelist.txt" in Batman Begins (Gamecube).
sfxtract 0.0 will extract DSPs from SFX files that contain them, but it looks like most of the music in Batman Begins (Gamecube) is stored in another format.

MOOd

Extract DSPs from the MOO files in Robotech: Battlecry (Gamecube) with MOOd 0.0 (MOO depacker).

gcfsysd

gcfsysd 0.1 extracts files from the .fsys files found in Pokemon XD Gale of Darkness. Rename .000 files to .dsp or .ish to (possibly) get them to work with in_cube 0.16 (or higher, 0.15 had looping problems).
0.1 now works with Pokemon Colosseum, but I don't know how to play the extracted files.

SPTex

SPTex 0.0 extracts DSPs from SPT/SPD pairs, Nintendo's official packed DSP format.

PAKthis

PAKthis 0.0 extracts files from the .bin files in Megaman X Collection (Gamecube). The audio seems to be mostly OGG Vorbis.

Game Extractor plugins

Game Extractor is a nice Java program that unpacks a huge variety of files. I've modified two plugins to work with the variants of RCF found in some Gamecube games.
GE RCF plugins
You install these by adding the .class files to the GameExtractor.jar file included with Game Extractor. The .jar is simply a .zip.

CDEU

CDEU is a program by PokéParadox to extract Cstr DSP file from DSP bundles, tested with R:Racing.

aix2adx

aix2adx 0.1 extracts ADXs from interleaved AIX files. Now continues reading additional sections past AIXE marker.

adxloop

adxloop 0.1 will force an ADX to loop from end to beginning. Optionally you can add an "intro" which is played first and not looped. Now with proper loop start points for in_cube.

jbc

(0.0) Just an extractor for jbc files, such as found in NHL Hitz Pro (Gamecube)

whdread

whdread 0.2 extracts the individual WAVs (PCM and DSP) from streams.wav in Hitman 2 (Gamecube), using the WHD files which contain the header information.

bfbs

bfbs 0.0 extracts the filesystem from sally.bf in Beyond Good & Evil (Gamecube, sally_clean.bf in the PC version)

wwdumpsnd

wwdumpsnd 0.4 extracts the sound effects and instrument samples from The Legend of Zelda: The Wind Waker. They are dumped as plain WAVs. To use, all the .aw files from /Audiores/Banks and JaiInit.aaf from /Audiores must be in the current directory when wwdumpsnd is run. 100 MB of WAVs are created.
0.3 fixes some issues with the format of the WAV.
0.4 adds Super Mario Sunshine support thanks to ichifish and Dolphin.
Note that there are some samples that sound quite off, such as in mboss_0.aw. I suspect that these are stereo (the vast majority are mono and that is all I handle) but I haven't worked it out yet.

degod, guessadx

degod 0.6 decrypts ADX files. It has support for God Hand, Okami, Killer7, Samurai Champloo, Blood+, Raiden III, Phantasy Star Universe (and the expansion), Senko no Ronde, NiGHTS: Journey of Dreams, and possibly others.
In case you come across a game that uses a different encryption key, degod has brute force key guessing functionality built in, but I recommend using guessadx 0.4 now, as it has a much better algorithm. 0.2 fixes an off-by-one array overwrite from 0.1, 0.3 cuts down the search space by an order of magnitude, 0.4 gets another 2x speed improvement.
Also, since r534 vgmstream has been able to decrypt files on the fly, using the set of keys built into degod, so you probably shouldn't bother with manually decrypting anymore.

lafs

lafs 0.3 extracts from AFS filesystems. It is missing many features but works OK in many cases.

xtract360

I've continued PI and Redline99's work on xtract360 (now at version 1.2) to fix some bugs. It extracts files from XBOX 360 disc images.

ast_multi

Similar to aix2adx, ast_multi 0.0 splits out multiple stereo streams from an AST (typically wth a filename ending in _multi.ast, found in Super Mario Galaxy).

thp audio ripper

FastElbja's thp audio ripper extract the audio track from .thp video files for playback in in_cube 0.30. The videos themselves work also, but this produces a smaller file (without the video).
And here's a standards compliant version, for those who want to build with something besides MSVC.

zwsrt

zwsrt 0.1 combines the header data from .srt files with the sample data from .ssd files to produce .zwdsp files which are playable in vgmstream. srt and ssd files are found in Zack & Wiki and other Capcom games for the Wii.

adx2wavmod3

adx2wavmod3v2 is a modification to bero's adx2wav which is much more accurate, especially with frequencies other than 44.1 kHz. Doesn't handle loops, just a straight decoder.

brsar tools

Note: Neither of these tools work very well.
brsar_unpack finds sounds in .brsar files and decodes them. This works moderately well with files it reports as "Version 1.3", those around the vintage of Super Smash Bros Brawl. For "Version 1.4" .brsars, you'll have better luck with ripping_mama, below.
Stereo sounds are skipped, and looping is ignored. Nothing is done with sequences.
ripping_mama 0.1 extracts .rwav sounds from .brsar files. It is effective with "Version 1.4" .brsars, such as those in the 2nd Cooking Mama (despite the name, the 1st Cooking Mama's .brsar doesn't work with ripping_mama, but it works with brsar_unpack). The .rwav files are playable in vgmstream since r563.

fsbii

fsbii 0.8 converts a multi-stream .fsb into a set of single-stream .fsbs, suitable for use with vgmstream. This is sometimes necessary for Wii games, thus the name. As of 0.5 it can also extract embedded FSBs from within (uncompressed) archives. 0.6 supports FSB4 and pads out the header.

dumplarc

dumplarc 0.0 extracts files from the simple LARC archive (.la) found in some doujin games.

strip_silence and strip_wav

strip_silence 0.1 removes silence at the end of .wav files, and prints a command to re-add the silence (with the included add_silence). It's intended for use with 44100 Hz 16-bit stereo PCM files, such as CD Audio. A nice feature is that it leaves a little silence at the end (1 second by default). This can be used to strip trailing silence from odd files, but retain the ability to re-add it and get the original file back.
strip_wav 0.1 is useful in some situations where strip_silence isn't, such as when the silence at the end of the file isn't entirely zeroes. It strips a number of bytes from the end of a .wav, by default 10 seconds worth of 44100 Hz 16-bit stereo PCM, regardless of whether they are perfectly silent. It also prints a command to restore the file; if the stripped bytes were all zero the command is add_silence (included), otherwise it backs up the original file and prints a copy command.

utf_tab suite

utf_tab 0.7 b3 is a set of tools for dealing with CRI's @UTF-table-based formats. utf_view shows the overall structure of such files, csb_extract extracts the contents of .csb files (often .aax audio), and cpk_unpack unpacks .cpk files (which also often contain .aax or .adx). usm_deinterleave deinterleaves .usm video files (with MPEG video and ADX audio, like the old Sofdec .sfd).
cpk_unpack is largely superseded by the CRI CPK script for QuickBMS.
usm_deinterleave is largely superseded by the USM functionality of VGMToolbox.

puff8, lzh8_cmpdec, romchu

puff8 0.0 decodes Huf8 (8 bit Huffman coding, as seen on the GBA). This was used to pack ADX files (along with other stuff) in Space Invaders Get Even for Wii Ware.

In the same vein is lzh8_cmpdec 0.8, which compresses and decompresses LZH8, used in Wii Virtual Console games. lzh8_cmp reproduces the original compression, while lzh8_cmp_nonstrict achieves slightly better compression than the original, retaining compatibility with the VC's decompressor.

Similarly romchu 0.6 decompresses romc and htmlc.arc (in Wii Virtual Console N64 titles) type 2, which also uses LZ77 and Huffman coding.

Revolution B

Similar in spirit to dkdsp, Revolution B 0.4 (or revb) creates .brstm files from mono standard .dsp. It can also extract .dsp from .brstm, and has an "examine" mode to only print out information.
I have observed a few variants on the general format; revb supports those that I've seen. When extracting or examining it will inform you of the options you would need to use to generate a .brstm with the same features. It also performs a good many consistency checks. If you intend to use it to replace music in a game, it is recommended that you extract an exsiting file to check that revb can generate a suitable replacement, and to find what options might be needed.
Notably revb does not attempt to fill the ADPC table, which I think is used for seeking.
0.2 adds some additional compatibility, and produces an instructive warning when a bad loop start is used. 0.3 supports extracting up to 8 channels. 0.4 fixes a silly error in the usage message and adds a readme.

guessfsb

guessfsb 0.3 guesses possible decryption keys for FSB files. It is fairly easy to find these keys by inspection, so this isn't really needed, but I felt compelled to make an attempt. Includes a utility to decrypt.

xma_parse

xma_parse 0.11 is a parser for XMA and XMA2 streams. It can export these (for use with tools that only handle one stream) and rebuild XMA2 and XMA streams as clean XMA (for picky decoders).

ww2ogg

ww2ogg 0.24 rebuilds some AudioKinetic Wwise RIFF (or RIFX) Vorbis files as standard Ogg Vorbis. Currently supports files from Assassin's Creed II, Army of Two: 40th Day, Mass Effect 2, and King of Fighters 12 for Xbox 360, as well as The Saboteur, Divinity 2, EVE Online, Mass Effect 2, and Star Wars The Force Unleashed II for PC, and many others. Exports loop points as Vorbis comments for use with vgmstream (rename .logg).
This is known to compute the granulepos incorrectly, so if you are using a player (such as foobar2000) which relies on the granulepos, you may wish to use revorb to fix the output from ww2ogg.

ea_multi_xma

ea_multi_xma 0.2 unpacks the variable-packet-size, multi-stream XMA and XMA2 streams common in EA games for the Xbox 360. It replaces unpack1943 which only worked on single-stream files. Supports Battlefield 1943, Battlefield: Bad Company, Battlefield: Bad Company 2, and Dante's Inferno, possibly others. For Dante's Inferno files, use "-o 20" on the command line to ignore the first 32 (0x20) bytes (a few files used a different offset, in all cases the offset is specified in the header at 0xC).

OggS Rain on Brooklyn

OggSrain 0.0 builds Ogg streams from the .mediastream_s files in Watchmen: The End is Nigh.

Pop360XMA, Creed360Soundforge

PoP360XMA 0.1 unpacks XMA streams from files like Common_BAO_0x00440f00 in Prince of Persia 2008 for Xbox 360. It doesn't actually do anything XMA-specific, it just deinterleaves the streams it finds. It also doesn't work on noninterleaved files. Also works for Avatar (360).
Creed360Soundforge 0.0 is essentially the same thing, for the earlier interleave format used in Assassin's Creed.

fsb_mpeg

fsb_mpeg 0.12 deinterleaves the padded MPEG audio streams increasingly used in FSB containers.

srt_inject_dsp

srt_inject_dsp 0.1 will replace streams within a .srt/.ssd set. It can use as input either another .srt or a pair of standard .dsp files. Has been used to replace songs in Tatsunoko vs. Capcom.

vid1_2ogg

vid1_2ogg 0.2 converts .ogg files beginning with VID1, from the Neversoft/Activision games Gun and Tony Hawk's American Wasteland (Gamecube versions, at least) to normal Ogg Vorbis.
This is known to compute the granulepos incorrectly, so if you are using a player (such as foobar2000) which relies on the granulepos, you may wish to use revorb to fix the output from vid1_2ogg.

h4m_audio_decode

h4m_audio_decode 0.3 decodes the IMA ADPCM audio from .h4m files found in some Gamecube games.

demux_dat

demux_dat 0.3 extracts audio from the .DAT files in Metal Gear Solid 3. Included is demux_dat_be which should work on Metal Gear Solid 4.

wwxmabnk

wwxmabnk 0.0 extracts XMA samples from some .WwiseBank files

xmash

xmash 0.8 is an all-in-one tool for XMA extraction and XMA2 to XMA rebuilding. It works on encrypted FSBs, RIFF, and (some) Wwise .bnk. The resulting files should be compatible with ToWav.
It is based on a bunch of other tools on this page, connected together to do all the thinking for you.
end