Table of Contents

Method GetVideoSettingsAsync

Namespace
OBSStudioClient.Model
Assembly
OBSClient.dll

GetVideoSettingsAsync(CancellationToken)

Asks OBS Studio for its video settings: the base (canvas) resolution, the output resolution and the frame rate of the profile that is current.

public Task<ObsVideoSettings> GetVideoSettingsAsync(CancellationToken cancellationToken = default)

Parameters

cancellationToken CancellationToken

A token that ends the wait. A request that was not sent yet is not sent.

Returns

Task<ObsVideoSettings>

The settings at the moment that OBS Studio answered.

Remarks

OBS Studio does not announce a change of the video settings, so the model does not keep them: ask when you need them. They belong to the profile (ObsProfiles), so they are other ones after a switch to another profile. The request is made in its turn, after the changes that were asked for before it (see SetEnabledAsync(bool, CancellationToken)).

Exceptions

ObsNotConnectedException

There is no connection to OBS Studio.

ObsNotReadyException

OBS Studio is changing its scene collection, or did so after the call.

TimeoutException

OBS Studio did not answer in time (WriteTimeout).