pub struct CodecTunePreset {
pub codec: String,
pub tune_name: String,
pub options: Vec<(String, String)>,
pub description: String,
}Expand description
Per-codec tune presets for content-specific optimization.
Each preset encodes recommended encoder parameters for a specific content type (film, animation, grain, screen, etc.) for a specific codec.
Fields§
§codec: StringCodec this preset applies to (e.g. “av1”, “vp9”).
tune_name: StringContent tune name (e.g. “film”, “animation”, “grain”).
options: Vec<(String, String)>Recommended encoder options as key-value pairs.
description: StringDescription of what this tune optimizes for.
Implementations§
Source§impl CodecTunePreset
impl CodecTunePreset
Sourcepub fn av1_film() -> Self
pub fn av1_film() -> Self
AV1 film tune preset.
Optimized for live-action content with natural motion, subtle colour gradients, and moderate detail. Uses film grain synthesis to maintain perceived quality at lower bitrates.
Sourcepub fn av1_animation() -> Self
pub fn av1_animation() -> Self
AV1 animation tune preset.
Optimized for animated content with flat colour areas, sharp edges, and less texture. Favours PSNR-based quality and aggressive deblocking.
Sourcepub fn av1_grain() -> Self
pub fn av1_grain() -> Self
AV1 grain preservation tune preset.
Preserves film grain and high-frequency texture detail. Uses grain synthesis with higher fidelity parameters and disables aggressive denoising.
Sourcepub fn vp9_film() -> Self
pub fn vp9_film() -> Self
VP9 film tune preset.
Optimized for live-action content using VP9-specific parameters.
Sourcepub fn vp9_animation() -> Self
pub fn vp9_animation() -> Self
VP9 animation tune preset.
Optimized for animated content with VP9-specific parameters.
Sourcepub fn presets_for_codec(codec: &str) -> Vec<Self>
pub fn presets_for_codec(codec: &str) -> Vec<Self>
Returns all available tune presets for a given codec.
Sourcepub fn find(codec: &str, tune_name: &str) -> Option<Self>
pub fn find(codec: &str, tune_name: &str) -> Option<Self>
Looks up a specific tune preset by codec and tune name.
Sourcepub fn option_count(&self) -> usize
pub fn option_count(&self) -> usize
Returns the number of encoder options in this preset.
Sourcepub fn apply_to_options(&self, options: &mut Vec<(String, String)>)
pub fn apply_to_options(&self, options: &mut Vec<(String, String)>)
Merges this preset’s options into a CodecConfig’s options list.
Existing options with matching keys are overwritten.
Trait Implementations§
Source§impl Clone for CodecTunePreset
impl Clone for CodecTunePreset
Source§fn clone(&self) -> CodecTunePreset
fn clone(&self) -> CodecTunePreset
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for CodecTunePreset
impl Debug for CodecTunePreset
Source§impl PartialEq for CodecTunePreset
impl PartialEq for CodecTunePreset
impl Eq for CodecTunePreset
impl StructuralPartialEq for CodecTunePreset
Auto Trait Implementations§
impl Freeze for CodecTunePreset
impl RefUnwindSafe for CodecTunePreset
impl Send for CodecTunePreset
impl Sync for CodecTunePreset
impl Unpin for CodecTunePreset
impl UnsafeUnpin for CodecTunePreset
impl UnwindSafe for CodecTunePreset
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
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
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>
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>
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