Skip to content

Add replay buffer scene override#13186

Open
moxyvv wants to merge 3 commits intoobsproject:masterfrom
moxyvv:feature/replay-buffer-scene-override
Open

Add replay buffer scene override#13186
moxyvv wants to merge 3 commits intoobsproject:masterfrom
moxyvv:feature/replay-buffer-scene-override

Conversation

@moxyvv
Copy link

@moxyvv moxyvv commented Mar 3, 2026

Description

Adds an option to select a specific scene for the replay buffer output, independent of the current program scene. When configured, the replay buffer uses a dedicated obs_view_t and video encoder to render and encode from the selected scene, while streaming continues from the program output as normal.

A new Scene dropdown appears in the replay buffer section of Output settings (both Simple and Advanced modes). The default value, (Current Scene), preserves existing behavior.

Motivation and Context

Some users want their replay buffer clips to contain clean gameplay footage without overlays, face cams, or other sources that are part of their streaming scene. Currently the replay buffer always encodes the program output, so the only workaround is to manually switch scenes before saving a replay — which defeats the purpose of instant replay.

This feature lets users designate a scene (e.g. a game-capture-only scene) for replays while streaming with their full production layout.

How Has This Been Tested?

  • Built on Windows with Visual Studio 2022 / CMake
  • Verified replay buffer saves from the override scene while streaming from a different scene
  • Verified default behavior is unchanged when set to "(Current Scene)"
  • Verified settings load/save correctly across restarts in both Simple and Advanced output modes
  • Verified the separate view and encoder are properly created and destroyed

Types of changes

  • New feature (non-breaking change which adds functionality)

Checklist

  • Code has been run through clang-format
  • I have read the contributing document
  • This is not a change to the master branch
  • Code has been tested
  • All commit messages are properly formatted and commits are squashed where appropriate

@Penwy
Copy link
Contributor

Penwy commented Mar 3, 2026

A new Scene dropdown appears in the replay buffer section of Output settings (both Simple and Advanced modes). The default value, (Current Scene), preserves existing behavior.

I do think the overall idea has some merit --although it might increase encoding load for a lot of users as it means separating the recording and replay buffer encoders, and it needs to be thoroughly tested--, but if it is to be implemented, it should make use of the same output selector mechanism as the virtualcam, in a button in the controls docks.

@moxyvv
Copy link
Author

moxyvv commented Mar 3, 2026

Good point — I'll rework this to use a config button in the controls dock with the same output selector pattern as the virtual camera. Will push an updated version.

Adds the ability to configure the replay buffer to capture from
a specific scene instead of the program output. This is useful
for users who want clean gameplay clips without overlays, webcams,
or other sources that are part of their streaming scene.

Mirrors the existing virtual camera output selection pattern:
- Gear button in the controls dock next to the replay buffer
- Configuration dialog to select Program or a specific scene
- Separate obs_view and video encoder when a scene is selected
- Falls back to the default recording encoder when set to Program

The replay buffer view and encoder are created on start and
torn down on stop to avoid unnecessary rendering when idle.
@moxyvv moxyvv force-pushed the feature/replay-buffer-scene-override branch from 43fa6fb to 8a6902d Compare March 3, 2026 19:18
moxyvv added 2 commits March 3, 2026 14:26
SimpleOutput and AdvancedOutput cannot access OBSBasic private
members directly since only BasicOutputHandler is declared as a
friend. Move the replay buffer scene override setup into a shared
method on BasicOutputHandler to fix compilation on clang.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants