LinuxCommandLibrary

vgmstream_cli

Convert game audio files to playable formats

TLDR

Decode an adc file to wav. (Default output name is input.wav)

$ vgmstream_cli [path/to/input.adc] -o [path/to/output.wav]
copy

Print metadata without decoding the audio
$ vgmstream_cli [path/to/input.adc] -m
copy

Decode an audio file without loops
$ vgmstream_cli [path/to/input.adc] -o [path/to/output.wav] -i
copy

Decode with three loops, then add a 3s delay followed by a 5s fadeout
$ vgmstream_cli [path/to/input.adc] -o [path/to/output.wav] -l [3.0] -f [5.0] -d [3.0]
copy

Convert multiple files to bgm_(original name).wav (Default -o pattern is ?f.wav)
$ vgmstream_cli -o [path/to/bgm_?f.wav] [path/to/file1.adc] [path/to/file2.adc]
copy

Play the file looping endlessly (channels and rate must match metadata)
$ vgmstream_cli [path/to/input.adc] -pec | aplay --format cd --channels [1] --rate [44100]
copy

SYNOPSIS

vgmstream_cli [options] input_file(s)

PARAMETERS

-o
    Specify the output filename or directory. If a directory is provided and the input is a list of files, outputs will be based on the input filenames.

-p
    Play the input file using the default audio player (typically through SDL or similar).

-w
    Output to WAV format (default).

-v
    Verbose mode: enables detailed output during decoding.

-l
    Set the number of loops. -1 means infinite loops. Default is 0.

-s
    Set the play time in seconds. Overrides loop count.

-m
    Set the fade time in seconds (applies only if looping).

-f
    Force a specific codec when multiple options are available.

-d
    Dump the audio stream data to stdout (raw audio data).

-c
    Force number of channels.

-r
    Set sample rate.

-q
    Codec quality level (vorbis, mp3, etc.).

-t
    Set file tags, like track name, artist, game, etc. Multiple tags accepted.

DESCRIPTION

vgmstream_cli is a command-line tool part of the vgmstream library, primarily designed for converting and playing audio files from various video game formats. Many game soundtracks use proprietary or less common audio formats that standard media players cannot handle. vgmstream provides a way to decode and play these files, converting them to more widely supported formats like WAV or OGG Vorbis.

It supports a wide array of audio formats found in games across different platforms. The tool is essential for audio preservation, modding, and analyzing game audio assets. vgmstream_cli is built with flexibility in mind, allowing users to customize the conversion process with various options for sample rate, loop settings, and output format.

CAVEATS

The availability of certain format options might depend on the specific version of vgmstream and the codecs it supports. Some files might not be decoded correctly due to unsupported formats or encryption.

USAGE EXAMPLES

  • Convert a file to WAV: vgmstream_cli input.adx -o output.wav
  • Play a file using the default player: vgmstream_cli -p input.mus
  • Convert a file to OGG with 2 loops: vgmstream_cli -l 2 input.str -o output.ogg
  • Display verbose information: vgmstream_cli -v input.fsb

DEPENDENCIES

vgmstream_cli depends on the core vgmstream library and may require additional codecs or libraries depending on the formats you intend to decode, such as libvorbis, libogg, or libmpg123.

HISTORY

vgmstream began as a hobby project to decode game audio and grew into a widely used library. vgmstream_cli was introduced as a command-line interface for the library. It greatly simplifies the process of audio extraction and conversion, enhancing vgmstream's utility to the gaming community and audio preservationists. Its development focuses on supporting a growing number of esoteric audio formats found in video games, making it an essential tool for archival purposes.

SEE ALSO

ffmpeg(1), sox(1)

Copied to clipboard