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
impl Clone for OggVorbisBitrateStrategy
Source§fn clone(&self) -> OggVorbisBitrateStrategy
fn clone(&self) -> OggVorbisBitrateStrategy
Returns a copy 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 OggVorbisBitrateStrategy
impl Debug for OggVorbisBitrateStrategy
Source§impl Default for OggVorbisBitrateStrategy
impl Default for OggVorbisBitrateStrategy
Source§impl From<OggVorbisBitrateStrategy> for VorbisBitrateManagementStrategy
impl From<OggVorbisBitrateStrategy> for VorbisBitrateManagementStrategy
Source§fn from(val: OggVorbisBitrateStrategy) -> Self
fn from(val: OggVorbisBitrateStrategy) -> Self
- Convert to the
VorbisBitrateManagementStrategy
fromvorbis_rs
crate
Source§impl From<VorbisBitrateManagementStrategy> for OggVorbisBitrateStrategy
impl From<VorbisBitrateManagementStrategy> for OggVorbisBitrateStrategy
Source§fn from(vbms: VorbisBitrateManagementStrategy) -> Self
fn from(vbms: VorbisBitrateManagementStrategy) -> Self
- Convert from
VorbisBitrateManagementStrategy
fromvorbis_rs
crate
Source§impl PartialEq for OggVorbisBitrateStrategy
impl PartialEq for OggVorbisBitrateStrategy
impl Copy for OggVorbisBitrateStrategy
impl StructuralPartialEq for OggVorbisBitrateStrategy
Auto Trait Implementations§
impl Freeze for OggVorbisBitrateStrategy
impl RefUnwindSafe for OggVorbisBitrateStrategy
impl Send for OggVorbisBitrateStrategy
impl Sync for OggVorbisBitrateStrategy
impl Unpin for OggVorbisBitrateStrategy
impl UnwindSafe for OggVorbisBitrateStrategy
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