Skip to content

About

An OBS Studio plugin that extends the built-in Replay Buffer. Save recent footage at different lengths (e.g., 30 seconds, 5 minutes), automatically trimming the replay buffer without re-encoding.

Topics

Resources

Contributing

Stars

34 stars

Watchers

2 watching

Forks

Repository files navigation

Replay Buffer Pro

GitHub Release GitHub Release Date Ask DeepWiki

This OBS Studio plugin expands upon the built-in Replay Buffer, allowing users to save recent footage at different lengths with customizable save buttons, similar to how PlayStation/Xbox's "Save Recent Gameplay" functionality.

Note: Windows builds are 64-bit only, as OBS Studio 29.0.0+ dropped 32-bit support. macOS builds are universal binaries (arm64 + x86_64).

How It Works

OBS keeps a rolling buffer of the last few seconds or minutes of footage in memory using the built-in replay buffer. The length of this footage is defined in settings. If the amount of footage exceeds the length in settings, old footage is overwritten as new footage is recorded.

Unlike the default Replay Buffer, which saves a fixed duration, this OBS Studio plugin allows users to save different lengths on demand. Set the replay buffer length, then clip custom lengths of footage automatically. Example: Set your replay buffer to 10 minutes. Save the last 30 seconds, 2 minutes, or 5 minutes instantly with UI buttons or hotkeys.

The project website is currently hosted via GitHub Pages.

Usage

Full guide: How to use Replay Buffer Pro.

Start the Replay Buffer in OBS, then save a clip any of these ways. Each one is trimmed to its duration without re-encoding, and the trimmed _trimmed file replaces the original.

  • Dock buttons. Docks → Replay Buffer Pro has six save buttons. Use Customize to set each to any length from 1 second to 6 hours, and the numeric field to set the buffer length (while the buffer is stopped).
  • Hotkeys. Bind each Replay Buffer Pro: Save … entry in Settings → Hotkeys.
  • obs-websocket. Send CallVendorRequest with vendor replay-buffer-pro, request SaveClip and data {"durationSeconds": 120}. Durations are whole seconds from 1 to 21600, and a request longer than the buffer saves the whole buffer. The response is {"accepted": true, ...} or {"accepted": false, "error": "..."}; the usage guide lists the errors and has examples.
  • Save Replay Buffer button. Saves the whole buffer, untrimmed.

Saves made with OBS's own Save Replay hotkey or tray menu are not trimmed.

Community integrations

Other people have built tools that work with Replay Buffer Pro, including a Stream Deck plugin and the Smart Replay Mover OBS script. These are not necessarily endorsed or tested by this project. See the community integrations page for the list and how Stream Deck fits in.

Installation

From Release

Windows:

  1. Download the latest .zip release
  2. Extract the ZIP file
  3. Copy the replay-buffer-pro folder to %ALLUSERSPROFILE%\obs-studio\plugins\ (typically C:\ProgramData\obs-studio\plugins\)

Final file structure should look like this:

obs-studio/
└── plugins/
    └── replay-buffer-pro/
        ├── bin/
        │   └── 64bit/
        │       └── replay-buffer-pro.dll
        └── data/
            └── locale/
                └── en-US.ini

Note: The %ALLUSERSPROFILE% environment variable typically resolves to C:\ProgramData. You can type this directly into File Explorer's address bar.

macOS:

  1. Download the latest .pkg release (universal: arm64 + x86_64)
  2. Open the downloaded .pkg and follow the installer
  3. The installer places the plugin at ~/Library/Application Support/obs-studio/plugins/replay-buffer-pro.plugin automatically

Note: If macOS blocks the installer because it's from an unidentified developer, right-click (or Control-click) the .pkg and choose Open, then confirm in the dialog.

Building from Source

The build system follows the obs-plugintemplate pattern. All dependencies (OBS Studio source, prebuilt obs-deps, Qt6) are automatically downloaded at configure time.

Requirements

Windows:

  • Windows 10/11 64-bit
  • Visual Studio 2022+ with "Desktop development with C++"
  • CMake 3.28+

macOS:

  • macOS 13.0+ (builds target macOS 13.0+; universal binary: arm64 + x86_64)
  • Xcode 26.5+ with macOS SDK 26.5+
  • CMake 3.28+

No manual OBS clone, Qt6 install, or FFmpeg setup is needed on either platform — everything is fetched automatically.

Build (Windows)

git clone https://github.com/joshuapotter/replay-buffer-pro.git
cd replay-buffer-pro

# Configure (first run downloads deps and builds OBS — takes a few minutes)
cmake --preset windows-x64

# Build the plugin
cmake --build --preset windows-x64

# Install (close OBS first)
cmake --install build_x64 --config RelWithDebInfo

The install target places the plugin in %ALLUSERSPROFILE%/obs-studio/plugins/. After building, a rundir is also available at build_x64/rundir/RelWithDebInfo/ for quick testing.

Build (macOS)

git clone https://github.com/joshuapotter/replay-buffer-pro.git
cd replay-buffer-pro

# Configure (first run downloads deps and builds OBS — takes a few minutes)
cmake --preset macos

# Build the plugin (universal binary)
cmake --build --preset macos

# Install (close OBS first)
cmake --install build_macos --config RelWithDebInfo

The install target places the .plugin bundle in ~/Library/Application Support/obs-studio/plugins/. After building, a rundir is also available at build_macos/rundir/RelWithDebInfo/ for quick testing.

Release (Windows)

Update the version in buildspec.json, then run:

cmake --preset windows-x64
cmake --build build_x64 --config RelWithDebInfo --target prepare_release

This creates build_x64/releases/<version>/replay-buffer-pro-windows-x64.zip.

Release (macOS)

There is no local one-command release target for macOS. Packaging (codesigning, notarization, and .pkg creation via .github/scripts/package-macos) requires CI credentials and only runs in GitHub Actions — see CI / GitHub Actions below.

CI / GitHub Actions

Pushing a semver tag (e.g., 1.4.0) to main/master triggers the GitHub Actions workflow, which builds the plugin for both Windows and macOS and creates a draft GitHub release with all artifacts attached (Windows .zip and macOS .pkg).

Project Structure

replay-buffer-pro/
├── buildspec.json       # Plugin metadata + dependency versions (Windows + macOS)
├── CMakePresets.json    # Build presets (windows-x64, macos)
├── CMakeLists.txt       # Main build configuration
├── cmake/               # CMake modules (common + windows + macos)
├── data/               
│   └── locale/          # Translations
├── src/                 # Source files (fully cross-platform)
│   ├── config/          # Config constants
│   ├── managers/        # Core functionality managers
│   ├── plugin/          # Main plugin implementation
│   ├── ui/              # User interface components
│   └── utils/           # Utility classes (including video-trimmer)
├── .github/             # CI workflows, actions, scripts (Windows + macOS)
├── pages/               # Project website source
├── docs/                # Developer documentation
└── README.md

Troubleshooting

  • Verify plugin file location (.dll on Windows, .plugin bundle on macOS)
  • Check OBS logs for errors

A clip wasn't trimmed

Every replay save writes one TRIM VERDICT line to the OBS log (Help → Log Files → Show Log Files). Search the log for TRIM VERDICT and find the line matching the clip:

  • skipped reason=no-pending-request — the save was triggered outside this plugin, so it was saved at full buffer length. OBS's own Save Replay hotkey, the tray menu item, and Stream Deck buttons using the official OBS Studio plugin's "Save Replay Buffer" action all take this path. Use one of Replay Buffer Pro's own Save Clip hotkeys (Settings → Hotkeys → Replay Buffer Pro: Save ...) so the plugin knows which duration you wanted.
  • skipped reason=save-full-buffer — this was a Save Replay Buffer click, which is intentionally untrimmed.
  • skipped reason=encoder-paused — recording was paused when you pressed save. OBS doesn't save the replay buffer while recording is paused, so nothing was saved. Resume recording and press save again.
  • skipped reason=replay-buffer-stopped — the replay buffer was stopped before OBS started writing the clip.

If you press a save hotkey while OBS is still writing a previous clip, the new save waits for that write to finish, then is trimmed back so it ends at the moment you pressed the key. That clip's verdict line shows end_offset=, how long it waited (not counting time recording was paused). On slow storage such as a network drive, where writing a long buffer can take minutes, a short replay buffer may no longer hold everything before your press: the clip still ends at the press but is shorter, or, if the buffer holds nothing from before the press, the trim fails with window-not-in-buffer and the full-length file is kept. A Save Replay Buffer click is never trimmed, so if it has to wait, it contains the buffer as of when it was written, not when you clicked.

  • failed reason=output-too-long — your encoder's keyframe interval is too long for the clip length you asked for, so the cut could not land near the right place. Set Settings → Output → Keyframe Interval to 2 seconds.
  • failed reason=window-not-in-buffer — the save had to wait for a previous clip to finish writing, and by then your replay buffer no longer held anything from before you pressed the key. The full-length file is kept. Increase the replay buffer length, or save to faster storage.
  • failed reason=open-input-failed — something else was holding the file. If Settings → Advanced → Automatically remux to mp4 is enabled, try turning it off; antivirus and cloud-sync folders can do the same.
  • Any other failed reason=... — check disk space and write permissions in the output directory, and include the line when reporting an issue.

A failed trim always leaves your original full-length clip in place, so nothing is lost.

  • When building from source:
    • Windows: Ensure Visual Studio 2022+ and CMake 3.28+ are installed
    • macOS: Ensure Xcode 26.5+ (with macOS SDK 26.5+) and CMake 3.28+ are installed; run xcode-select --install if needed
    • First configure run downloads ~500MB of dependencies — ensure network access
    • Windows: Run install command in a terminal with admin privileges if installing to a protected directory

Third-Party Software

This plugin uses OBS Studio's built-in FFmpeg libraries (libavformat) for video trimming functionality. FFmpeg is licensed under the LGPL v2.1+ license.

Because the plugin links against OBS's bundled FFmpeg libraries by soname, each release is built against a specific OBS version's FFmpeg major version and is not binary-compatible with OBS versions that ship a different FFmpeg major. Always use the plugin release matching your OBS Studio version's minimum requirement.

License

GPL v2 or later. See LICENSE file for details.

About

An OBS Studio plugin that extends the built-in Replay Buffer. Save recent footage at different lengths (e.g., 30 seconds, 5 minutes), automatically trimming the replay buffer without re-encoding.

Topics

Resources

Contributing

Stars

34 stars

Watchers

2 watching

Forks

Releases

Used by

Contributors

Languages