Skip to main content
ZZAR’s audio system requires specific formats at different stages. This guide explains how audio conversion works and how to troubleshoot common issues.

Audio Format Overview

FormatPurposeConversion Tool
WEMGame audio format (Wwise Encoded Media)vgmstream, FFmpeg
WAVIntermediate format for editingFFmpeg
MP3/FLAC/OGGSource formats for your custom audioFFmpeg

Typical Conversion Pipeline

Your Audio (MP3/FLAC/OGG/WAV)
  ↓ [FFmpeg]
Normalized WAV (48kHz, 16-bit)
  ↓ [Wwise]
WEM (game format)
  ↓ [ZZAR]
Packed into .pck files

Converting Game Audio to WAV (WEM → WAV)

ZZAR automatically converts .wem files to .wav when you play or preview audio in the Audio Browser.

How it works

  1. vgmstream is tried first (best compatibility with Wwise WEM format)
  2. If vgmstream fails, FFmpeg is used as a fallback
  3. Output is 48kHz, 16-bit PCM WAV
# From src/audio_converter.py:86
def wem_to_wav(self, wem_file, output_file=None):
    # Try vgmstream first
    subprocess.run([
        self.vgmstream_path,
        '-o', str(output_file),
        str(wem_file)
    ])
    
    # Fallback to ffmpeg
    subprocess.run([
        self.ffmpeg_path,
        '-i', str(wem_file),
        '-acodec', 'pcm_s16le',
        '-ar', '48000',
        '-y', str(output_file)
    ])
Some WEM files use proprietary Wwise codecs that only vgmstream can decode. If you get errors with FFmpeg, install vgmstream.

Converting Your Audio to WAV (Any → WAV)

When you select a replacement audio file in the Audio Browser, ZZAR converts it to WAV automatically.

Supported Input Formats

  • MP3
  • FLAC
  • OGG
  • M4A
  • AAC
  • Opus
  • WMA
  • WAV (re-encoded to standardize format)

Conversion Settings

  • Sample Rate: 48000 Hz (game standard)
  • Channels: 2 (stereo)
  • Bit Depth: 16-bit PCM
  • Normalization: Enabled by default (target: -9 LUFS)
# From src/audio_converter.py:175
ffmpeg -i input.mp3 \
  -af "loudnorm=I=-9:TP=-1.5:LRA=11" \
  -acodec pcm_s16le \
  -ar 48000 \
  -ac 2 \
  -y output.wav

Why Normalization Matters

Normalization ensures your audio has consistent volume with the game’s original audio:
  • -9 LUFS is the target loudness (standard for games)
  • -1.5 dB True Peak prevents clipping
  • 11 LU is the loudness range (preserves dynamics)
You can toggle normalization in the Audio Browser settings. Disable it if you’ve already mastered your audio to game levels.

Converting WAV to WEM (WAV → WEM)

This is the final step before packing audio into the game. ZZAR uses Wwise for this conversion.
1

Ensure Wwise is Installed

Go to Settings and click Install Wwise. See Setup & Configuration for details.
2

Convert via Audio Browser

When you select a replacement audio file, ZZAR:
  1. Converts your file to WAV
  2. Calls WwiseConsole.exe to convert WAV → WEM
  3. Stages the WEM for inclusion in the mod
# From src/audio_converter.py:196
def wav_to_wem(self, wav_file, output_file=None, wwise_dir=None):
    wwise = WwiseConsole(wwise_dir)
    result_wem = wwise.convert_to_wem(wav_file, output_dir)
    return result_wem
Wwise is required to create mods. Without it, ZZAR can browse and play audio, but cannot generate .wem files.

Batch Conversion

ZZAR supports batch conversion for advanced workflows:

Batch WEM → WAV

python -m src.audio_converter extracted/ --mode=wem2wav
Converts all .wem files in extracted/ to extracted/wav/.

Batch Audio → WAV

python -m src.audio_converter my_music/ --mode=any2wav
Converts all audio files (MP3, FLAC, OGG, etc.) to WAV with normalization.

Batch WAV → WEM

python -m src.audio_converter wav_folder/ --mode=wav2wem
Converts all .wav files to .wem using Wwise. Requires Wwise installation.
Batch conversion from the command line is for advanced users. Most users should use the GUI workflows.

Troubleshooting

”Audio conversion tools not found”

On Windows, install FFmpeg and vgmstream from Settings. On Linux:
# Arch Linux
sudo pacman -S ffmpeg vgmstream

# Ubuntu/Debian
sudo apt install ffmpeg vgmstream-cli

“Failed to convert <file>.wem”

Cause: The WEM file uses a codec that neither vgmstream nor FFmpeg can decode. Solution:
  • Ensure vgmstream is installed (FFmpeg alone is often not enough)
  • Check that the WEM file is not corrupted
  • Try extracting the WEM from the PCK again

”Wwise is not installed”

Cause: You’re trying to create a mod but Wwise is missing. Solution: Go to Settings > Install Wwise and follow the installation prompts. See Setup & Configuration.

Audio is too quiet or too loud in-game

Cause: Normalization was disabled or your source audio has extreme levels. Solution:
  • Enable normalization in Audio Browser settings
  • Use an audio editor (Audacity, Audition) to manually level your audio to -9 LUFS before importing

”WEM files require vgmstream-cli for conversion”

Cause: FFmpeg cannot decode this WEM file’s codec. Solution:
# Arch Linux (AUR)
yay -S vgmstream-cli-bin

# Ubuntu/Debian
sudo apt install vgmstream-cli

# Or build from source
git clone https://github.com/vgmstream/vgmstream
cd vgmstream
mkdir build && cd build
cmake ..
make
sudo make install

Advanced: Manual Conversion

For complete control, you can manually convert audio outside ZZAR:

Extract WEM from PCK

python -m src.pck_extractor game/audio/MyFile.pck output_dir/

Convert WEM → WAV

vgmstream-cli -o output.wav input.wem
# or
ffmpeg -i input.wem -acodec pcm_s16le -ar 48000 output.wav

Edit in DAW

Edit output.wav in your favorite audio editor:
  • Adobe Audition
  • Audacity
  • Reaper
  • FL Studio
Export as 48kHz, 16-bit WAV.

Convert WAV → WEM

Use Wwise console:
WwiseConsole.exe convert-wav-to-wem input.wav -o output.wem

Package into ZZAR Mod

Use the Import Wizard with “Import WEM Files by ID” mode.
Manual conversion is only needed for advanced workflows. The Audio Browser handles all conversions automatically for most users.

Build docs developers (and LLMs) love