pub struct EncodeJob {
pub input: String,
pub output: String,
pub resolution: Option<Resolution>,
pub codec: Codec,
pub crf: i32,
pub rate_control: RateControlMode,
pub target_bitrate: f64,
pub max_bitrate: f64,
pub bufsize: f64,
pub preset: String,
pub hwaccel: Option<String>,
pub extra_args: Vec<String>,
}Expand description
Parameters for a single encode.
Fields§
§input: StringSource media file path.
output: StringDestination file path for the encoded output.
resolution: Option<Resolution>Optional target resolution; when set, scales with the lanczos filter.
codec: CodecVideo codec to encode with.
crf: i32Constant rate factor / quantizer value (interpretation depends on rate_control).
rate_control: RateControlModeRate-control mode that determines how crf/bitrate fields are applied.
target_bitrate: f64Target bitrate in kbps; used for VBR mode.
max_bitrate: f64Maximum bitrate cap in kbps; used for capped CRF mode.
bufsize: f64VBV buffer size in kbps; used for capped CRF mode.
preset: StringEncoder speed preset (e.g. "medium"); empty leaves the encoder default.
hwaccel: Option<String>Optional hardware-accelerated decode method (e.g. "vaapi", "cuda",
"qsv", "videotoolbox"). None (or empty) decodes in software.
Frames are downloaded to system memory for the filter/encode pipeline.
extra_args: Vec<String>Extra raw FFmpeg arguments appended verbatim before the output path.