3 releases
0.5.2 | Oct 30, 2024 |
---|---|
0.5.1 | Oct 27, 2024 |
0.5.0 | Oct 27, 2024 |
#48 in #chapter
384 downloads per month
51KB
909 lines
ffprobe-rs
Simple wrapper for the ffprobe CLI utility, which is part of the ffmpeg tool suite.
This crate allows retrieving typed information about media files (images and videos)
by invoking ffprobe
with JSON output options and deserializing the data
into convenient Rust types.
Example
fn main() {
match ffprobe::ffprobe("path/to/video.mp4") {
Ok(info) => {
dbg!(info);
},
Err(err) => {
eprintln!("Could not analyze file with ffprobe: {:?}", err);
}
}
}
lib.rs
:
Simple wrapper for the ffprobe CLI utility, which is part of the ffmpeg tool suite.
This crate allows retrieving typed information about media files (images and videos)
by invoking ffprobe
with JSON output options and deserializing the data
into convenient Rust types.
match ffprobe::ffprobe("path/to/video.mp4") {
Ok(info) => {
dbg!(info);
},
Err(err) => {
eprintln!("Could not analyze file with ffprobe: {:?}", err);
},
}
Features
- streams
- format
- chapters
- async
Dependencies
~2–11MB
~108K SLoC