Skip to main content

Module simple

Module simple 

Source
Expand description

Simple output builder for OBS.

This module provides a simplified interface for configuring OBS outputs based on the SimpleOutput implementation from OBS Studio.

§Example

use libobs_simple::output::simple::{SimpleOutputBuilder, X264Preset};
use libobs_wrapper::{data::video::ObsVideoInfoBuilder, utils::{ObsPath, StartupInfo}};

fn main() -> Result<(), Box<dyn std::error::Error>> {
    let context = StartupInfo::new()
        .set_video_info(ObsVideoInfoBuilder::new().build())
        .start()?;

    let _output = SimpleOutputBuilder::new(context, "recording", ObsPath::new("./recording.mp4"))
        .video_bitrate(6000)
        .audio_bitrate(160)
        .x264_encoder(X264Preset::VeryFast)
        .build()?;

    Ok(())
}

Structs§

ConfiguredSimpleOutput
Simple recording output paired with the effective plugin/settings report used to build it.
ManagedSimpleOutput
Managed simple recording that can conservatively retry eligible encoder initialization/start failures using the remaining compatible candidates. Destination/auth/path errors are never retried as encoder fallbacks.
OutputSettings
Unified output settings
SimpleAudioTrack
One audio track in a simple recording. The encoder reads mix and is attached to slot.
SimpleOutputBuilder

Enums§

AudioEncoder
Audio encoder configuration
HardwareCodec
Target codec for generic hardware selection
HardwarePreset
Preset for hardware encoders (NVENC, AMD, QSV)
OutputFormat
Output format for file recording
VideoEncoder
Video encoder configuration
X264Preset
Preset for x264 software encoder

Traits§

ObsContextSimpleExt