Table of Contents

Method SplitFileAsync

Namespace
OBSStudioClient.Model
Assembly
OBSClient.dll

SplitFileAsync(CancellationToken)

Splits the recording: OBS Studio finishes the file that it is writing and goes on in a new one. It returns when OBS Studio has accepted the request.

public Task SplitFileAsync(CancellationToken cancellationToken = default)

Parameters

cancellationToken CancellationToken

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

Returns

Task

A task that completes when OBS Studio has answered.

Remarks

OBS Studio writes the new file a moment after it has answered, and says so in the event that FileChanged raises. Splitting changes nothing in the model, so the call does not wait for it. See SetEnabledAsync(bool, CancellationToken) for the order of changes.

Exceptions

ObsNotConnectedException

There is no connection to OBS Studio. Nothing was changed.

ObsNotReadyException

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

ObsUnknownOutcomeException

OBS Studio did not answer in time, or the connection ended: it is not known whether it made the change.

ObsResponseException

OBS Studio refused the request: the recording is not running, or it does not allow splitting (Verify that file splitting is enabled in the output settings), or this OBS Studio does not have the request (it needs obs-websocket 5.5.0).