Struct tokio_ffmpeg_cli::Builder
source · pub struct Builder {
pub audio_codec: Option<String>,
pub video_codec: Option<String>,
pub video_bitrate: Option<String>,
pub input: Option<OsString>,
pub output: Option<OsString>,
pub input_format: Option<String>,
pub output_format: Option<String>,
pub pass: Option<u8>,
pub video_frames: Option<u64>,
pub video_profile: Option<String>,
pub preset: Option<String>,
pub overwrite: bool,
}
Expand description
A builder for an ffmpeg command
Fields§
§audio_codec: Option<String>
The audio codec
video_codec: Option<String>
The video codec
video_bitrate: Option<String>
The video bitrate
input: Option<OsString>
The input
output: Option<OsString>
The output
input_format: Option<String>
The input format
output_format: Option<String>
The output format
pass: Option<u8>
The pass # for two pass
video_frames: Option<u64>
The # of video frames to read from the input
video_profile: Option<String>
The video profile
preset: Option<String>
The preset
overwrite: bool
Whether to overwrite the destination
Implementations§
source§impl Builder
impl Builder
sourcepub fn audio_codec(&mut self, audio_codec: impl Into<String>) -> &mut Self
pub fn audio_codec(&mut self, audio_codec: impl Into<String>) -> &mut Self
Set the audio codec
sourcepub fn video_codec(&mut self, video_codec: impl Into<String>) -> &mut Self
pub fn video_codec(&mut self, video_codec: impl Into<String>) -> &mut Self
Set the video codec
sourcepub fn video_bitrate(&mut self, video_bitrate: impl Into<String>) -> &mut Self
pub fn video_bitrate(&mut self, video_bitrate: impl Into<String>) -> &mut Self
Set the video bitrate
sourcepub fn input_format(&mut self, input_format: impl Into<String>) -> &mut Self
pub fn input_format(&mut self, input_format: impl Into<String>) -> &mut Self
Set the input format
sourcepub fn output_format(&mut self, output_format: impl Into<String>) -> &mut Self
pub fn output_format(&mut self, output_format: impl Into<String>) -> &mut Self
Set the output format
sourcepub fn video_frames(&mut self, video_frames: impl Into<u64>) -> &mut Self
pub fn video_frames(&mut self, video_frames: impl Into<u64>) -> &mut Self
The # of video frames to accept from the input
sourcepub fn video_profile(&mut self, video_profile: impl Into<String>) -> &mut Self
pub fn video_profile(&mut self, video_profile: impl Into<String>) -> &mut Self
The profile of the video
sourcepub fn overwrite(&mut self, overwrite: bool) -> &mut Self
pub fn overwrite(&mut self, overwrite: bool) -> &mut Self
Set whether the output should be overwritten
sourcepub async fn ffmpeg_status(&mut self) -> Result<ExitStatus, Error>
pub async fn ffmpeg_status(&mut self) -> Result<ExitStatus, Error>
Run the command and wait for it to finish.
This will not provide progress info or stdout/stdin, but is far simpler to drive.
sourcepub async fn ffmpeg_output(&mut self) -> Result<Output, Error>
pub async fn ffmpeg_output(&mut self) -> Result<Output, Error>
Run the command and wait for it to finish.
This will not provide progress info, but is far simpler to drive.
Trait Implementations§
Auto Trait Implementations§
impl RefUnwindSafe for Builder
impl Send for Builder
impl Sync for Builder
impl Unpin for Builder
impl UnwindSafe for Builder
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