pub struct SimpleOutputBuilder { /* private fields */ }Implementations§
Source§impl SimpleOutputBuilder
impl SimpleOutputBuilder
Sourcepub fn new<K: Into<ObsPath>, T: Into<ObsString>>(
context: ObsContext,
name: T,
path: K,
) -> Self
pub fn new<K: Into<ObsPath>, T: Into<ObsString>>( context: ObsContext, name: T, path: K, ) -> Self
Creates a new SimpleOutputBuilder with default settings.
Sourcepub fn settings(self, settings: OutputSettings) -> Self
pub fn settings(self, settings: OutputSettings) -> Self
Sets the output settings.
Sourcepub fn video_bitrate(self, bitrate: u32) -> Self
pub fn video_bitrate(self, bitrate: u32) -> Self
Sets the video bitrate in Kbps.
Sourcepub fn audio_bitrate(self, bitrate: u32) -> Self
pub fn audio_bitrate(self, bitrate: u32) -> Self
Sets the audio bitrate in Kbps.
Sourcepub fn format(self, format: OutputFormat) -> Self
pub fn format(self, format: OutputFormat) -> Self
Sets the output format.
Sourcepub fn auto_video_encoder(self, codec: HardwareCodec) -> Self
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.
Sourcepub fn prefer_hardware_encoder(self, codec: HardwareCodec) -> Self
pub fn prefer_hardware_encoder(self, codec: HardwareCodec) -> Self
Prefer hardware for the requested codec while allowing software fallback.
Sourcepub fn x264_encoder(self, preset: X264Preset) -> Self
pub fn x264_encoder(self, preset: X264Preset) -> Self
Sets the video encoder to x264.
Sourcepub fn hardware_encoder(
self,
codec: HardwareCodec,
preset: HardwarePreset,
) -> Self
pub fn hardware_encoder( self, codec: HardwareCodec, preset: HardwarePreset, ) -> Self
Requires a generic hardware encoder. If no hardware backend is available, build fails.
Sourcepub fn require_hardware_encoder(
self,
codec: HardwareCodec,
preset: HardwarePreset,
) -> Self
pub fn require_hardware_encoder( self, codec: HardwareCodec, preset: HardwarePreset, ) -> Self
Alias spelling out the no-software-fallback policy.
Sourcepub fn explicit_video_encoder(self, encoder: ObsVideoEncoderType) -> Self
pub fn explicit_video_encoder(self, encoder: ObsVideoEncoderType) -> Self
Selects one explicit backend by OBS encoder type. No automatic backend substitution occurs.
Sourcepub fn configuration_mode(self, mode: ConfigurationMode) -> Self
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.
pub fn strict_configuration(self) -> Self
Sourcepub fn audio_track(self, mix: AudioMixIndex, slot: AudioEncoderSlot) -> Self
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.
Sourcepub fn without_default_audio_track(self) -> Self
pub fn without_default_audio_track(self) -> Self
Removes the compatibility default combined track (mix 0 / slot 0).
Sourcepub fn crf(self, crf: u32) -> Self
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.
Sourcepub fn build(self) -> Result<ObsOutputRef, ObsError>
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.
Sourcepub fn build_with_report(self) -> Result<ConfiguredSimpleOutput, ObsError>
pub fn build_with_report(self) -> Result<ConfiguredSimpleOutput, ObsError>
Builds the graph and returns the effective plugin/settings configuration report.
Sourcepub fn build_managed(self) -> Result<ManagedSimpleOutput, ObsError>
pub fn build_managed(self) -> Result<ManagedSimpleOutput, ObsError>
Builds the managed variant that can retry eligible initialization/start failures.