8 releases
Uses old Rust 2015
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 |
#204 in Video
3.5MB
371 lines
video-metadata-rs
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());
}
}
}