pub struct OutputSpec {Show 18 fields
pub path: PathBuf,
pub format: Option<String>,
pub video_codec: Option<StreamCodec>,
pub audio_codec: Option<StreamCodec>,
pub subtitle_codec: Option<CodecId>,
pub video_filters: Option<String>,
pub filter_complex: Option<String>,
pub maps: Vec<MapSpec>,
pub overwrite: bool,
pub max_video_frames: Option<u64>,
pub trim_start: Option<f64>,
pub trim_end: Option<f64>,
pub frame_rate: Option<(u32, u32)>,
pub audio_rate: Option<u32>,
pub audio_channels: Option<u16>,
pub audio_filters: Option<String>,
pub metadata: Dictionary,
pub format_options: Dictionary,
}Expand description
The output file for a job.
Fields§
§path: PathBuf§format: Option<String>Force a container format instead of guessing from the extension
(ffmpeg -f <fmt> ...).
video_codec: Option<StreamCodec>Video codec for the output, if a video stream is produced.
audio_codec: Option<StreamCodec>Audio codec for the output, if an audio stream is produced.
subtitle_codec: Option<CodecId>Subtitle codec (-c:s subrip|webvtt). Text-subtitle packets share one
contract (plain text + ms timing), so this relabels the stream for the
muxer rather than re-encoding anything.
video_filters: Option<String>Video filter graph (-vf), e.g. scale=320:240,crop=.... Applied to
decoded video frames before re-encoding (transcode streams only).
filter_complex: Option<String>Multi-input filter graph (-filter_complex). Currently models overlay:
the last input is composited over input #0’s video.
maps: Vec<MapSpec>Explicit stream selection (-map). Empty = default (all video + audio,
in input/stream order).
overwrite: boolOverwrite the output if it exists (-y); otherwise fail (-n).
max_video_frames: Option<u64>Stop after this many VIDEO frames (-frames:v N). None = whole input.
This is a measurement-critical option: without it a harness that thinks it is encoding a 50-frame prefix silently encodes the whole clip, and any rate-vs-quality pairing computed against a prefix is then wrong.
trim_start: Option<f64>Output trim window start, in seconds (-ss). Decoded frames (or copied
packets) before this point are dropped; timestamps are shifted so the
output starts at zero.
trim_end: Option<f64>Output trim window end, in seconds (-to, or -ss + -t). Exclusive.
frame_rate: Option<(u32, u32)>Constant output frame rate (-r), as (num, den) — e.g. (30000, 1001).
Frames are duplicated/dropped to hit it (FFmpeg’s fps filter).
audio_rate: Option<u32>Target audio sample rate (-ar). The encoder’s accepted-rate list still
wins if it cannot take this exact rate (nearest accepted is used).
audio_channels: Option<u16>Target audio channel count (-ac): 1↔2 downmix/upmix.
audio_filters: Option<String>Audio filter chain (-af / -filter:a), e.g. volume=-6dB,atrim=....
metadata: DictionaryOutput metadata (-metadata title=...), handed to muxers that carry it.
format_options: DictionaryMuxer options (-hls_time 6 → {"hls_time": "6"}), for formats that
take them (HLS/DASH segmenting).
Trait Implementations§
Source§impl Clone for OutputSpec
impl Clone for OutputSpec
Source§impl Debug for OutputSpec
impl Debug for OutputSpec
Auto Trait Implementations§
impl Freeze for OutputSpec
impl RefUnwindSafe for OutputSpec
impl Send for OutputSpec
impl Sync for OutputSpec
impl Unpin for OutputSpec
impl UnsafeUnpin for OutputSpec
impl UnwindSafe for OutputSpec
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, Ctx> BundleDefault<Ctx> for Twhere
T: Default,
impl<T, Ctx> BundleDefault<Ctx> for Twhere
T: Default,
Source§fn default_with_context(_: Ctx) -> T
fn default_with_context(_: Ctx) -> T
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
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