ww2ogg-rs
A Rust library and CLI tool for converting Wwise RIFF/RIFX Vorbis audio files (.wem) to standard Ogg Vorbis format.
This is a Rust port of ww2ogg, providing the same functionality with Rust's safety and performance benefits.
Features
- Convert Wwise audio files (.wem) to standard Ogg Vorbis (.ogg)
- Support for both RIFF (little-endian) and RIFX (big-endian) containers
- Built-in codebook libraries (standard and aoTuV 6.03)
- Audio validation to detect wrong codebook selection
- Library API for integration into other projects
- Command-line tool for batch conversion
Installation
From Source
The binary will be at target/release/ww2ogg.exe (Windows) or target/release/ww2ogg (Linux/macOS).
Usage
Command Line
# Basic conversion (auto-detects codebook, validates output)
# Specify output file
# Use aoTuV codebooks (for some games)
# Use custom codebook file
# Use inline codebooks (embedded in the .wem file)
# Force packet format
Library
Add to your Cargo.toml:
[]
= { = "ww2ogg" }
Basic usage:
use File;
use ;
use ;
Codebook Selection
Different games use different codebook libraries. If conversion produces garbled audio:
// Try default codebooks first (most common)
let codebooks = default_codebooks?;
// If that doesn't work, try aoTuV
let codebooks = aotuv_codebooks?;
// Or load custom codebooks from a file
let codebooks = from_file?;
Validation
Verify converted audio is valid:
use validate;
let ogg_data: = /* converted audio */;
validate?; // Returns error if audio is corrupted
Builder Pattern
For advanced configuration:
use ;
let input = open?;
let codebooks = aotuv_codebooks?;
let mut converter = builder
.inline_codebooks
.full_setup
.force_packet_format
.build?;
Project Structure
ww2ogg-rs/
├── ww2ogg/ # Core library
│ └── src/
│ ├── lib.rs # Public API
│ ├── wwise_riff_vorbis.rs # Main converter
│ ├── codebook.rs # Codebook library
│ ├── validator.rs # Audio validation
│ └── ... # Internal modules
└── ww2ogg-cli/ # Command-line tool
└── src/
└── main.rs
License
This project is a Rust port of ww2ogg. See the original project for licensing details.
Acknowledgments
- hcs64/ww2ogg - Original C++ implementation
- Wwise - Audiokinetic's audio middleware