Table of Contents

Class ObsInput

Namespace
OBSStudioClient.Model
Assembly
OBSClient.dll

An input of OBS Studio: a source of video, audio or both (a camera, a microphone, an image, a browser source, and so on).

public sealed class ObsInput : ObsSource, INotifyPropertyChanged
Inheritance
ObsInput
Implements
Inherited Members

Properties

AudioBalance

Gets the balance of the audio between the left and the right: from 0 (all on the left) to 1 (all on the right); 0.5 is the middle, which is what an input has until it is changed. The value is current: OBS Studio announces every change of it. Only meaningful when HasAudio.

AudioTracks

Gets the audio tracks that the input is mixed into: a recording or a stream has the audio of the inputs that are on the tracks that it takes. The value is current: OBS Studio announces every change of it. Only meaningful when HasAudio.

HasAudio

Gets whether the input has audio. Only then are IsMuted, VolumeMul, VolumeDb, AudioBalance, SyncOffset, MonitorType and AudioTracks meaningful.

IsActive

Gets whether the input is on the air: shown in the program output, because the scene that is on the air shows it (or a scene in it, and the scene item is not hidden), or because a transition between two scenes shows it. It is null unless the model was asked to follow the activity (HighVolume with Activity): OBS Studio sends an event for the inputs of a scene each time that the program scene, a transition or a scene item that shows them changes, so the model does not ask for them unless they are wanted. To ask OBS Studio once, whatever the options are, use GetActivityAsync(CancellationToken).

IsMuted

Gets whether the input is muted. The value is current: OBS Studio announces every change of it.

IsShowing

Gets whether the input is shown in the user interface of OBS Studio: on the air (IsActive), or in the preview of studio mode, or in a projector, or in the window of its properties. It is null unless the model was asked to follow the activity (HighVolume with Activity).

Kind

Gets the kind of the input, for example wasapi_input_capture or color_source_v3.

Levels

Gets the levels of the audio of the input, as OBS Studio measured them in its last message: how loud each channel is. It is null unless the model was asked to follow the levels (HighVolume with AudioLevels), and while OBS Studio does not list the input: it lists the inputs that are on the air (IsActive) and have audio (HasAudio), and says nothing of the others.

Media

Gets the playback of the input when it plays media that can be controlled (a media source, a VLC video source): its state, and the calls that play, pause, stop and seek it. It is null for an input that is no media input (a camera, a color source, a browser source), and it is the same object for as long as the input exists.

MonitorType

Gets whether the audio of the input is also played on the monitoring device of the computer of OBS Studio. The value is current: OBS Studio announces every change of it. Only meaningful when HasAudio. OBS Studio 33 has no MonitorOnly: see ObsMonitorType.

Settings

Gets the settings of the input: a JSON object with the values that were set, as OBS Studio says them ({"text":"Hello","font":{"face":"Arial","size":48}} for a text input).

SyncOffset

Gets how much the audio of the input is delayed (when it is positive) or advanced (when it is negative), to bring it in sync with the video: from -950 ms to 20 s, in whole milliseconds. The value is current: OBS Studio announces every change of it. Only meaningful when HasAudio.

VolumeDb

Gets the volume of the input in decibel, as a single-precision number (see VolumeMul). The value is current: OBS Studio announces every change of it.

VolumeMul

Gets the volume of the input as a multiplier (1 is 0 dB), with the precision that OBS Studio has: a single-precision number, as the one of ObsClient, so that a volume of 0.1 reads 0.1. The value is current: OBS Studio announces every change of it.

Methods

GetDeinterlaceFieldOrderAsync(CancellationToken)

Asks OBS Studio which field of an interlaced frame of the input comes first.

GetDeinterlaceModeAsync(CancellationToken)

Asks OBS Studio how the video of the input is deinterlaced.

GetPropertyItemsAsync(string, CancellationToken)

Asks OBS Studio for the choices of a list property of the input: what the dropdown with that name in the properties window of the input holds.

OpenFiltersDialogAsync(CancellationToken)

Opens the window with the filters of the input in OBS Studio, and returns when OBS Studio has answered.

OpenInteractDialogAsync(CancellationToken)

Opens the window in which a person can use the input as if it was on the screen (a browser source: click, type, scroll), and returns when OBS Studio has answered.

OpenPropertiesDialogAsync(CancellationToken)

Opens the window with the properties of the input in OBS Studio, and returns when OBS Studio has answered.

PressPropertyButtonAsync(string, CancellationToken)

Presses a button of the properties of the input, as a person does in the properties window, and returns when OBS Studio has answered.

RemoveAsync(CancellationToken)

Removes the input, and the scene items that show it, and returns when the model shows it.

RenameAsync(string, CancellationToken)

Gives the input another name, and returns when the model shows it.

SetAudioBalanceAsync(float, CancellationToken)

Sets the balance of the audio of the input between the left and the right, and returns when the model shows it.

SetAudioTracksAsync(ObsAudioTracks, CancellationToken)

Sets the audio tracks that the input is mixed into, and returns when the model shows it.

SetDeinterlaceFieldOrderAsync(ObsDeinterlaceFieldOrder, CancellationToken)

Sets which field of an interlaced frame of the input comes first, and returns when OBS Studio has answered.

SetDeinterlaceModeAsync(ObsDeinterlaceMode, CancellationToken)

Sets how the video of the input is deinterlaced, and returns when OBS Studio has answered.

SetEnabledInAllScenesAsync(bool, CancellationToken)

Shows or hides the input in every scene that shows it, and returns when the model shows it.

SetMonitorTypeAsync(ObsMonitorType, CancellationToken)

Sets whether the audio of the input is also played on the monitoring device, and returns when the model shows it.

SetMutedAsync(bool, CancellationToken)

Mutes or unmutes the input, and returns when the model shows it.

SetSettingsAsync(object, bool, CancellationToken)

Changes the settings of the input, and returns when the model shows it.

SetSyncOffsetAsync(TimeSpan, CancellationToken)

Sets how much the audio of the input is delayed or advanced, and returns when the model shows it.

SetVolumeDbAsync(double, CancellationToken)

Sets the volume of the input in decibels, and returns when the model shows it.

SetVolumeMulAsync(double, CancellationToken)

Sets the volume of the input as a multiplier, and returns when the model shows it.

ToggleMuteAsync(CancellationToken)

Mutes the input when it is not muted, and unmutes it when it is, and returns when the model shows it.