pub struct EncodeOptions {
pub fps: u32,
pub quality: f32,
pub bitrate: Option<u32>,
pub realtime: bool,
}Expand description
What an Mp4Encoder is asked for. Each backend reads it in its own
terms; the fields say how.
Fields§
§fps: u32Frames per second.
quality: f320 (smallest) to 1 (best). VideoToolbox takes it as its own quality property; the native encoder, NVENC and VAAPI map it linearly onto quantizers 40 to 18, the range where the native encoder’s output is usable, so 0.5 is QP 29.
bitrate: Option<u32>A target average bitrate in bits per second, which overrides quality
on the native encoder, NVENC and VAAPI (variable bitrate) and caps it on
VideoToolbox.
realtime: boolHint that encoding must keep pace with capture: VideoToolbox’s realtime mode, NVENC’s low-latency tuning and a faster preset. The native encoder ignores it.
Implementations§
Trait Implementations§
Source§impl Clone for EncodeOptions
impl Clone for EncodeOptions
impl Copy for EncodeOptions
Source§impl Debug for EncodeOptions
impl Debug for EncodeOptions
Source§impl Default for EncodeOptions
impl Default for EncodeOptions
Source§impl PartialEq for EncodeOptions
impl PartialEq for EncodeOptions
impl StructuralPartialEq for EncodeOptions
Auto Trait Implementations§
impl Freeze for EncodeOptions
impl RefUnwindSafe for EncodeOptions
impl Send for EncodeOptions
impl Sync for EncodeOptions
impl Unpin for EncodeOptions
impl UnsafeUnpin for EncodeOptions
impl UnwindSafe for EncodeOptions
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