Resource icon

Instant Replay 1.1.0

adocilesloth submitted a new resource:

Instant Replay - Plugin to facilitate Instant Replays in live streams

Instant Replay OBS Studio
This plugin is designed to provide the ability to add Instant Replays into a live stream.
It's effectively a combination of the "Automatic Scene Switching" and "Per Scene Volume" (from OBS Classic) plugins to allow instant replays in live streams.

It's designed to work along side a Stinger Transition, but it will function with cuts or fades or what have you.

An example:

Settings (Tools -> Instant Replay Settings):

Fill out the settings as desired.
  • Enable - Enables/disable the plugins
  • Write Pause (s) - Pause to allow OBS to write the replay file. OBS can't instantly write a file. ~10 seconds should be okay. Find something that works for you
  • Transition Pause (ms) - Length of the transition in milliseconds. If the stinger is at 30fps, multiply the number of frames by 33. If the stinger is at 60fps, multiply the number of frames by 16.
  • Replay Length (s) - Length of the replay in seconds. OBS does not always write as much replay as you tell it to so this may need to be a second or two shorter than the buffer length.
  • Replay Scene - Scene to switch to that has the replay source.
  • Mute Desktop Audio - Mute the Desktop Audio channels when replay is playing.
  • Mute Mic/Aux - Mute the Mic/Aux channels when replay is playing.

Hotkey (Settings -> Hotkeys):

Find the "Instant Replay" hotkey (highlighted above in red). Set it TO THE SAME KEY as you have "Save Replay" (highlighted in orange).

Setting up the replay source:
Set your Recording to a constant name (so remove all the % stuff). Makes it easy to point your replay source to a file that will exist. Point your Media Source to what your replay will be saved as.

Installation
+WINDOWS

Windows is built and working for both 32bit and 64bit

Drag and drop obs-studio folder into C:\Program Files
(or wher ever you have obs-studio installed)
Merge all files down and you should be good to go.

+LINUX
Dependancies:
OBS (duh)
Qt5 dev

Clone the git repo:
Code:
git clone https://github.com/adocilesloth/InstantReplay.git
cd to where you downloaded the source

Check the environment PATHS in Makefile
- Make sure they match your OBS and Qt5 installations and fix if necessary.
(OBS_API_INCLUDE will not need updating as the files are in the git repo)

Then run:
Code:
make
make install
make clean (optional: if you want to remove the temporary .o and .so files)
+MAC
Uh, sould work. Probably. Maybe. Don't have a MAC to test with.
So...
You can try the LINUX instructions.
Let me know if you get it to work!

As ever, if you want to see how bad my coding is, source code is available on GitHub

Read more about this resource...
 
Last edited:

Shaky Scrub

New Member
I seem to be having issues with this. When my scene transitions to the Replay scene, the replay media source is paused or frozen. It doesn't show it playing. I tried the Stringer transition but I get the same result. Any ideas what i'm missing here?
 
I seem to be having issues with this. When my scene transitions to the Replay scene, the replay media source is paused or frozen. It doesn't show it playing. I tried the Stringer transition but I get the same result. Any ideas what i'm missing here?
Is your Media Source set to "Restart Playback when source becomes active"?
Might also help to have it set to "Close file when inactive" to prevent overwrite issues.
 

VonGrimm

New Member
Is your Media Source set to "Restart Playback when source becomes active"?
Might also help to have it set to "Close file when inactive" to prevent overwrite issues.
I too am having this same issue. Tried applying those settings you suggested to the Media Source but to no avail. Refreshing the scene manually does not allow playback either. I have to refresh the source for playback to play the newest overwritten file. Obviously this is an OBS issue and not because of your plugin.
 

Methanoid

New Member
Great addon, got it working with playback np, only issue i have is that when the replay is being played back my desktop sound gets muted during replay playback and resumes once the replay is complete (the recording is muted, the actual desktop volumes fine). I currently have the replay's audio muted as i dont want overlapping sound.

Any ideas why the replay mutes my desktop sound?
 
Any ideas why the replay mutes my desktop sound?
Yes. That is what the plugin is designed to do. Mute the desktop and mic when the replay plays so you hear the replay without overlapping sound. So it's doing what you are trying to do but the other way around.

I realise now that I didn't make this clear in the OP. I will fix it when I have time.
 

Methanoid

New Member
can it be a toggle for either way, if the addon had a choice of your intended way and another for "mute playback audio" to audio that would be great esp as i prefer having my replay silent so my music and current game arent interrupted or repeated in the case of music. now i just have to cure the issue of immense onscreen lag on the recordings onscreen playback even tho actual gameplay is perfect. (Fixed lag by not using MP4 to encode)
 
Last edited:

Methanoid

New Member
Why don't I have an item Save Replay?
i get what you mean, i have 2 pc's, both are windows 8.1 x64, almost identical software setup, install paths are the same, only the cpu's are really different, one is an intel i7 4720HQ, the other is an intel i7 4770S, on the 4720HQ system the plugin shows up perfectly, on the 4770S the plugin does not register, im not sure why atm.

Also i kinda really hope for the option to have the replay vid be the muted audio and not the desktop audio to be a thing, ive been using this for gaming and things get confusing when the replay repeats the music and voice comms.
 
Why don't I have an item Save Replay?
Make sure that the Replay Buffer is enabled: Settings -> Output -> Recording -> Enable Replay Buffer

can it be a toggle for either way, if the addon had a choice of your intended way and another for "mute playback audio" to audio that would be great esp as i prefer having my replay silent so my music and current game arent interrupted or repeated in the case of music. now i just have to cure the issue of immense onscreen lag on the recordings onscreen playback even tho actual gameplay is perfect. (Fixed lag by not using MP4 to encode)
Also i kinda really hope for the option to have the replay vid be the muted audio and not the desktop audio to be a thing, ive been using this for gaming and things get confusing when the replay repeats the music and voice comms.
If I get some time, I'll have a look.
 
Is there any future plans to allow it to capture a certain source instead of the entire Active Scene?
The plugin doesn't capture anything, it just switches scenes and mutes/unmutes audio.

I don't understand what it does more than the normal functionality. can you explain?
It's a quality of life thing more than an added functionality thing.

With this plugin, you press one button, it saves a replay, waits for the replay file to be written, switches to a scene with the replay as a source, mutes the desktop and mic audio, plays the replay then switches back and unmutes the desktop and mic.

Without out it, you'd have to save the replay, wait for a bit, press a hotkey to switch scenes, press a hotkey to mute the desktop and mic, wait and hope you have left it long enough to show the whole replay, press a hotkey to switch scenes back and press another hotkey to unmute the desktop and mic.

So the plugin is a kind of fire and forget plugin. You hit one button and it deals with all the scenes and audio settings so you can continue playing or what ever. Without it, you have to remember to press all the hotkeys at the right time while also doing what ever you were doing.
 

david-1984

New Member
this is a very good tool but I think 1 important thing is missing.
you are forced to over wright all the replay. What about if you would want to avoid it?
you should tell the system to take the latest replay always and not a fixed name. would it be possible?
 

xip

New Member
32bit shown, 64bit not shown

17:05:56.829: Required module function 'obs_module_load' in module '../../obs-plugins/64bit/chrome_elf.dll' not found, loading of module failed
17:05:56.834: [CoreAudio encoder]: CoreAudio AAC encoder not installed on the system or couldn't be loaded
17:05:58.746: [AMF] <obs_module_load> AMF not supported (no AMD graphics)
17:05:58.747: Failed to initialize module 'enc-amf.dll'
17:05:58.772: LoadLibrary failed for '../../obs-plugins/64bit/InstantReplay.dll': (null) (126)
17:05:58.773: Module '../../obs-plugins/64bit/InstantReplay.dll' not loaded
17:05:58.815: Required module function 'obs_module_load' in module '../../obs-plugins/64bit/libcef.dll' not found, loading of module failed
17:05:58.816: Required module function 'obs_module_load' in module '../../obs-plugins/64bit/libEGL.dll' not found, loading of module failed
17:05:58.818: Required module function 'obs_module_load' in module '../../obs-plugins/64bit/libGLESv2.dll' not found, loading of module failed
17:05:58.819: Failed to load 'en-US' text for module: 'obs-browser.dll'
17:05:58.819: [browser_source: 'Version: 1.29.0']
17:05:58.826: LoadLibrary failed for 'nvEncodeAPI64.dll': (null) (126)
17:05:59.345: VLC found, VLC video source enabled
17:05:59.357: No blackmagic support
17:05:59.995: [Media Foundation encoder]: plugin is disabled for performance reasons on Windows versions prior to 8
 

sedris

New Member
I have sime issues with your plugin after updating to OBS 21.0.1, it has worked before. First replay is played whole, but then it plays incorrect fragment of the buffer. Buffer is being overwritten correctly. Is plugin compatible with newer version?
 
It's working fine for me so as far as I know it's compatible with 21.0.1. Try increasing the time before your replay is played, it might be that the buffer isn't fully saved (I know you said it is, but worth checking).
 
Top