Enum OggVorbisBitrateStrategy

Source
pub enum OggVorbisBitrateStrategy {
    Vbr(u32),
    QualityVbr(f32),
    Abr(u32),
    ConstrainedAbr(u32),
}
Expand description
  • OggVorbis bitrate strategy represents a bitrate management strategy that a OggVorbis encoder can use.

Variants§

§

Vbr(u32)

  • Pure VBR quality mode, selected by a target bitrate (in bit/s).
  • The bitrate management engine is not enabled.
  • The average bitrate will usually be close to the target, but there are no guarantees.
  • Easier or harder than expected to encode audio may be encoded at a significantly different bitrate.
§

QualityVbr(f32)

  • Similar to Vbr, this encoding strategy fixes the output subjective quality level,
  • but lets OggVorbis vary the target bitrate depending on the qualities of the input signal.
  • An upside of this approach is that OggVorbis can automatically increase or decrease the target bitrate according to how difficult the signal is to encode,
  • which guarantees perceptually-consistent results while using an optimal bitrate.
  • Another upside is that there always is some mode to encode audio at a given quality level.
  • The downside is that the output bitrate is harder to predict across different types of audio signals.
§

Abr(u32)

  • ABR mode, selected by an average bitrate (in bit/s).
  • The bitrate management engine is enabled to ensure that the instantaneous bitrate does not divert significantly from the specified average over time,
  • but no hard bitrate limits are imposed. Any bitrate fluctuations are guaranteed to be minor and short.
§

ConstrainedAbr(u32)

  • Constrained ABR mode, selected by a hard maximum bitrate (in bit/s).
  • The bitrate management engine is enabled to ensure that the instantaneous bitrate never exceeds the specified maximum bitrate,
  • which is a hard limit. Internally, the encoder will target an average bitrate that s slightly lower than the specified maximum bitrate.
  • The stream is guaranteed to never go above the specified bitrate, at the cost of a lower bitrate,
  • and thus lower audio quality, on average.

Trait Implementations§

Source§

impl Clone for OggVorbisBitrateStrategy

Source§

fn clone(&self) -> OggVorbisBitrateStrategy

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for OggVorbisBitrateStrategy

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for OggVorbisBitrateStrategy

Source§

fn default() -> Self

Returns the “default value” for a type. Read more
Source§

impl From<OggVorbisBitrateStrategy> for VorbisBitrateManagementStrategy

Source§

fn from(val: OggVorbisBitrateStrategy) -> Self

  • Convert to the VorbisBitrateManagementStrategy from vorbis_rs crate
Source§

impl From<VorbisBitrateManagementStrategy> for OggVorbisBitrateStrategy

Source§

fn from(vbms: VorbisBitrateManagementStrategy) -> Self

  • Convert from VorbisBitrateManagementStrategy from vorbis_rs crate
Source§

impl PartialEq for OggVorbisBitrateStrategy

Source§

fn eq(&self, other: &OggVorbisBitrateStrategy) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl Copy for OggVorbisBitrateStrategy

Source§

impl StructuralPartialEq for OggVorbisBitrateStrategy

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> CopiableItem for T
where T: Default + Clone + Copy + Debug + PartialEq,