1
0
Fork 0
mirror of https://github.com/alfg/mp4-rust.git synced 2024-12-23 04:26:27 +00:00
mp4-rust/examples/mp4info.rs

24 lines
No EOL
456 B
Rust

extern crate mp4;
use std::env;
use std::fs::File;
fn main() {
let args: Vec<String> = env::args().collect();
match args.len() {
2 => {
let filename = &args[1];
let f = File::open(filename).unwrap();
let bmff = mp4::read_mp4(f);
// Print results.
println!("{:?}", bmff.unwrap());
},
_ => {
println!("Usage: mp4info <filename>");
}
}
}