cridecoder
A pure Rust library for CRI Middleware codec decoding. Supports ACB/AWB audio containers, HCA (High Compression Audio) decoding, and USM video container extraction.
Credits
This project's CRI format implementation is based on and inspired by vgmstream, a library for playing streamed audio from video games. Many thanks to the vgmstream contributors for their reverse-engineering work on CRI Middleware formats.
Features
- ACB/AWB Extraction — Parse CRI ACB audio containers and extract embedded/external audio tracks
- HCA Decoding — Decode HCA audio to PCM samples (f32 or i16) or WAV files
- USM Extraction — Extract MPEG2 video and ADX audio streams from USM video containers
- USM Metadata — Read and export USM metadata as structured JSON
- Key Testing — Test decryption keys for encrypted HCA files
- Pure Rust — No C dependencies, works on any platform Rust supports
Usage
Add to your Cargo.toml:
[]
= "0.1"
ACB Extraction
use Path;
use extract_acb_from_file;
let tracks = extract_acb_from_file.unwrap;
if let Some = tracks
HCA to WAV
use File;
use HcaDecoder;
let mut decoder = from_file.unwrap;
let info = decoder.info;
println!;
let mut output = create.unwrap;
decoder.decode_to_wav.unwrap;
USM Extraction
use Path;
use extract_usm_file;
let files = extract_usm_file.unwrap;
for file in &files
Supported Formats
| Format | Description | Operation |
|---|---|---|
| ACB | CRI Audio Container | Extract embedded HCA/ADX tracks |
| AWB | CRI Audio Waveform Bank | External track storage for ACB |
| HCA | High Compression Audio | Decode to WAV/PCM |
| USM | CRI Video Container | Extract M2V video + ADX audio |
License
MIT