Table of Contents

Method GetStatisticsAsync

Namespace
OBSStudioClient.Model
Assembly
OBSClient.dll

GetStatisticsAsync(CancellationToken)

Asks OBS Studio for the figures of the stream: how long it runs, how many bytes it has sent, how many frames were skipped, and how congested the connection to the streaming service is.

public Task<OutputStatusResponse> GetStatisticsAsync(CancellationToken cancellationToken = default)

Parameters

cancellationToken CancellationToken

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

Returns

Task<OutputStatusResponse>

The figures at the moment that OBS Studio answered. OutputActive and OutputReconnecting are the state at that moment too; Status is the one that the model keeps current.

Remarks

The figures change all the time, and OBS Studio sends no event for them: the model does not keep them, ask when you need them. The request is made in its turn, after the changes that were asked for before it (see SetEnabledAsync(bool, CancellationToken)). The figures of a stream that does not run are zero.

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).