Skip to main content

ReplayOptions

Electron APIs / recorder / ReplayOptions

Defines the configuration options for using the replay buffer.

Extends RecordingBaseOptions and includes additional properties for managing replay specific behavior.

See​

RecordingBaseOptions

Extends​

Properties​

PropertyTypeDescription
audioTrack?numberDefines which audio track(s) should be used for recording. If separateAudioTracks is enabled, it may include multiple tracks such as Track1, Track2, and Track3. Default Track1 See AudioTracks
autoShutdownOnGameExit?booleanAutomatically stops the recording when the game exits. This only applies when recording with a Game capture source.
bufferSecondnumberThe length of the replay buffer in seconds. This determines how much time will be retained in memory before being written to disk on replay save. Must be at least 1. A shorter buffer can not hold a playable segment, and is rejected with a RecorderError carrying the MissingOrInvalidParameters (-11) code. Example: 30 will capture the last 30 seconds before the save.
criticalEncodeSkipRate?numberDeprecated No effect. Stops are now forced and, if needed, OBS restarted on a fixed schedule; see stopReplaysKillTimeoutMs.
fileFormat?kFileFormatSpecifies the container format for the output video file. Common formats include 'fragmented_mp4', 'mkv', 'flv', etc. Default 'fragmented_mp4' See kFileFormat
rootFolderstringThe root directory where replay videos will be saved. This path must be accessible and writable by the recording service. Example: "C:/Recordings/Replays"
stopReplaysKillTimeoutMs?numberHow long (ms) a replays stop may take before it is forced. A forced stop ends on the next frame and drops whatever the encoder had not caught up on yet. If it still has not stopped 30 s later, OBS is restarted and every running output is reported stopped with ProcessTerminated. Defaults to 60000 ms.