Table of Contents

Method CreateChapterAsync

Namespace
OBSStudioClient.Model
Assembly
OBSClient.dll

CreateChapterAsync(string?, CancellationToken)

Adds a chapter marker to the file that is being recorded, and returns when OBS Studio has accepted the request.

public Task CreateChapterAsync(string? name = null, CancellationToken cancellationToken = default)

Parameters

name string

The name of the chapter, or null to let OBS Studio name it.

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

As of OBS Studio 30.2 only the Hybrid MP4 format has chapters. Adding a chapter 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 its format has no chapters (Verify that the output being used supports chapter markers), or this OBS Studio does not have the request (it needs obs-websocket 5.5.0).