#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 77/week @ 2018-05-18 85/week @ 2018-05-25 105/week @ 2018-06-01 82/week @ 2018-06-08 89/week @ 2018-06-15 65/week @ 2018-06-22 139/week @ 2018-06-29 85/week @ 2018-07-06 116/week @ 2018-07-13 143/week @ 2018-07-20 168/week @ 2018-07-27 143/week @ 2018-08-03 193/week @ 2018-08-10

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