pub struct TranscodeBuilder { /* private fields */ }Expand description
Fluent builder for creating transcode configurations.
Implementations§
Source§impl TranscodeBuilder
impl TranscodeBuilder
Sourcepub fn video_codec(self, codec: impl Into<String>) -> Self
pub fn video_codec(self, codec: impl Into<String>) -> Self
Sets the video codec.
Sourcepub fn audio_codec(self, codec: impl Into<String>) -> Self
pub fn audio_codec(self, codec: impl Into<String>) -> Self
Sets the audio codec.
Sourcepub fn video_bitrate(self, bitrate: u64) -> Self
pub fn video_bitrate(self, bitrate: u64) -> Self
Sets the video bitrate in bits per second.
Sourcepub fn audio_bitrate(self, bitrate: u64) -> Self
pub fn audio_bitrate(self, bitrate: u64) -> Self
Sets the audio bitrate in bits per second.
Sourcepub fn resolution(self, width: u32, height: u32) -> Self
pub fn resolution(self, width: u32, height: u32) -> Self
Sets the output resolution.
Sourcepub fn frame_rate(self, num: u32, den: u32) -> Self
pub fn frame_rate(self, num: u32, den: u32) -> Self
Sets the output frame rate.
Sourcepub fn multi_pass(self, mode: MultiPassMode) -> Self
pub fn multi_pass(self, mode: MultiPassMode) -> Self
Sets the multi-pass encoding mode.
Sourcepub fn quality(self, mode: QualityMode) -> Self
pub fn quality(self, mode: QualityMode) -> Self
Sets the quality mode.
Sourcepub fn normalize_audio(self) -> Self
pub fn normalize_audio(self) -> Self
Enables audio normalization with the default standard (EBU R128).
Sourcepub fn loudness_standard(self, standard: LoudnessStandard) -> Self
pub fn loudness_standard(self, standard: LoudnessStandard) -> Self
Sets a specific loudness standard for audio normalization.
Sourcepub fn preserve_metadata(self, enable: bool) -> Self
pub fn preserve_metadata(self, enable: bool) -> Self
Enables or disables metadata preservation.
Sourcepub fn subtitles(self, mode: SubtitleMode) -> Self
pub fn subtitles(self, mode: SubtitleMode) -> Self
Sets the subtitle mode.
Sourcepub fn chapters(self, mode: ChapterMode) -> Self
pub fn chapters(self, mode: ChapterMode) -> Self
Sets the chapter mode.
Sourcepub fn preset(self, preset: PresetConfig) -> Self
pub fn preset(self, preset: PresetConfig) -> Self
Applies a preset configuration.
Sourcepub fn build(self) -> Result<TranscodeConfig>
pub fn build(self) -> Result<TranscodeConfig>
Sourcepub fn validate(self) -> Result<TranscodeConfig>
pub fn validate(self) -> Result<TranscodeConfig>
Builds and validates the configuration, consuming the builder.
§Errors
Returns an error if the configuration is invalid or validation fails.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for TranscodeBuilder
impl RefUnwindSafe for TranscodeBuilder
impl Send for TranscodeBuilder
impl Sync for TranscodeBuilder
impl Unpin for TranscodeBuilder
impl UnsafeUnpin for TranscodeBuilder
impl UnwindSafe for TranscodeBuilder
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> 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