3 releases
Uses new Rust 2024
new 0.0.3 | May 16, 2025 |
---|---|
0.0.2 | May 15, 2025 |
0.0.1 | May 14, 2025 |
#471 in Audio
45 downloads per month
Used in 2 crates
145KB
3K
SLoC
Revorbis-rs
A try to rewrite libvorbis in Rust.
My main target
Firstly I'm not going to reinvent the Vorbis wheel, I just want to use libvorbis
to encode/decode the Ogg Vorbis audio files.
But one day, I had to face the non-capsulated naked Vorbis file. libvorbis
fails to decode this kind of audio, it must need the Ogg encapsulation or Matroska.
I've tried to re-encapsulate the naked Vorbis file using Ogg
, but then I found out that I need two things:
- The Vorbis packet length, which can only be obtained by decoding the bitwise Vorbis packet.
- The granule position for each Vorbis packet.
So I'm now re-inventing the Vorbis wheel in Rust.
Currently I've done parsing the Vorbis headers:
#[derive(Debug, Default, Clone, PartialEq)]
pub struct VorbisSetupHeader {
pub static_codebooks: CodeBooks,
pub floors: Vec<VorbisFloor>,
pub residues: Vec<VorbisResidue>,
pub maps: Vec<VorbisMapping>,
pub modes: Vec<VorbisMode>,
}
Dependencies
~0–17MB
~277K SLoC