Skip to main content

SimpleOutputBuilder

Struct SimpleOutputBuilder 

Source
pub struct SimpleOutputBuilder { /* private fields */ }

Implementations§

Source§

impl SimpleOutputBuilder

Source

pub fn new<K: Into<ObsPath>, T: Into<ObsString>>( context: ObsContext, name: T, path: K, ) -> Self

Creates a new SimpleOutputBuilder with default settings.

Source

pub fn settings(self, settings: OutputSettings) -> Self

Sets the output settings.

Source

pub fn video_bitrate(self, bitrate: u32) -> Self

Sets the video bitrate in Kbps.

Source

pub fn audio_bitrate(self, bitrate: u32) -> Self

Sets the audio bitrate in Kbps.

Source

pub fn path<P: Into<ObsPath>>(self, path: P) -> Self

Sets the output path.

Source

pub fn format(self, format: OutputFormat) -> Self

Sets the output format.

Source

pub fn auto_video_encoder(self, codec: HardwareCodec) -> Self

Uses automatic codec-based encoder selection. Hardware implementations are preferred, while software encoders remain a transparent fallback.

Source

pub fn prefer_hardware_encoder(self, codec: HardwareCodec) -> Self

Prefer hardware for the requested codec while allowing software fallback.

Source

pub fn x264_encoder(self, preset: X264Preset) -> Self

Sets the video encoder to x264.

Source

pub fn hardware_encoder( self, codec: HardwareCodec, preset: HardwarePreset, ) -> Self

Requires a generic hardware encoder. If no hardware backend is available, build fails.

Source

pub fn require_hardware_encoder( self, codec: HardwareCodec, preset: HardwarePreset, ) -> Self

Alias spelling out the no-software-fallback policy.

Source

pub fn explicit_video_encoder(self, encoder: ObsVideoEncoderType) -> Self

Selects one explicit backend by OBS encoder type. No automatic backend substitution occurs.

Source

pub fn configuration_mode(self, mode: ConfigurationMode) -> Self

Requires all requested generic encoder settings to be accepted exactly by the selected backend. In permissive mode (the default), unsupported/rejected generic choices retain the plugin default and are surfaced in OutputConfigurationReport.

Source

pub fn strict_configuration(self) -> Self

Source

pub fn audio_track(self, mix: AudioMixIndex, slot: AudioEncoderSlot) -> Self

Adds an encoded recording track. The source mix and output attachment slot are independent.

The builder starts with mix 0 at slot 0 for compatibility. A common layout keeps that combined track and adds dedicated desktop/microphone mixes at slots 1 and 2.

Source

pub fn without_default_audio_track(self) -> Self

Removes the compatibility default combined track (mix 0 / slot 0).

Source

pub fn crf(self, crf: u32) -> Self

Sets a quality target for x264 encoding on a 0–100 scale.

A value of 100 maps to x264 CRF 0 (highest quality), while 0 maps to CRF 51 (lowest quality). Hardware encoders retain bitrate-based control.

Source

pub fn build(self) -> Result<ObsOutputRef, ObsError>

Builds a validated recording graph using the concrete capabilities available at runtime. This compatibility entry point discards the structured configuration report.

Source

pub fn build_with_report(self) -> Result<ConfiguredSimpleOutput, ObsError>

Builds the graph and returns the effective plugin/settings configuration report.

Source

pub fn build_managed(self) -> Result<ManagedSimpleOutput, ObsError>

Builds the managed variant that can retry eligible initialization/start failures.

Trait Implementations§

Source§

impl Clone for SimpleOutputBuilder

Source§

fn clone(&self) -> Self

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 SimpleOutputBuilder

Source§

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

Formats the value using the given formatter. 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, 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 = !

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

fn try_from(value: U) -> Result<T, !>

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.