pub struct TranscodeBuilder { /* private fields */ }Expand description
Builder-style API for spinning up simple ffmpeg jobs.
Implementations§
Source§impl TranscodeBuilder
impl TranscodeBuilder
Sourcepub fn with_binaries(self, binaries: &FfmpegBinaryPaths) -> Self
pub fn with_binaries(self, binaries: &FfmpegBinaryPaths) -> Self
Use pre-discovered binaries instead of searching PATH every call.
Sourcepub fn with_locator(self, locator: &FfmpegLocator) -> Self
pub fn with_locator(self, locator: &FfmpegLocator) -> Self
Pin the builder to a specific locator.
Sourcepub fn video_codec(self, codec: impl Into<String>) -> Self
pub fn video_codec(self, codec: impl Into<String>) -> Self
Desired video codec (e.g. libx264).
Sourcepub fn audio_codec(self, codec: impl Into<String>) -> Self
pub fn audio_codec(self, codec: impl Into<String>) -> Self
Desired audio codec (e.g. aac).
Sourcepub fn video_bitrate(self, kbps: u32) -> Self
pub fn video_bitrate(self, kbps: u32) -> Self
Target video bitrate in kbps.
Sourcepub fn audio_bitrate(self, kbps: u32) -> Self
pub fn audio_bitrate(self, kbps: u32) -> Self
Target audio bitrate in kbps.
Sourcepub fn frame_rate(self, fps: f64) -> Self
pub fn frame_rate(self, fps: f64) -> Self
Target frame rate.
Sourcepub fn add_video_filter(self, filter: VideoFilter) -> Self
pub fn add_video_filter(self, filter: VideoFilter) -> Self
Add a video filter to the processing chain.
Sourcepub fn add_audio_filter(self, filter: AudioFilter) -> Self
pub fn add_audio_filter(self, filter: AudioFilter) -> Self
Add an audio filter to the processing chain.
Sourcepub fn add_filter(self, filter: VideoFilter) -> Self
👎Deprecated since 0.2.0: use add_video_filter() instead
pub fn add_filter(self, filter: VideoFilter) -> Self
Backward compatibility: alias for add_video_filter.
Sourcepub fn extra_arg(self, arg: impl Into<OsString>) -> Self
pub fn extra_arg(self, arg: impl Into<OsString>) -> Self
Pass a raw argument for advanced cases.
Sourcepub fn overwrite(self, enabled: bool) -> Self
pub fn overwrite(self, enabled: bool) -> Self
Control whether ffmpeg should overwrite the output file.
Sourcepub fn input_path(&self) -> Option<&Path>
pub fn input_path(&self) -> Option<&Path>
Accessor for the configured input path.
Sourcepub fn output_path(&self) -> Option<&Path>
pub fn output_path(&self) -> Option<&Path>
Accessor for the configured output path.
Sourcepub fn video_codec_ref(&self) -> Option<&str>
pub fn video_codec_ref(&self) -> Option<&str>
Accessor for the configured video codec.
Sourcepub fn audio_codec_ref(&self) -> Option<&str>
pub fn audio_codec_ref(&self) -> Option<&str>
Accessor for the configured audio codec.
Sourcepub fn video_bitrate_value(&self) -> Option<u32>
pub fn video_bitrate_value(&self) -> Option<u32>
Accessor for the configured video bitrate.
Sourcepub fn audio_bitrate_value(&self) -> Option<u32>
pub fn audio_bitrate_value(&self) -> Option<u32>
Accessor for the configured audio bitrate.
Sourcepub fn frame_rate_value(&self) -> Option<f64>
pub fn frame_rate_value(&self) -> Option<f64>
Accessor for the configured frame rate.
Sourcepub fn preset_value(&self) -> Option<&str>
pub fn preset_value(&self) -> Option<&str>
Accessor for the configured preset.
Sourcepub fn overwrite_enabled(&self) -> bool
pub fn overwrite_enabled(&self) -> bool
Returns whether overwriting outputs is enabled.
Sourcepub fn video_filters(&self) -> &[VideoFilter]
pub fn video_filters(&self) -> &[VideoFilter]
Accessor for the configured video filter chain.
Sourcepub fn audio_filters(&self) -> &[AudioFilter]
pub fn audio_filters(&self) -> &[AudioFilter]
Accessor for the configured audio filter chain.
Trait Implementations§
Source§impl Debug for TranscodeBuilder
impl Debug for TranscodeBuilder
Source§impl Default for TranscodeBuilder
impl Default for TranscodeBuilder
Source§fn default() -> TranscodeBuilder
fn default() -> TranscodeBuilder
Auto Trait Implementations§
impl Freeze for TranscodeBuilder
impl RefUnwindSafe for TranscodeBuilder
impl Send for TranscodeBuilder
impl Sync for TranscodeBuilder
impl Unpin 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
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