pub struct EncoderConfig {Show 15 fields
pub width: u32,
pub height: u32,
pub pass: PassType,
pub lookahead_frames: usize,
pub target_bitrate: u64,
pub max_bitrate: Option<u64>,
pub vbv_buffer_size: Option<u64>,
pub framerate_num: u32,
pub framerate_den: u32,
pub min_keyint: u32,
pub max_keyint: u32,
pub scene_change_threshold: f64,
pub enable_aq: bool,
pub stats_file: Option<String>,
pub allocation_strategy: AllocationStrategy,
}Expand description
Multi-pass encoder configuration.
Fields§
§width: u32Video width in pixels.
height: u32Video height in pixels.
pass: PassTypePass type.
lookahead_frames: usizeNumber of lookahead frames (10-250).
target_bitrate: u64Target bitrate in bits per second.
max_bitrate: Option<u64>Maximum bitrate (for VBV).
vbv_buffer_size: Option<u64>VBV buffer size in bits.
framerate_num: u32Frame rate numerator.
framerate_den: u32Frame rate denominator.
min_keyint: u32Minimum keyframe interval.
max_keyint: u32Maximum keyframe interval.
scene_change_threshold: f64Scene change threshold (0.0-1.0).
enable_aq: boolEnable adaptive quantization.
stats_file: Option<String>Statistics file path (for two-pass).
allocation_strategy: AllocationStrategyBitrate allocation strategy.
Implementations§
Source§impl EncoderConfig
impl EncoderConfig
Sourcepub fn with_lookahead_frames(self, frames: usize) -> Self
pub fn with_lookahead_frames(self, frames: usize) -> Self
Set lookahead frames.
Sourcepub fn with_target_bitrate(self, bitrate: u64) -> Self
pub fn with_target_bitrate(self, bitrate: u64) -> Self
Set target bitrate.
Sourcepub fn with_framerate(self, num: u32, den: u32) -> Self
pub fn with_framerate(self, num: u32, den: u32) -> Self
Set frame rate.
Sourcepub fn with_keyint_range(self, min: u32, max: u32) -> Self
pub fn with_keyint_range(self, min: u32, max: u32) -> Self
Set keyframe interval range.
Sourcepub fn with_stats_file(self, path: impl Into<String>) -> Self
pub fn with_stats_file(self, path: impl Into<String>) -> Self
Set statistics file path.
Sourcepub fn with_allocation_strategy(self, strategy: AllocationStrategy) -> Self
pub fn with_allocation_strategy(self, strategy: AllocationStrategy) -> Self
Set allocation strategy.
Trait Implementations§
Source§impl Clone for EncoderConfig
impl Clone for EncoderConfig
Source§fn clone(&self) -> EncoderConfig
fn clone(&self) -> EncoderConfig
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 moreSource§impl Debug for EncoderConfig
impl Debug for EncoderConfig
Auto Trait Implementations§
impl Freeze for EncoderConfig
impl RefUnwindSafe for EncoderConfig
impl Send for EncoderConfig
impl Sync for EncoderConfig
impl Unpin for EncoderConfig
impl UnsafeUnpin for EncoderConfig
impl UnwindSafe for EncoderConfig
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