Skip to content

Add optional disk-based storage for Replay Buffer#13558

Open
ygzzfyh123 wants to merge 1 commit into
obsproject:masterfrom
ygzzfyh123:feature/disk-replay-buffer
Open

Add optional disk-based storage for Replay Buffer#13558
ygzzfyh123 wants to merge 1 commit into
obsproject:masterfrom
ygzzfyh123:feature/disk-replay-buffer

Conversation

@ygzzfyh123

Copy link
Copy Markdown

Description

Implemented a disk-based storage mode for the Replay Buffer. Users can now choose to store the replay buffer in a
temporary circular file on an SSD/HDD instead of RAM.

Key changes:

  • Added a "Storage Mode" dropdown in Settings -> Output -> Advanced -> Replay Buffer.
  • Increased the maximum storage limit to 8TB for Disk mode (RAM mode still respects memory safety limits).
  • Implemented a ring-buffer on disk in obs-ffmpeg-mux.c that overwrites the oldest packets when the limit is reached.
  • Ensured efficient I/O by only reading the data back when the user triggers a "Save Replay" action.

image

Motivation and Context

Currently, Replay Buffer is RAM-only, which can lead to system instability or crashes when users with limited RAM want
to capture long or high-bitrate replays. This feature enables virtually unlimited replay duration by utilizing local
high-speed storage (SSDs).

How Has This Been Tested?

  • Hardware: AMD R5 5600 + RTX 3060 12GB + RAM 32GB
  • OS: Windows 11 25H2
  • Tests:
    • Verified standard RAM storage still works as expected.
    • Verified Disk storage creates a temporary file and correctly manages wrap-around overwriting.
    • Successfully saved multiple replays in Disk mode; output files are valid and high-quality.
    • Confirmed temporary files are deleted upon stopping the buffer or closing OBS.

Types of changes

  • New feature (non-breaking change which adds functionality)
  • Tweak (non-breaking change to improve existing functionality)

Checklist:


Note to Maintainers 👇
This feature is entirely optional and disabled by default. Users can choose not to enable it, as it is provided
specifically for those who require extended replay durations without consuming system memory. Standard OBS
functionality and performance remain unaffected, ensuring a safe merge.

Thank you for taking the time to review my pull request!

---Gardenia---AlunixaTeams.

@ygzzfyh123

Copy link
Copy Markdown
Author

@DDRBoxman @derrod @dodgepong @Fenrirthvit i @GeorgesStavracas @jp9000 @notr1ch @PatTheMav @pkviet @prgmitchell @RytoEX @sebastian-s-beckmann @tt2468 @Warchamp7 @WizardCM

@Fenrirthviti

Copy link
Copy Markdown
Member

Please be patient, there are over 300 other pull requests, all of which are demanding our time and attention. If a PR is open, you can rest assured we know it is there. It is considered very poor etiquette to blindly ping members of the repository, refrain from this in the future, as all it does is create noise on our repo.

@ygzzfyh123

Copy link
Copy Markdown
Author

Please be patient, there are over 300 other pull requests, all of which are demanding our time and attention. If a PR is open, you can rest assured we know it is there. It is considered very poor etiquette to blindly ping members of the repository, refrain from this in the future, as all it does is create noise on our repo.

I apologize for my behavior; please forgive me. I thought you didn't see my pull requests.

@WizardCM WizardCM added kind/enhancement Enhancements are not bugs or new features but can improve usability or performance. kind/feature Functionality or other elements that the project doesn't currently have. labels Jul 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

kind/enhancement Enhancements are not bugs or new features but can improve usability or performance. kind/feature Functionality or other elements that the project doesn't currently have.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants