Expand description
The ffmpeg_context_builder module defines the builder pattern for creating
FfmpegContext objects.
It exposes the FfmpegContextBuilder struct, which allows you to:
- Configure multiple
InputandOutputstreams. - Attach filter descriptions via
FilterComplexor inline strings (e.g.,"scale=1280:720","hue=s=0"). - Produce a finished
FfmpegContextthat can then be executed byFfmpegScheduler.
§Examples
// 1. Create a builder (usually via FfmpegContext::builder())
let builder = FfmpegContext::builder();
// 2. Add inputs, outputs, and filters
let ffmpeg_context = builder
.input("input.mp4")
.filter_desc("hue=s=0")
.output("output.mp4")
.build()
.expect("Failed to build FfmpegContext");
// 3. Use `ffmpeg_context` with FfmpegScheduler (e.g., `.start()` and `.wait()`).Structs§
- Ffmpeg
Context Builder - A builder for constructing
FfmpegContextobjects with customized inputs, outputs, and filter configurations. Typically, you will start by callingFfmpegContext::builder(), then chain methods to add inputs, outputs, or filter descriptions, and finally invokebuild()to produce anFfmpegContext.