video-metadata 0.1.1

Video metadata parser
docs.rs failed to build video-metadata-0.1.1
Please check the build logs for more information.
See Builds for ideas on how to fix a failed build, or Metadata for how to configure docs.rs builds.
If you believe this is docs.rs' fault, open an issue.
Visit the last successful build: video-metadata-0.1.2

video-metadata-rs Build Status Build status

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

  • WebM
  • MP4
  • Ogg

Other video/file types will return an error.

Example

extern crate video_metadata;

use video_metadata::enums;

fn main() {
    match video_metadata::get_format("your_video_file") {
        enums::Result::Complete(m) => {
            println!("format: {:?}", m.format);
            println!("duration: {:?}", m.duration);
            println!("size: {}x{}", m.size.width, m.size.height);
            println!("video codec: {}", m.video);
            if let Some(audio) = m.audio {
                println!("audio codec: {}", audio);
            }
        }
        enums::Result::Unknown(s) => {
            println!("Unknown format: '{}'", s);
        }
    };
}

Warning

Please note that I'm using the version 3 of the following libraries:

  • libavformat
  • libavcodec
  • libavutil

You can find more information on their repository.