1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
//! Wrap a standalone FFmpeg binary in an intuitive Iterator interface.
//!
//! ## Example
//!
//! ```rust
//! use ffmpeg_sidecar::command::FfmpegCommand;
//! fn main() -> anyhow::Result<()> {
//! // Run an FFmpeg command that generates a test video
//! let iter = FfmpegCommand::new() // <- Builder API like `std::process::Command`
//! .testsrc() // <- Discoverable aliases for FFmpeg args
//! .rawvideo() // <- Convenient argument presets
//! .spawn()? // <- Ordinary `std::process::Child`
//! .iter()?; // <- Blocking iterator over logs and output
//!
//! // Use a regular "for" loop to read decoded video data
//! for frame in iter.filter_frames() {
//! println!("frame: {}x{}", frame.width, frame.height);
//! let _pixels: Vec<u8> = frame.data; // <- raw RGB pixels! 🎨
//! }
//!
//! Ok(())
//! }
//! ```
pub use Result;