vgmstream is a high-accuracy audio decoding library designed to playback various streamed audio formats used in video games. It supports hundreds of game music codecs and file formats, providing precise reproduction of prerecorded game audio.
Key Features:
Accurate decoding of looped BGM with seamless transitions
Support for subsongs within files for separate playback
Handling of companion files and custom containers
Decoding of encrypted audio streams
TXTH/TXTP support for external format definitions
Tagging via .m3u files
Integration with popular media players through plugins
Ideal for retro gaming enthusiasts, researchers, and digital preservationists seeking to accurately reproduce game audio. The library enables integration with various platforms and media players while maintaining high fidelity to the original audio experience.
vgmstream can be installed on Windows using winget.
README
vgmstream
This is vgmstream, a library for playing streamed (prerecorded) video game audio.
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 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.
The main library (plain vgmstream) is the code that handles the internal conversion, while the
above components are what you use to get sound.
Usage
If you want to convert game audio to .wav, get vgmstream-cli then drag-and-drop one
or more files to the executable (support may vary per O.S. or distro). This should create
(file.extension).wav, if the format is supported. You can also try the online web player
instead. See: https://vgmstream.org
More user-friendly would be installing a player like foobar2000 (on Windows) or Audacious
(on Linux) and the vgmstream plugin. Then you can directly listen your files and set options like
infinite looping, or convert to .wav with the player's options (also easier to use if your file
has multiple "subsongs").
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 parts on vgmstream's side or lack of support in the player.
Note that vgmstream cannot encode (convert from .wav to a game format), it only decodes
(plays game audio).
Building from source will also give you vgmstream.so (Audacious plugin), and vgmstream123
(command-line player), which can't be statically linked.
When building it needs several external libraries. For a quick script for Debian and Ubuntu-style
distros run ./make-build-cmake.sh. The script will need to install dependencies first, so you
may prefer to run steps manually, which the build guide describes in detail.