Expand description
Wrap a standalone FFmpeg binary in an intuitive Iterator interface.
§Example
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(())
}
Modules§
- Wrapper around
std::process::Child
containing a spawned FFmpeg command. - An internal utility used to parse comma-separated values in FFmpeg logs.
- Builder interface for FFmpeg commands.
- Utilities for downloading and unpacking FFmpeg binaries.
- Any event that occurs during the execution of an FFmpeg command.
- Utilities related to the FFprobe binary.
- A stream of events from an FFmpeg process.
- Internal methods for parsing FFmpeg CLI log output.
- Information about an FFmpeg process and its streams.
- named_
pipes named_pipes
Cross-platform abstraction over Windows async named pipes and Unix FIFO. - Utilities for locating FFmpeg binaries on the system.
- A database of the pixel formats supported by FFmpeg and their size per pixel.
- Internal utility;
BufRead::read_until
with multiple delimiters. - Utilities for checking local FFmpeg version string.
Macros§
- pipe_
name named_pipes
On Windows, prepend the pipe name with\\.\pipe\
. On Unix, return the name as-is.
Type Aliases§
Result<T, Error>