Skip to main content

TranscodeSettings

Struct TranscodeSettings 

Source
pub struct TranscodeSettings {
Show 19 fields pub mode: Option<Mode>, pub rungs: Vec<(u32, u32)>, pub ladder: bool, pub max_short_side: Option<u32>, pub segment_seconds: Option<f32>, pub crf: Option<u8>, pub speed: Option<u8>, pub audio: Option<AudioPolicy>, pub color: Option<ColorPolicy>, pub bit_depth: Option<BitDepth>, pub seam: Option<ChunkSeamMode>, pub max_fps: Option<f64>, pub gpu: Option<u32>, pub gpu_family: Option<GpuFamily>, pub single_gpu: bool, pub decode_gpu: Option<u32>, pub width: Option<u32>, pub height: Option<u32>, pub filters: Vec<VideoFilter>,
}
Expand description

Every optional transcode knob, surface-agnostic. All-None/empty is “use the defaults” (source-resolution single file, AV1 + audio passthrough, SDR).

Fields§

§mode: Option<Mode>§rungs: Vec<(u32, u32)>

Explicit rungs as (width, height). Wins over ladder / width.

§ladder: bool

Derive a standard ABR ladder from the source.

§max_short_side: Option<u32>§segment_seconds: Option<f32>§crf: Option<u8>§speed: Option<u8>§audio: Option<AudioPolicy>§color: Option<ColorPolicy>§bit_depth: Option<BitDepth>§seam: Option<ChunkSeamMode>§max_fps: Option<f64>§gpu: Option<u32>

Pin encode to one GPU index.

§gpu_family: Option<GpuFamily>

Restrict encode to one vendor family.

§single_gpu: bool

Use a single GPU (serial), the first available.

§decode_gpu: Option<u32>

Pin the decode pump to a GPU index.

§width: Option<u32>

Single-output width/height (the pipe/ipc scaling knobs). Used only when neither rungs nor ladder is set; defaults to the source size.

§height: Option<u32>§filters: Vec<VideoFilter>

Video filter chain (crop/pad/flip/rotate/grayscale) applied before per-rung scaling. The canonical structured form; string surfaces parse codec::filter::parse_chain at the edge.

Implementations§

Source§

impl TranscodeSettings

Source

pub fn into_spec(self, src_w: u32, src_h: u32) -> Result<OutputSpec>

Build an OutputSpec from these settings against a source resolution. This is the single spec-building implementation for all surfaces.

Source

pub fn apply_kv(&mut self, key: &str, val: &str) -> Result<()>

Apply one key=value setting (the IPC header / generic string form). Keys mirror the CLI flags. Unknown keys error.

Source

pub fn parse_kv_line(line: &str) -> Result<Self>

Parse a whole key=value key=value … line into settings.

Source

pub fn is_empty(&self) -> bool

Trait Implementations§

Source§

impl Clone for TranscodeSettings

Source§

fn clone(&self) -> TranscodeSettings

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for TranscodeSettings

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for TranscodeSettings

Source§

fn default() -> TranscodeSettings

Returns the “default value” for a type. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more