Skip to content
/ earwax Public
forked from danielrs/earwax

Audio decoding library for Rust based on ffmpeg

License

Notifications You must be signed in to change notification settings

vkahl/earwax

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

crates.io 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

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 for a detailed reference.

TODO

  • Add error handling to the spit function.

About

Audio decoding library for Rust based on ffmpeg

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C 58.0%
  • Rust 42.0%