8 releases

0.1.7 Aug 9, 2018
0.1.6 Nov 28, 2017
0.1.4 Sep 19, 2017
0.1.3 Mar 2, 2017
0.1.1 Aug 31, 2016

#38 in Video

Download history 30/week @ 2018-11-12 13/week @ 2018-11-19 72/week @ 2018-11-26 16/week @ 2018-12-03 14/week @ 2018-12-10 15/week @ 2018-12-17 53/week @ 2018-12-24 4/week @ 2018-12-31 15/week @ 2019-01-07 5/week @ 2019-01-14 2/week @ 2019-01-21 3/week @ 2019-01-28 7/week @ 2019-02-04 4/week @ 2019-02-11 9/week @ 2019-02-18

496 downloads per month

MIT license

3.5MB
371 lines

video-metadata-rs Build Status Build status

This library provides a little wrapper to get the metadata of the following video:

  • WebM (to be done)
  • MP4
  • Ogg

And the following audio formats:

  • Ogg
  • MP3

Other video/file types will return an error.

Example

extern crate audio_video_metadata;

use audio_video_metadata::{Metadata, get_format_from_file};

fn main() {
    match get_format_from_file("assets/small.ogg") {
        Ok(c::Video(m)) => {
            println!("{:?}: {}x{}", m.format, m.dimensions.width, m.dimensions.height);
        }
        Ok(Metadata::Audio(m)) => {
            println!("{:?}", m.format, m.duration.unwrap_or("None".to_owned()));
        }
        Err(err) => {
            println!("Got error: {}", err.error_description());
        }
    }
}

Dependencies