#video #metadata #audio #parse

audio-video-metadata

Audio/Video metadata parser

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

#3 in Video

Download history 157/week @ 2018-08-21 282/week @ 2018-08-28 186/week @ 2018-09-04 148/week @ 2018-09-11 151/week @ 2018-09-18 163/week @ 2018-09-25 173/week @ 2018-10-02 240/week @ 2018-10-09 144/week @ 2018-10-16 31/week @ 2018-10-23 6/week @ 2018-10-30 65/week @ 2018-11-06 26/week @ 2018-11-13

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