MULTIPLE REPLAY BUFFERS

An AutoHotkey & FFmpeg script that enables you to create multiple replay buffers in OBS.

Download

What is MRB?

MRB (Multiple Replay Buffers) is an AutoHotkey script that works with OBS and FFmpeg to enable you to have multiple replay buffers.

---

It's inspired from consoles, being able to save as long as you wanted, and Shadowplay.

This script allows you to save short high-octane plays (20 - 30 seconds) and long strategic plays (3 - 5 minutes or more!) simultaneously and separately. If you play Hearts of Iron 4 you might as well record the whole thing 😅

Project Status

This script is considered feature-complete and is no longer actively maintained. It is stable and works as intended.

Features & Customization

Core Features

  • Variable Replay Length: Save anywhere from 8 seconds to 5 minutes of gameplay (customisable, so you can actually save for longer).
  • Automatic Organization: Automatically sorts your saved replays into folders based on the game you're playing. To opt-out, disable autoOrganise in settings.
  • Video Compression: Compress clips using x264 or x265 codecs via FFmpeg to save disk space. Opt-in via threshold.
  • Notifications: Get a desktop notification the moment a replay is successfully saved.

Full Customization

  • Choose the number of replay buffers you want to use.
  • Set a custom duration for each individual replay buffer. Go beyond 5 minutes!
  • Select your preferred compression type (x264, x265) or disable it entirely.
  • Toggle automatic folder organization on or off.
  • Enable or disable save notifications.

This script is also easy to customise! Forget everything and write your own FFmpeg commands if you want!

Prerequisites

To use this script, you will need the following software installed and configured on your Windows PC. Click the names to download them. Links open on a new tab.

  • OBS Studio: The core broadcasting and recording software.
  • FFmpeg: A powerful multimedia framework used for video compression.
  • AutoHotkey v2: The scripting language this tool is built on.

How to Use

Once installed, use the following hotkeys to save your videos. These are the default settings and can be customized.

Alt + F2Save last 8 seconds
Alt + F3Save last 20 seconds
Alt + F5Save last 30 seconds
Alt + F6Save last 45 seconds
Alt + F7Save last 60s (1 min)
Alt + F8Save last 120s (2 min)
Alt + F9Save last 180s (3 min)
Alt + F10Save last 300s (5 min)
Alt + F11Start/Stop Recording
Alt + SForce Save Clips

Upon exiting OBS, or force saving with Alt + S, your clips will be trimmed to the last amount of seconds you've chosen for each clip. Yes, it's unfortunately not instant! You wouldn't like your computer to slow down while the video saves, right?

Download

You are downloading the raw AutoHotkey script file. You will need to configure it before use. Please follow the installation guide below carefully.

Installation Guide

I cannot stress this enough, be CAREFUL, follow EVERY STEP CAREFULLY!

A full video tutorial is available here.

While the video shows AutoHotkey v1, download AutoHotkey v2 instead.

1. The Script

  • The script can be saved anywhere on your computer.
  • Optional: To run the script on startup, place a shortcut to it in the startup folder. Press Win + R and enter:
    %AppData%\Microsoft\Windows\Start Menu\Programs\Startup
    Copied!

2. FFmpeg

  1. Download FFmpeg and create a folder for it (e.g., C:\Users\user\Documents\FFmpeg). Its location must not require admin rights to access.
  2. Open the downloaded .7z file and navigate to the bin folder.
  3. Drag and drop ffmpeg.exe into the folder you created.
  4. You can now delete the downloaded .7z file.

3. Setting up the Script

  1. Create two new folders: one for temporary replay files and one for the final, compressed videos.
  2. Open AHK-MRB.ahk with a text editor (like Notepad or VS Code).
  3. Find SetWorkingDir (use Ctrl+F) and set its path to your FFmpeg folder.
  4. Find TemporaryDirectory and set it to your temporary folder path.
  5. Find FinalDirectory and set it to your final folder path.
  6. Save your changes and close the text editor.

4. Setting up OBS (Mandatory)

  1. Set Recording Format: Go to OBS → Settings → Output. Under the Recording tab, set Recording Format to .mkv.
  2. Select Temporary Folder: In the same tab, click Browse next to Recording Path and select the **temporary** folder you created.
  3. Enable & Configure Replay Buffer: Go to the Replay Buffer tab. Check Enable Replay Buffer and set Maximum Replay Time to at least 300 seconds (5 minutes).
  4. Match Hotkeys: Go to OBS → Settings → Hotkeys. Find and replace the following:
    • Save Replay: Alt + F10
    • Start Recording / Stop Recording: Alt + F11
  5. Click Apply and OK. You're all set to run the script!

More Info & Help

For instructions on advanced configuration (like changing buffer durations), please watch this video:

If you are looking for a specific feature, you may seek for what you need on the timestamps.

For more detailed documentation, troubleshooting, and to view the source code, please visit the official GitHub repository.

View on GitHub

Last modified: 1st July 2025