This is vgmstream, a library for playing streamed (prerecorded) video game audio.
Some of vgmstream’s features:
Hundreds of video game music formats and codecs, from typical game engine files to obscure single-game codecs, aiming for high accuracy and compatibility.
Support for looped BGM, using file’s internal metadata for smooth transitions, with accurate sample counts.
Subsongs, playing a format’s multiple internal songs separately.
Many types of companion files (data split into multiple files) and custom containers.
Encryption keys, internal stream names, and many other unusual cases found in game audio.
TXTH function, to add external support for extra formats, including raw audio in many forms.
TXTP function, for real-time and per-file config, like forced looping, removing channels, playing certain subsong, or fusing multiple files into a single one.
Simple external tagging via .m3u files.
Plugins are available for various media player software and operating systems.
The main development repository: https://github.com/vgmstream/vgmstream/
Automated builds with the latest changes: https://dl.vgmstream.org
Common releases: https://github.com/vgmstream/vgmstream/releases
Help can be found here: https://www.hcs64.com/
More documentation: https://github.com/vgmstream/vgmstream/tree/master/doc
There are multiple end-user components:
test.exe/vgmstream-cli: A command-line decoder.
in_vgmstream: A Winamp plugin.
foo_input_vgmstream: A foobar2000 component.
xmp-vgmstream: An XMPlay plugin.
vgmstream.so: An Audacious plugin.
vgmstream123: A command-line player.
The main library (plain vgmstream) is the code that handles the internal conversion, while the above components are what you use to get sound.
If you just want to convert game audio to
.wav, easiest would be getting test.exe/vgmstream-cli (see
below) then drag-and-drop one or more files to the executable. This should create
if the format is supported. More usable would be installing a music player like foobar2000 (for
Windows) or Audacious (for Linux) then the appropriate component, so you can listen to VGM without
converting and set options like infinite looping.
See components in the usage guide for full install instructions and explanations. The aim is feature parity, but there are a few differences between them due to missing implementation on vgmstream’s side or lack of support in target player or API.
Note vgmstream cannot encode (convert from
.wav to some video game format), it only decodes
(plays game audio).
You should get
vgmstream-win.zip, which also bundles various components, or
foo_input_vgmstream.fb2k-component for the installable foobar2000 plugin from the
latest prebuilt binaries on our website:
You can also get them from the less frequently updated releases on GitHub:
If the above links fail, you may also try the alternative, somewhat recent versions built by bnnm:
If you prefer, you may compile the components from source as well, see the build guide for more information.
For convenience, releases distribute a command-line decoder in
vgmstream-cli.zip. It is
statically linked and should work on all systems running Linux kernel v3.2 and above.
Building from source will also give you vgmstream.so, an Audacious plugin, and vgmstream123, a command-line player.
When building from source code, many components have to be installed or compiled separately. The
build guide describes this process in more detail. For a quick build on Debian and
Ubuntu-style distributions, run
./make-build-cmake.sh. The script will be installing various
dependencies, so you may prefer to copy the commands from the file and run them one by one.
Please follow the build guide.
- Web version
- 1. Usage
- 1.1. Needed extra files
- 1.2. Components
- 1.2.1. test.exe/vgmstream-cli (command line decoder)
- 1.2.2. in_vgmstream (Winamp plugin)
- 1.2.3. foo_input_vgmstream (foobar2000 plugin)
- 1.2.4. xmp-vgmstream (XMPlay plugin)
- 1.2.5. Audacious plugin
- 1.2.6. vgmstream123 (command line player)
- 1.3. Special cases
- 1.3.1. Subsongs
- 1.3.2. Common and unknown extensions
- 1.3.3. Demuxed videos
- 1.3.4. Companion files
- 1.3.5. Decryption keys
- 1.3.6. Artificial files
- 1.3.7. Plugin conflicts
- 1.3.8. Channel issues
- 1.3.9. Average bitrate
- 1.3.10. Containers
- 1.3.11. Cue formats
- 1.4. Logged errors and unplayable supported files
- 1.5. Tagging
- 1.6. Virtual TXTP files
- 1.7. Sequences and streams
- 2. Supported file types
- 3. Supported codec types
- 4. vgmstream build help
- 4.1. Compilation requirements
- 4.2. Quick guide
- 4.3. Full guide
- 4.4. Compiling modules
- 4.5. Shared lib
- 4.6. External libraries
- 5. TXTH format
- 5.1. Example of a TXTH file
- 5.2. Issues
- 5.3. Available commands
- 5.3.1. VALUES
- 5.3.2. KEYS
- 188.8.131.52. CODEC [REQUIRED]
- 184.108.40.206. CODEC VARIATIONS
- 220.127.116.11. (deprecated) VALUE MODIFIERS
- 18.104.22.168. INTERLEAVE / FRAME SIZE [REQUIRED depending on codec]
- 22.214.171.124. INTERLEAVE IN THE LAST BLOCK
- 126.96.36.199. INTERLEAVE IN THE FIRST BLOCK
- 188.8.131.52. ID VALUES
- 184.108.40.206. NUMBER OF CHANNELS [REQUIRED]
- 220.127.116.11. MUSIC FREQUENCY [REQUIRED]
- 18.104.22.168. DATA START
- 22.214.171.124. DATA SIZE
- 126.96.36.199. DATA PADDING
- 188.8.131.52. SAMPLE MEANINGS
- 184.108.40.206. SAMPLE VALUES [REQUIRED (num_samples)]
- 220.127.116.11. LOOP SETTINGS
- 18.104.22.168. LOOP START/END MODIFIER
- 22.214.171.124. ENCODER DELAY
- 126.96.36.199. DSP DECODING COEFFICIENTS [REQUIRED for DSP]
- 188.8.131.52. ADPCM STATE
- 184.108.40.206. HEADER/BODY SETTINGS
- 220.127.116.11. SUBSONGS
- 18.104.22.168. NAMES
- 22.214.171.124. SUBFILES
- 126.96.36.199. CHUNK DEINTERLEAVING
- 188.8.131.52. NAME TABLE
- 184.108.40.206. BASE OFFSET MODIFIER
- 220.127.116.11. MULTI-TXTH
- 5.4. Complex usages
- 5.5. Examples
- 5.5.1. Spy Hunter (GC) .pcm.txth
- 5.5.2. Pitfall The Lost Expedition (PC) .txth
- 5.5.3. Aladdin in Nasira’s Revenge (PS1) .cvs.txth
- 5.5.4. Kim Possible: What’s the Switch (PS2) .str.txth
- 5.5.5. Kaiketsu Zorori: Mezase! Itazura King (PS2) .txth
- 5.5.6. Colin McRae DiRT (PC) .wip.txth
- 5.5.7. Manhunt (Xbox) .rib.txth
- 5.5.8. Ultimate Board Game Collection (Wii) .dsp.txth
- 5.5.9. Shikigami no Shiro - Nanayozuki Gensoukyoku (PS2) bgm.txth
- 5.5.10. Dragon Poker (Mobile) .snd.txth
- 5.5.11. Simple 2000 Series Vol. 120 - The Saigo no Nihonhei (PS2) .xag.txth
- 5.5.12. Grandia (PS1) bgm.txth
- 5.5.13. Zack & Wiki (Wii) .ssd.txth
- 5.5.14. Zack & Wiki (Wii) st_s01_00a.txth
- 5.5.15. Croc (SAT) .asf.txth
- 5.5.16. Marvel Super Heroes vs Street Fighter (SAT) .ADP.txth
- 5.5.17. Sonic CD (SCD) .stm.txth
- 5.5.18. Sega Rally 3 (SAT) ALL_SOUND.txth
- 5.5.19. Sega Rally 3 (PC) EnglishStream.txth
- 5.5.20. Starsky & Hutch (PS2) MUSICPS2.WAD.txth
- 5.5.21. Fatal Frame (Xbox) .mwa.txth
- 5.5.22. Machi-ing Maker 4 (X360) .xma.txth
- 5.5.23. Grand Theft Auto: San Andreas (PS2) .vgmstream.txth
- 5.5.24. LEGO Batman 2 (Wii) .fmv.txth
- 6. TXTP format
- 6.1. TXTP MODES
- 6.2. TXTP COMMANDS
- 6.3. OTHER FEATURES
- 6.4. TXTP PARSING
- 6.5. MINI-TXTP
- 6.6. GROUPS
- 6.7. MIXING
- 6.8. UNDERSTANDING PLAY CONFIG AND FINAL TIME