pub struct MultiPassConfig {
pub mode: MultiPassMode,
pub stats_file: PathBuf,
pub current_pass: u32,
pub keep_stats: bool,
pub target_bitrate: Option<u64>,
pub max_bitrate: Option<u64>,
}Expand description
Multi-pass encoding configuration.
Fields§
§mode: MultiPassModeEncoding mode.
stats_file: PathBufStatistics file path for pass data.
current_pass: u32Current pass number.
keep_stats: boolWhether to keep statistics files after encoding.
target_bitrate: Option<u64>Target bitrate for multi-pass encoding.
max_bitrate: Option<u64>Maximum bitrate for constrained encoding.
Implementations§
Source§impl MultiPassConfig
impl MultiPassConfig
Sourcepub fn new(mode: MultiPassMode, stats_file: impl Into<PathBuf>) -> Self
pub fn new(mode: MultiPassMode, stats_file: impl Into<PathBuf>) -> Self
Creates a new multi-pass configuration.
§Arguments
mode- The multi-pass mode to usestats_file- Path where statistics will be stored
Sourcepub fn with_target_bitrate(self, bitrate: u64) -> Self
pub fn with_target_bitrate(self, bitrate: u64) -> Self
Sets the target bitrate for multi-pass encoding.
Sourcepub fn with_max_bitrate(self, bitrate: u64) -> Self
pub fn with_max_bitrate(self, bitrate: u64) -> Self
Sets the maximum bitrate for constrained encoding.
Sourcepub fn keep_stats(self, keep: bool) -> Self
pub fn keep_stats(self, keep: bool) -> Self
Sets whether to keep statistics files after encoding.
Sourcepub fn stats_file_for_pass(&self, pass: u32) -> PathBuf
pub fn stats_file_for_pass(&self, pass: u32) -> PathBuf
Gets the statistics file path for a specific pass.
Sourcepub fn is_analysis_pass(&self, pass: u32) -> bool
pub fn is_analysis_pass(&self, pass: u32) -> bool
Checks if a pass is an analysis pass (no output).
Sourcepub fn encoder_flags_for_pass(&self, pass: u32) -> Vec<String>
pub fn encoder_flags_for_pass(&self, pass: u32) -> Vec<String>
Gets the encoder flags for a specific pass.
Trait Implementations§
Source§impl Clone for MultiPassConfig
impl Clone for MultiPassConfig
Source§fn clone(&self) -> MultiPassConfig
fn clone(&self) -> MultiPassConfig
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for MultiPassConfig
impl RefUnwindSafe for MultiPassConfig
impl Send for MultiPassConfig
impl Sync for MultiPassConfig
impl Unpin for MultiPassConfig
impl UnsafeUnpin for MultiPassConfig
impl UnwindSafe for MultiPassConfig
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more