7 unstable releases
0.4.0 | Apr 3, 2024 |
---|---|
0.3.3 | Sep 5, 2022 |
0.3.2 | Apr 23, 2022 |
0.3.0 | Aug 2, 2021 |
0.1.0 | Jan 16, 2021 |
#49 in Video
4,399 downloads per month
Used in 10 crates
(9 directly)
13KB
242 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);
},
}
Dependencies
~0.7–1.6MB
~35K SLoC