https://github.com/probablykasper/redlux
AAC decoder for MPEG-4 and AAC files, with rodio support
https://github.com/probablykasper/redlux
aac audio decoder mp4 package
Last synced: about 1 year ago
JSON representation
AAC decoder for MPEG-4 and AAC files, with rodio support
- Host: GitHub
- URL: https://github.com/probablykasper/redlux
- Owner: probablykasper
- License: mit
- Created: 2021-01-31T00:45:32.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2024-02-15T06:32:15.000Z (over 2 years ago)
- Last Synced: 2025-04-22T21:02:49.393Z (about 1 year ago)
- Topics: aac, audio, decoder, mp4, package
- Language: Rust
- Homepage:
- Size: 302 KB
- Stars: 18
- Watchers: 3
- Forks: 2
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# redlux
[](https://crates.io/crates/redlux)
[](https://docs.rs/redlux)
AAC decoder for MPEG-4 (MP4, M4A etc) and AAC files, with rodio support
Reads MPEG-4 containers using [rust-mp4](https://crates.io/crates/mp4), and then constructs ADTS headers for it. Decodes AAC to PCM using [fdk-aac c-bindings](https://crates.io/crates/fdk-aac). Check the examples for usage with [rodio](https://crates.io/crates/rodio).
Supports AAC-LC, HE-AAC v1 (SBR) and HE-AAC v2 (PS).
## Caveats
Would appreciate any help with figuring these out:
1. It only decodes the first AAC track it finds in an MPEG-4 container.
2. MPEG files with CRC are probably not supported.
3. According to [this MultimediaWiki page](https://wiki.multimedia.cx/index.php/ADTS), 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?
4. Not sure about the licensing situation. Is fdk-aac free to use? Are AAC patent licenses needed?
## Dev instructions
### Get started
Install [Rust](https://www.rust-lang.org).
Run tests:
```
cargo test
```
Build:
```
cargo build
```
### Releasing a new version
1. Update `CHANGELOG.md`
2. Bump the version number in `Cargo.toml`
3. Run `cargo test`
4. Run `cargo publish`
5. Create a git tag in format `v#.#.#`
6. Create GitHub release with release notes