pub enum QualityMode {
Low,
Medium,
High,
VeryHigh,
Custom,
}Expand description
Quality preset levels.
Variants§
Low
Low quality (faster encoding, lower bitrate).
Medium
Medium quality (balanced speed and quality).
High
High quality (slower encoding, higher bitrate).
VeryHigh
Very high quality (very slow encoding, very high bitrate).
Custom
Custom quality with specific parameters.
Implementations§
Source§impl QualityMode
impl QualityMode
Sourcepub fn to_crf(self) -> u8
pub fn to_crf(self) -> u8
Converts quality mode to a CRF value for most codecs.
§Returns
CRF value (lower = higher quality):
- Low: 28
- Medium: 23
- High: 20
VeryHigh: 18
Sourcepub fn to_preset(self) -> QualityPreset
pub fn to_preset(self) -> QualityPreset
Converts quality mode to a preset.
Sourcepub fn speed_factor(self) -> f64
pub fn speed_factor(self) -> f64
Estimates encoding speed factor relative to real-time.
§Returns
Approximate speed factor:
- Low: 5.0x (encodes 5x faster than real-time)
- Medium: 1.5x
- High: 0.5x
VeryHigh: 0.2x
Trait Implementations§
Source§impl Clone for QualityMode
impl Clone for QualityMode
Source§fn clone(&self) -> QualityMode
fn clone(&self) -> QualityMode
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 QualityMode
impl Debug for QualityMode
Source§impl<'de> Deserialize<'de> for QualityMode
impl<'de> Deserialize<'de> for QualityMode
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for QualityMode
impl PartialEq for QualityMode
Source§impl Serialize for QualityMode
impl Serialize for QualityMode
impl Copy for QualityMode
impl Eq for QualityMode
impl StructuralPartialEq for QualityMode
Auto Trait Implementations§
impl Freeze for QualityMode
impl RefUnwindSafe for QualityMode
impl Send for QualityMode
impl Sync for QualityMode
impl Unpin for QualityMode
impl UnsafeUnpin for QualityMode
impl UnwindSafe for QualityMode
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<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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