pub struct ProxyTranscodeSettings {
pub codec: ProxyCodecChoice,
pub bitrate_bps: u64,
pub width: u32,
pub height: u32,
pub crf: u8,
pub threads: u32,
pub copy_audio: bool,
}Expand description
Settings for proxy transcoding derived from a quality preset.
Fields§
§codec: ProxyCodecChoiceCodec to use.
bitrate_bps: u64Target bitrate in bps.
width: u32Width in pixels.
height: u32Height in pixels.
crf: u8CRF value (lower = better quality; 0 = lossless for supported codecs).
threads: u32Number of encoding threads (0 = auto).
copy_audio: boolWhether to copy the audio stream without re-encoding.
Implementations§
Source§impl ProxyTranscodeSettings
impl ProxyTranscodeSettings
Sourcepub fn from_preset_1080p(preset: QualityPreset) -> Self
pub fn from_preset_1080p(preset: QualityPreset) -> Self
Create settings from a quality preset for a 1080p source.
Sourcepub fn with_codec(self, codec: ProxyCodecChoice) -> Self
pub fn with_codec(self, codec: ProxyCodecChoice) -> Self
Override the codec.
Sourcepub fn with_threads(self, threads: u32) -> Self
pub fn with_threads(self, threads: u32) -> Self
Override the thread count.
Sourcepub fn resolution(&self) -> (u32, u32)
pub fn resolution(&self) -> (u32, u32)
Resolution as a tuple (width, height).
Sourcepub fn estimated_size_mb(&self, duration_secs: f64) -> f64
pub fn estimated_size_mb(&self, duration_secs: f64) -> f64
Estimated file size in megabytes for a given duration in seconds.
Trait Implementations§
Source§impl Clone for ProxyTranscodeSettings
impl Clone for ProxyTranscodeSettings
Source§fn clone(&self) -> ProxyTranscodeSettings
fn clone(&self) -> ProxyTranscodeSettings
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 moreAuto Trait Implementations§
impl Freeze for ProxyTranscodeSettings
impl RefUnwindSafe for ProxyTranscodeSettings
impl Send for ProxyTranscodeSettings
impl Sync for ProxyTranscodeSettings
impl Unpin for ProxyTranscodeSettings
impl UnsafeUnpin for ProxyTranscodeSettings
impl UnwindSafe for ProxyTranscodeSettings
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<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