Resource icon

OBS Lua Instant Replay Vlc 1.3

landsharkian

New Member
Hi, thank you! Ive been fiddling around with the instant replay feature and its a pain. I appreciate your mods to the script. I'm running obs 20.0.1, and I still cant get my replay to find my latest replay and play it, I get one directory filling up with new clips, yet my replay plays the same old one.. Also with your new script its only playing the replay if I switch to a different scene, then BACK to my first scene.. any ideas? Can you possibly add a function to move "played" replays to a different location so we can keep the current replay directory clean with just one replay ready to go? play it... then move it to be saved for a "highlight" reel later?
 

I3ordo

Member
Instead of showing the replay, can you code it so it adds the video file to a VLC list so it can play them one after another once switched to that scene? better yet, we can have two lists, one for fails one for awesomeness
 

Cwarfighter

New Member
Hey there! I've been enjoying your plugin for a short while, but the VLC replay has stopped functioning properly, even though I haven't changed any settings. Now, the VLC replay feature does not update the directory with newly saved replays until after I've closed OBS and restarted. Not sure what happened.

I am running OBS in admin mode, as I was before. My setting have been set to 1000m/s and 5 attempts(though I have tried changing these, no outcome). I have played with the properties in the VLC Source as well, no fix was found there. New files are appearing in the folder while streaming, but it is not updating into the directory for use during that stream. The standard replay is still functioning properly
 

HitsugaXIII

New Member
Hey there! I've been enjoying your plugin for a short while, but the VLC replay has stopped functioning properly, even though I haven't changed any settings. Now, the VLC replay feature does not update the directory with newly saved replays until after I've closed OBS and restarted. Not sure what happened.

I am running OBS in admin mode, as I was before. My setting have been set to 1000m/s and 5 attempts(though I have tried changing these, no outcome). I have played with the properties in the VLC Source as well, no fix was found there. New files are appearing in the folder while streaming, but it is not updating into the directory for use during that stream. The standard replay is still functioning properly

I can second this
 

eskoONE

New Member
i have the same issue as the last two posts. is this something that can be fixed manually? would appreciate any suggestions.

edit:
im particularly interested in the replay function with the vlc player, so i can analyze the last 20 seconds of the footage on a button press.
 
Last edited:

RustedBucket

New Member
Instead of showing the replay, can you code it so it adds the video file to a VLC list so it can play them one after another once switched to that scene? better yet, we can have two lists, one for fails one for awesomeness

I second this, i'm currently using another of @Exeldro plugins that watches for directory updates and then just plays the newest one (as the replay plugin uses wayyy to much RAM compared to the one built into obs). It would be great if this plugin could just watch a directory and update a VLC Video Source playlist automatically with every new file added to that directory, and then if files get deleted from the directory it would remove them from the VLC playlist etc etc. Cheers I hope this can happen!
 

x0rx

New Member
Hi @Exeldro , maybe this is a bit offtopic but I would ask you if you can make a little mod to the current official script. I'm getting crazy reading the script code. Can you add please a second source to the script properties so two separate media sources share the same instant replay. That way I can set one to play at normal speed and the other at slow speed. Many thanks!
 

Thinked

New Member
Script for finding latest saved replay

Hey, I am looking for a solution to get the latest saved replay to play instantly, without OBS automatically saving the buffer, and then playing it. If there was a script that would find the latest saved video and then return its path to the media_source. So that you can play the latest replay at a chosen time and not just the last 20 seconds etc...
 

fleezy

New Member
How can I make this script point to a different output source? I'd like to pair this with Source Record so I can have overlay-free replays.
 

BrizzleClive

New Member
Have been trying to set this up but can’t get it working fully as the video guides suggest it should
If my recordings have the date and time suffix then it just won’t change to the most most recent replay video source in that folder
If I turn the suffix off then I lose all my clips and potentially could erase a full broadcast recording if I get a dropout and have to restart the stream for any reason, but it will overwrite a clip just named Replay and change it when scene is reactivated

is this a bug as I’ve tried setting this up using two guides which use same basic method
 

JohnInStockie

New Member
I'm not sure if I've done something wrong, but when using this. It works perfect the first time, but 2nd time it plays about 1.5-2 secs of the previous replay first before the current reply?
Would appreciate any suggestions, and by the way, great tool!

Thats because the PC is still saving the replay to disk. You need to add a transition scene with some short graphic, about 3s works well, then switch to your replay and you wont see the previous clip
 

JohnInStockie

New Member
How can I make this script point to a different output source? I'd like to pair this with Source Record so I can have overlay-free replays.

The way I do it is to use Touch Portal to call a bat file that uses ffmpeg to copy the clip to a separate folder. I get the bat file to date and time stamp them en-route so I end up with both a Replay and a folder of highlights for later

example
Always save my replay as one single file that I overwrite called 'Game Replay Clip.mkv' that is 30s long
I have batch files for Saves, Goals, 30s Clips and 10s Clips, each just using ffmpeg to copy and cut on the fly as needed.

Example
set datetimef=%date:~-4%%date:~3,2%%date:~0,2%_%time:~0,2%%time:~3,2%%time:~6,2%
"C:\Users\johni\Downloads\ffmpeg-20200227-9b22254-win64-static\bin\ffmpeg.exe" -ss 00:00:12.0 -i "D:\Recording1080p\Game Replay Clip.mkv" -c copy "D:\Recording1080p\Clips\%datetimef%-Goal.mkv"
del "D:\Recording1080p\Game Replay Clip.mkv" /f /q
"C:\Users\johni\Downloads\ffmpeg-20200227-9b22254-win64-static\bin\ffmpeg.exe" -ss 00:00:12.0 -i "D:\Recording1080p\Clips\%datetimef%-Goal.mkv" -c copy "D:\Recording1080p\Game Replay Clip.mkv"


line by line...
set datetimef=%date:~-4%%date:~3,2%%date:~0,2%_%time:~0,2%%time:~3,2%%time:~6,2%
This sets the variable called 'datetimef' to hold the current date and time to the second

"C:\Users\johni\Downloads\ffmpeg-20200227-9b22254-win64-static\bin\ffmpeg.exe" -ss 00:00:12.0 -i "D:\Recording1080p\Game Replay Clip.mkv" -c copy "D:\Recording1080p\Clips\%datetimef%-Goal.mkv"
This calls the ffmpeg program location, and clips from second 12 to a new file that is about 20s in the Clips folder that starts with the datetime value and -Goal.mkv (e.g. 20211031_162255-Goal.mkv). I use this 20s file later in a highlights video.

del "D:\Recording1080p\Game Replay Clip.mkv" /f /q
This silently deletes the exting replay clip the obs 'Replay' scene is pointing to

"C:\Users\johni\Downloads\ffmpeg-20200227-9b22254-win64-static\bin\ffmpeg.exe" -ss 00:00:12.0 -i "D:\Recording1080p\Clips\%datetimef%-Goal.mkv" -c copy "D:\Recording1080p\Game Replay Clip.mkv"
This calls the ffmpeg program location again, and clips from second 12 again to create a new 'Game Replay Clip.mkv' file that is about 8s long for the OBS Replay to use. My Replay scene is set to play at 50% and 30% zoom, so I get a slow motion 16s replay on the stream.

Hope this helps
 

JohnInStockie

New Member
I should add, I use Touch Portal to control all this from the iPad, where I have this screen configured

Picture4.png


If I click the HOME+ button above, then this fires these actions…

Picture5.png


These actions are for a HOME Team goal, after this a generic ‘Flow’ is called that does the same thing for both HOME and AWAY goals as so:

Picture6.png


This is an example of the finished article

https://youtu.be/bJIc0UKWCM8


Hope this helps
 
Last edited:

obliviscimortem

New Member
Hey I need to be able to select Display captures as part of the instant replay rather than just media sources, is there a way you could add them to the list that pops up under "Media Source" when in OBS after clicking the instant-replay.lua loaded script?
I work exclusively off display captures to capture any game I am playing at the time rather than selecting each individual game for a scene since it's a lot less work that way. If this script doesn't allow for the option to select and record in the replay buffer using display captures as well as other media sources then I can't use it. If for some reason a display capture won't work then could you make it work using a display capture mirror as a work around? I tried finding either a mirror or a display capture in the list of media source options and they just don't populate in the list for the script. That's what I personally would need and until this script has that function I can't use it as it'd require breaking apart all of my scenes and reworking each one to be personally tailored to every game I play, which would be a massive overhaul of changes that just isn't feasible.

I hope you can help. I tried diving into the code a bit myself to just add "display capture" where ever I saw "Media Source" and that just returned an error and I had to undo the changes I made. I'm very much a novice for this programming language so I didn't know the proper steps to take to make it work. But it feels like it should be a relatively easy addition to add more functionality for people like me. TIA

<3 Oblivisci Mortem
 
Top