pub struct EncoderConfig {
pub width: u32,
pub height: u32,
pub framerate: u32,
pub bitrate_kbps: u32,
pub keyframe_interval: u32,
pub min_quantizer: u32,
pub max_quantizer: u32,
pub cpu_used: u8,
}Expand description
Configuration for a video encoder, independent of the concrete backend.
Backends map these fields onto their native configuration. Fields that a given backend does not support are ignored.
Fields§
§width: u32Frame width in pixels. Must be even.
height: u32Frame height in pixels. Must be even.
framerate: u32Nominal frame rate in frames per second (the encoder time base is 1/framerate).
bitrate_kbps: u32Target bitrate in kilobits per second.
keyframe_interval: u32Maximum distance between keyframes, in frames.
min_quantizer: u32Minimum quantizer (0-63); lower means higher quality.
max_quantizer: u32Maximum quantizer (0-63); higher means lower quality.
cpu_used: u8Speed/quality trade-off (0 = slowest/best, 8 = fastest/worst).
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 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for EncoderConfig
Source§impl Debug for EncoderConfig
impl Debug for EncoderConfig
Source§impl Default for EncoderConfig
impl Default for EncoderConfig
impl Eq for EncoderConfig
Source§impl PartialEq for EncoderConfig
impl PartialEq for EncoderConfig
impl StructuralPartialEq 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