pub struct ProxyGenerationSettings {
pub scale_factor: f32,
pub codec: String,
pub bitrate: u64,
pub audio_codec: String,
pub audio_bitrate: u64,
pub preserve_frame_rate: bool,
pub preserve_timecode: bool,
pub preserve_metadata: bool,
pub container: String,
pub use_hw_accel: bool,
pub threads: u32,
pub quality_preset: String,
}Expand description
Proxy generation settings.
Fields§
§scale_factor: f32Target resolution as a scale factor (0.25, 0.5, 1.0).
codec: StringTarget codec name (e.g., “h264”, “vp9”).
bitrate: u64Target bitrate in bits per second.
audio_codec: StringAudio codec name (e.g., “aac”, “opus”).
audio_bitrate: u64Audio bitrate in bits per second.
preserve_frame_rate: boolFrame rate preservation mode.
preserve_timecode: boolTimecode preservation mode.
preserve_metadata: boolMetadata preservation mode.
container: StringContainer format (e.g., “mp4”, “mov”).
use_hw_accel: boolUse hardware acceleration if available.
threads: u32Number of encoding threads (0 = auto).
quality_preset: StringQuality preset name (e.g., “fast”, “medium”, “slow”).
Implementations§
Source§impl ProxyGenerationSettings
impl ProxyGenerationSettings
Sourcepub fn quarter_res_h264() -> Self
pub fn quarter_res_h264() -> Self
Create settings for quarter resolution H.264 proxy.
Sourcepub fn half_res_h264() -> Self
pub fn half_res_h264() -> Self
Create settings for half resolution H.264 proxy.
Sourcepub fn full_res_h264() -> Self
pub fn full_res_h264() -> Self
Create settings for full resolution H.264 proxy.
Sourcepub fn quarter_res_vp9() -> Self
pub fn quarter_res_vp9() -> Self
Create settings for quarter resolution VP9 proxy.
Sourcepub fn with_scale_factor(self, scale_factor: f32) -> Self
pub fn with_scale_factor(self, scale_factor: f32) -> Self
Set the scale factor.
Sourcepub fn with_codec(self, codec: impl Into<String>) -> Self
pub fn with_codec(self, codec: impl Into<String>) -> Self
Set the codec.
Sourcepub fn with_bitrate(self, bitrate: u64) -> Self
pub fn with_bitrate(self, bitrate: u64) -> Self
Set the bitrate.
Sourcepub fn with_container(self, container: impl Into<String>) -> Self
pub fn with_container(self, container: impl Into<String>) -> Self
Set the container format.
Sourcepub fn with_hw_accel(self, enable: bool) -> Self
pub fn with_hw_accel(self, enable: bool) -> Self
Set hardware acceleration.
Trait Implementations§
Source§impl Clone for ProxyGenerationSettings
impl Clone for ProxyGenerationSettings
Source§fn clone(&self) -> ProxyGenerationSettings
fn clone(&self) -> ProxyGenerationSettings
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for ProxyGenerationSettings
impl Debug for ProxyGenerationSettings
Source§impl Default for ProxyGenerationSettings
impl Default for ProxyGenerationSettings
Source§impl<'de> Deserialize<'de> for ProxyGenerationSettings
impl<'de> Deserialize<'de> for ProxyGenerationSettings
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>,
Auto Trait Implementations§
impl Freeze for ProxyGenerationSettings
impl RefUnwindSafe for ProxyGenerationSettings
impl Send for ProxyGenerationSettings
impl Sync for ProxyGenerationSettings
impl Unpin for ProxyGenerationSettings
impl UnsafeUnpin for ProxyGenerationSettings
impl UnwindSafe for ProxyGenerationSettings
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<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