Expand description
The input module defines the Input struct,
representing an FFmpeg input source. An input can be:
- A file path or URL (e.g.,
"video.mp4",rtmp://example.com/live/stream). - A custom data source via a
read_callback(and optionallyseek_callback) for advanced scenarios like in-memory buffers or network protocols.
You can also specify frame pipelines to apply custom FrameFilter
transformations after decoding but before the frames move on to the rest of the pipeline.
§Example
use ez_ffmpeg::core::context::input::Input;
// Basic file or network URL:
let file_input: Input = "example.mp4".into();
// Or a custom read callback:
let custom_input = Input::new_by_read_callback(|buf| {
// Fill `buf` with data from your source
// Return the number of bytes read, or negative for errors
0
});