Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/danielrs/earwax
Audio decoding library for Rust based on ffmpeg
https://github.com/danielrs/earwax
audio-decoder ffmpeg library rust
Last synced: 22 days ago
JSON representation
Audio decoding library for Rust based on ffmpeg
- Host: GitHub
- URL: https://github.com/danielrs/earwax
- Owner: danielrs
- License: mit
- Created: 2017-04-04T02:04:38.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2017-08-24T06:51:10.000Z (over 7 years ago)
- Last Synced: 2025-01-14T01:30:20.571Z (29 days ago)
- Topics: audio-decoder, ffmpeg, library, rust
- Language: C
- Size: 3.76 MB
- Stars: 7
- Watchers: 2
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
[crates.io]: https://crates.io/crates/earwax
[docs.rs]: https://docs.rs/earwax[![crates.io](https://img.shields.io/crates/v/earwax.svg)][crates.io]
[![docs.rs](https://docs.rs/earwax/badge.svg)][docs.rs]Audio decoding library based on ffmpeg 2.8. The purpose of this library is
to provide a safe and simple way of converting any audio input to raw PCM data.## Dependencies
From ffmpeg 2.8, the required libraries are `libavcodec`, `libavformat`, and `libavdevice`.
## Usage
```rust
extern crate earwax;use earwax::Earwax;
fn main() {
let mut earwax = Earwax::new("[URL]").unwrap();
while let Some(chunk) = earwax.spit() {
// Do something with chunk.data, an array of raw pcm data.
println!("Time: {}", chunk.time.seconds()); // or chunk.time.pts().
}
}
```Check the [documentation][docs.rs] for a detailed reference.
## TODO
* Add error handling to the `spit` function.