Resource icon

How to setup instant replay in OBS Studio

Thanks to the hard work of volunteers on OBS Studio, it now includes the powerful functionality of scripting. More on that here.

This has enabled a very cool feature: Instant Replays.

This guide will go over how to setup an instant replays It can be setup in the same scene as your gameplay or main video, or even configured to be used in a separate scene for cool instant replay scene transitions.


Requirements:
OBS Studio Update 21.xx.xx

---

1. Open the OBS Studio settings, go to output, and check the box "Enable Replay Buffer"
Set the length to your desired time. Note: Longer replay buffers require more memory. For this guide we'll use 10 seconds.

2. In the general settings, check the box to Automatically start replay buffer when streaming.

3. In the Hotkey settings, set a hotkey for saving the replay buffer. For this guide, we'll use Ctrl+Shift+S.
Using this hotkey you can still save replays normally, even with Instant Replays setup.

4. Now, close the settings page and start the replay buffer by clicking on "Start Replay Buffer" towards the bottom right of OBS Studio.

5. Add a new media source to the current scene, we'll call it "Instant Replay" for this guide, and select the Replay buffer file.
By default it will be located in the “Videos” folder and the file name will start with Replay.

6. At the top of OBS Studio, click on tools, then scripts and select “instant-replay.lua”

7. From the Media Source drop down menu, select the media source you just added to the scene. Then hit close.
If the media source is not appearing, click on the refresh icon to the left.

8.Open up the OBS Studio settings again and go to the Hotkeys section. There will be a new hotkey, called "Instant Replay".
For this guide, we'll set the hotkey to Ctrl+Shift+R.

9. Now your Instant Replay feature is ready. Simply press the hotkey combination you just chose, and the last 10 seconds will play in the media source. You can now resize the source and move it around.

If you have a control device such as a Stream Deck, you can create a hotkey action, set the hotkey to the same as in OBS Studio, and then you have the power of instant replay at the press of a button.
Author
Videophile
Views
297,872
First release
Last update
Rating
3.64 star(s) 11 ratings

More resources from Videophile

Latest reviews

This actually does work but the instructions are less than precise.

I even found a way to create a second source folder that played at a different speed, so I have one set to 66% and another to 33%, though that may change. Then I broke it somehow and couldn't make the second source work anymore, no way, no how.

THEN I made a copy of the script with a different name and linked it to the second source. "Instant Replay" now shows up twice on the hot-key page with identical names and I use the same key for both. It still only saves one file but now I can use different hot-keys for the replay sources that have differing play-speed settings.

But yeah, the instructions...
Poor instructions, misses out several key points, such as clicking the "+" to load in the script from a file. Also does not bother to explain what or where the replay buffer is. Apparently the replay buffer is located in your MY VIDEOS folder. God help you if not on windows.
Works very well as advertised! Just need to solve how to save each instant replay so I can make a highlights reel :-)
I installed all the stuff necessary and with out fail it just worked. Even with multiple replay files, no issues. If you add the slow motion plugin and set it up you can get the replay in slow motion. I've used this feature now in 7 or my son's soccer games as they are being live streamed, much to the enjoyment of the viewers.
I had no issues with the OP's instructions. Everything worked as described. Only thing I did differently was checked off the box to close the media source when it's not active. Each replay saved as a separate file (great for highlights later) and played correctly.
Guys, there is an easy solution to your problem, he unfortunately doesn't mention it in the guide. This will only work if you don't care about recording your broadcasts. If you go to Settings|Advanced, under "Recording" you will see that it does filename formatting that puts a date/time stamp as the filename. Remove ALL of that, and have it simply save the file with the "Replay Buffer Filename Prefix" set to "Replay". This way, every time it saves the replay buffer, it will just overwrite the the file, instead of creating a new file with a new filestamp. You might also have to check off in the media source to "Close the file when not in use" if you get any sharing violation issues.

I was having the same issue as you guys, once I did this, now I can easily just press CTRL+SHIFT+S and then CTRL+SHIFT+R and it's always my LATEST recording, because it just keeps overwriting the same file. Hope this helps!
Doesnt work for me either
If I had to guess, the instant-replay.lua script is meant to replace the Media source with the latest Replay Buffer video but that simply doesn't happen and the original video is played. This resource does not work.
Top