Skip to content

This OBS Studio plugin 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.

License

Notifications You must be signed in to change notification settings

JoshuaPotter/replay-buffer-pro

Repository files navigation

Replay Buffer Pro

GitHub Release GitHub Release Date

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

Note: This plugin is 64-bit only, as it requires OBS Studio 29.0.0+ which dropped 32-bit support. The plugin uses Qt6 which also only provides 64-bit builds for Windows.

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 pre-defined 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.

Screenshot

Usage

Saving Clips

  1. Start the Replay Buffer in OBS
  2. Click any save clip button (15s, 30s, 1m, etc.) or use the assigned hotkey
  3. The plugin will:
    • Save the full replay buffer
    • Automatically trim to the selected duration (Without re-encoding)
    • Replace the original file with the trimmed version

Buffer Length

  • Quickly adjust built-in replay buffer length (1s to 6h) without digging through the settings

Hotkeys

  • Assign hotkeys to each save duration button in OBS Settings > Hotkeys

Installation

From Release

  1. Download latest release
  2. Extract and merge the folder obs-studio with your OBS Studio installation

Final file structure should look like this:

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

From Source

  • Plugin installs automatically to OBS directory when using cmake --install . --config RelWithDebInfo

Manual Installation After Building

After building, you can manually copy the files from your build directory:

  1. Copy from build/RelWithDebInfo/ (or the config you built):
    • replay-buffer-pro.dllC:/Program Files/obs-studio/obs-plugins/64bit/
  2. Copy from source data directory:
    • Data files → C:/Program Files/obs-studio/data/obs-plugins/replay-buffer-pro/
  3. Copy from source deps/ffmpeg:
    • FFmpeg files → C:/Program Files/obs-studio/data/obs-plugins/replay-buffer-pro/

Note: Close OBS before installing or copying the DLL. You may need administrator privileges to copy files to Program Files.

Building from Source

Requirements

  • OBS Studio 29.0.0+ (64-bit)
  • Windows 10/11 64-bit (Linux and MacOS are not supported at this time, PRs welcome!)
  • Qt6 (64-bit)
  • Visual Studio 2022+ with C++
  • CMake 3.16+
  • FFmpeg (bundled with plugin)

1. Prerequisites

  1. Install Visual Studio 2022+ with "Desktop development with C++"
  2. Install Qt6 (MSVC 2022 64-bit) from https://www.qt.io/download-qt-installer
  3. Install CMake 3.16+ from https://cmake.org/download/
  4. Download FFmpeg:

2. Build OBS Studio

# Clone OBS (with submodules)
git clone --recursive https://github.com/obsproject/obs-studio.git
cd obs-studio

# Prepare build directory
mkdir -p build && cd build

# Configure with Visual Studio 2022 and Windows dependencies (obs-deps)
# Download obs-deps for Windows separately and set its path via -DDepsPath  (otherwise, omit this parameter)
cmake -G "Visual Studio 17 2022" -A x64 -DDepsPath="C:/Dev/obs-deps-2022" ..

# Build OBS (RelWithDebInfo to match plugin build)
cmake --build . --config RelWithDebInfo

3. Build Plugin

git clone https://github.com/joshuapotter/replay-buffer-pro.git
cd replay-buffer-pro
mkdir -p build && cd build

# Replace path with your local Qt 6 msvc2022_64
cmake -G "Visual Studio 17 2022" -A x64 -DCMAKE_PREFIX_PATH="C:/Qt/6.8.2/msvc2022_64" ..

# Build the plugin (RelWithDebInfo to match OBS)
cmake --build . --config RelWithDebInfo

# Install (run an elevated shell and ensure OBS is closed)
cmake --install . --config RelWithDebInfo

Note: Replace the Qt path with your installation. Ensure the obs-studio repository is located as a sibling of this plugin (same parent directory). You may need to run the install command elevated (Run as administrator) to install to Program Files.

4. Release Plugin

Iterate the version in CMakeLists.txt, then run:

cmake -S .. -B .
cmake --build . --config RelWithDebInfo --target create_release

Project Structure

obs-studio/              # OBS Studio source code (from step 2)
replay-buffer-pro/
├── CMakeLists.txt       # Build configuration
├── data/               
│   └── locale/          # Translations
├── deps/
│   └── ffmpeg/          # FFmpeg executable
├── src/                 # Source files
└── README.md

Troubleshooting

  • Verify plugin DLL location
  • Check OBS logs for errors
  • For trimming issues:
    • Check disk space
    • Verify FFmpeg.exe is in the correct location
    • Check write permissions in output directory
  • When building from source
    • Ensure Qt6 and OBS paths are correct in CMake
    • If building OBS on Windows, ensure -DDepsPath points to your obs-deps directory
    • Run install command in a terminal with admin privileges

Third-Party Software

This plugin includes FFmpeg (https://ffmpeg.org/) for video trimming functionality. FFmpeg is licensed under the LGPL v2.1+ license. See FFmpeg documentation for details.

License

GPL v2 or later. See LICENSE file for details.

About

This OBS Studio plugin 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

License

Contributing

Stars

Watchers

Forks