mirror of
https://codeberg.org/demostf/parser.git
synced 2026-06-03 10:14:06 +02:00
Parsing of tf2 demo files
- Rust 99.8%
- Nix 0.2%
When quality is 255, an extra field is included in the VoiceInit message. This field is the sampling rate for the voice codec selected. This commit simply renames that field from `extra_data` as it is currently known. Interestingly, this field is present, but doesn't match when CELT HQ is used. If `sv_voicecodec = vaudio_celt_high` on the server, the sampling rate is still specified as 22050 Hz(as for CELT non-HQ) rather than the expected 44100 Hz. The client code will instead look for `vaudio_celt` and `vaudio_celt_high` as codec name, and use these to to index a lookup table that specifies the correct sampling rate and frame size. For `vaudio_celt` 22050 Hz with 512 samples per frame is used, while `vaudio_celt_high` uses 44100 Hz with 1024 samples per frame. |
||
|---|---|---|
| benches | ||
| codegen | ||
| data | ||
| fuzz | ||
| smoker | ||
| src | ||
| tests | ||
| .gitignore | ||
| .travis.yml | ||
| Cargo.lock | ||
| Cargo.toml | ||
| pgo_build.sh | ||
| README.md | ||
| rustig.toml | ||
TF Demo Parser
Parsing of tf2 demo files
Building
This project is build using rust and requires cargo and friends, see the rust website
for how to get started.
Once rust is setup building is as simple as
cargo build --release
which will place the binary at target/release/parse_demo
Usage
Basic usage is as simple as parse_demo demofile.dem which will output a "summary" of the demo file in JSON format.