3 releases
Uses old Rust 2015
0.1.2 | Jul 4, 2016 |
---|---|
0.1.1 | Jul 4, 2016 |
0.1.0 | Jul 2, 2016 |
#424 in Video
3MB
462 lines
video-metadata-rs
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.