7 releases (breaking)
0.7.0 | Jun 4, 2023 |
---|---|
0.6.0 | Feb 4, 2023 |
0.5.0 | Apr 5, 2022 |
0.4.0 | Jun 9, 2021 |
0.1.0 | Feb 1, 2021 |
#802 in Audio
172 downloads per month
220KB
303 lines
redlux
AAC decoder for MPEG-4 (MP4, M4A etc) and AAC files, with rodio support
Reads MPEG-4 containers using rust-mp4, and then constructs ADTS headers for it. Decodes AAC to PCM using fdk-aac c-bindings. Check the examples for usage with rodio.
Supports AAC-LC, HE-AAC v1 (SBR) and HE-AAC v2 (PS).
Caveats
Would appreciate any help with figuring these out:
- It only decodes the first AAC track it finds in an MPEG-4 container.
- MPEG files with CRC are probably not supported.
- According to this MultimediaWiki page, 13 bits of the ADTS header is for specifying the frame length, and this number must include the ADTS header itself. For 8 channel audio, I would assume the frame length could be 8192 bytes, and if we add the header bytes on top of that, it would exceed what 13 bits can carry. Is this a potential issue?
- Not sure about the licensing situation. Is fdk-aac free to use? Are AAC patent licenses needed?
Dev instructions
Get started
Install Rust.
Run tests:
cargo test
Build:
cargo build
Releasing a new version
- Update
CHANGELOG.md
- Bump the version number in
Cargo.toml
- Run
cargo test
- Run
cargo publish
- Create a git tag in format
v#.#.#
- Create GitHub release with release notes
Dependencies
~9–39MB
~579K SLoC