Long delay from when i press to save a replay and when it actually saves it (even tho the clip is correct, it just saves it after a while)

Hi everyone, so my issue here is that when i do press the hotkey to save a reply buffer, it takes a while (we're talking 30-50 seconds) before it actually saves it (and it's not even consistent, maybe one day i do have this issue, and the next one everything works just fine).

Now let's add a bit of background, maybe it's useful:
  1. To save my replay buffers i use a macro key on my keyboard (Corsair K55 RGB PRO XT) to press both "alt" and "f6", which are the two keys i've assigned in the OBS Hotkey's setting to save a replay buffer. This one has always worked, so i don't think it's the issue here (i hope)
  2. i've installed the sequent scripts: Smart Replays, Advanced Filename Formatter, Sound notification when i record/start a replay + the audio monitor plugin
Hope everything it's clear, i am here in case something is not 100% clear or you guys need a bit more context/specific info.
Thanks in advance
 

Attachments

  • 2024-12-17 01-23-30.txt
    34.7 KB · Views: 17

Suslik V

Active Member
Please, add the same hotkey to the "Show Source Toolbar" and "Hide source Toolbar" in OBS, so it will be logged and can be used as indicator that there is some delay between hotkey press and buffer wrote. The mentioned actions are not destructive and thus shouldn't change the result.
 
Please, add the same hotkey to the "Show Source Toolbar" and "Hide source Toolbar" in OBS, so it will be logged and can be used as indicator that there is some delay between hotkey press and buffer wrote. The mentioned actions are not destructive and thus shouldn't change the result.
Done.
I'll upload the log when i'll record again, thanks (probably in 12h)
 
Ok, i've done as you said.
1734655213706.png

i've used the same hotkey that i use for saving the replays and added it for showing the source toolbar as well.
Here's the link to the log file (that i'll also add on this post); in this log i've had the delay issue i was talking about (log "2024-12-20 00-56-02").
I've also attached another log file, because in the second one that i've attached (log "2024-12-19 21-59-40") not only i had the delay when saving clips, but those clips were laggy (the issue here might be simply me not properly adjusting the settings for recording in 2k, but idk).

thanks in advance
 

Attachments

  • 2024-12-20 00-56-02.txt
    52 KB · Views: 10
  • 2024-12-19 21-59-40.txt
    83 KB · Views: 8

Suslik V

Active Member
Code:
00:56:11.352: Hiding Context Bar due to hotkey
00:56:11.745: [ffmpeg muxer: 'Replay Buffer'] Wrote replay buffer to...

00:59:22.957: Showing Context Bar due to hotkey
00:59:42.780: [ffmpeg muxer: 'Replay Buffer'] Wrote replay buffer to...

01:21:37.353: Hiding Context Bar due to hotkey
01:21:51.879: [ffmpeg muxer: 'Replay Buffer'] Wrote replay buffer to...

01:35:25.184: Showing Context Bar due to hotkey
01:37:32.782: [ffmpeg muxer: 'Replay Buffer'] Wrote replay buffer to...
This is:
~0.393s
~19.823s
~14.525s
~2min 7.597s
of delay between key press and replay buffer wrote. The last 3 is a huge delay for 180sec clip. I never seen it being reported before.

I only know that significant changes of the replay buffer code were between v30.1.2 and v30.2.3 (you are using). Can you try to test it with the older (v30.1.2) OBS? You may use OBS portable mode in different folder and export/import profiles and scene collections ( for portable, please, read only after "if it was not clear" words: https://obsproject.com/forum/thread...»-when-opening-app-settings.82157/post-346499 )
 
Code:
00:56:11.352: Hiding Context Bar due to hotkey
00:56:11.745: [ffmpeg muxer: 'Replay Buffer'] Wrote replay buffer to...

00:59:22.957: Showing Context Bar due to hotkey
00:59:42.780: [ffmpeg muxer: 'Replay Buffer'] Wrote replay buffer to...

01:21:37.353: Hiding Context Bar due to hotkey
01:21:51.879: [ffmpeg muxer: 'Replay Buffer'] Wrote replay buffer to...

01:35:25.184: Showing Context Bar due to hotkey
01:37:32.782: [ffmpeg muxer: 'Replay Buffer'] Wrote replay buffer to...
This is:
~0.393s
~19.823s
~14.525s
~2min 7.597s
of delay between key press and replay buffer wrote. The last 3 is a huge delay for 180sec clip. I never seen it being reported before.

I only know that significant changes of the replay buffer code were between v30.1.2 and v30.2.3 (you are using). Can you try to test it with the older (v30.1.2) OBS? You may use OBS portable mode in different folder and export/import profiles and scene collections ( for portable, please, read only after "if it was not clear" words: https://obsproject.com/forum/threads/crash-with-«could-not-find-locale-ini-path»-when-opening-app-settings.82157/post-346499 )
just to be sure i got that right, i have to follow these steps you linked me, but on the step 1 (where i have to download the .zip file from github), i have to download the 30.1.2 version, right?

Sorry if this was obvious, i just wanted to be sure
 
Code:
00:56:11.352: Hiding Context Bar due to hotkey
00:56:11.745: [ffmpeg muxer: 'Replay Buffer'] Wrote replay buffer to...

00:59:22.957: Showing Context Bar due to hotkey
00:59:42.780: [ffmpeg muxer: 'Replay Buffer'] Wrote replay buffer to...

01:21:37.353: Hiding Context Bar due to hotkey
01:21:51.879: [ffmpeg muxer: 'Replay Buffer'] Wrote replay buffer to...

01:35:25.184: Showing Context Bar due to hotkey
01:37:32.782: [ffmpeg muxer: 'Replay Buffer'] Wrote replay buffer to...
This is:
~0.393s
~19.823s
~14.525s
~2min 7.597s
of delay between key press and replay buffer wrote. The last 3 is a huge delay for 180sec clip. I never seen it being reported before.

I only know that significant changes of the replay buffer code were between v30.1.2 and v30.2.3 (you are using). Can you try to test it with the older (v30.1.2) OBS? You may use OBS portable mode in different folder and export/import profiles and scene collections ( for portable, please, read only after "if it was not clear" words: https://obsproject.com/forum/threads/crash-with-«could-not-find-locale-ini-path»-when-opening-app-settings.82157/post-346499 )
Ok, i've followed the instructions, and did this with Obs Portable 30.1.2. I've attached the log
 

Attachments

  • 2024-12-21 00-39-46.txt
    27.3 KB · Views: 13

Suslik V

Active Member
In this session you forgot to assign the "Show Source Toolbar" and "Hide source Toolbar" hotkeys. So, it is impossible to say if there was any delay.

Anyway, what may cause the issue, my opinion:
  1. OBS internal logic failure (it is strange that it wasn't reported before).
  2. Interfere of the external application that prevents some operations with the memory (can be security software, but I hope you have your OBS folder whitelisted).
If nothing helps, then some developers can be found in Discord (link in the upper right corner of the forum) - give it a try.
 
In this session you forgot to assign the "Show Source Toolbar" and "Hide source Toolbar" hotkeys. So, it is impossible to say if there was any delay.

Anyway, what may cause the issue, my opinion:
  1. OBS internal logic failure (it is strange that it wasn't reported before).
  2. Interfere of the external application that prevents some operations with the memory (can be security software, but I hope you have your OBS folder whitelisted).
If nothing helps, then some developers can be found in Discord (link in the upper right corner of the forum) - give it a try.
oh yeah, mb i forgot. I thought the profile that i've imported already had that, i forgot i've added the hotkeys in a second moment
 
In this session you forgot to assign the "Show Source Toolbar" and "Hide source Toolbar" hotkeys. So, it is impossible to say if there was any delay.

Anyway, what may cause the issue, my opinion:
  1. OBS internal logic failure (it is strange that it wasn't reported before).
  2. Interfere of the external application that prevents some operations with the memory (can be security software, but I hope you have your OBS folder whitelisted).
If nothing helps, then some developers can be found in Discord (link in the upper right corner of the forum) - give it a try.
I've asked on discord as you suggested...got no response. I'll try again by pinging again the message (tbf, one guy replyed and tryed to help me, but then he must've changed his mind 'cause he started helping others, so idk)

Btw here's the log, with obs on portable mode and the hotkeys (lol): https://obsproject.com/logs/G4FuhIoayEY9u6N8

Also, as said, on discord the guy asked me to try with safe mode, here's that log as well: https://obsproject.com/logs/g0pqHox4evBhLXJB
 

Suslik V

Active Member
Code:
01:07:30.924: OBS 30.1.2 (64-bit, windows)

01:19:11.500: Hiding Context Bar due to hotkey
01:19:48.278: [ffmpeg muxer: 'Replay Buffer'] Wrote replay buffer to...

01:22:24.414: Showing Context Bar due to hotkey
01:23:42.020: [ffmpeg muxer: 'Replay Buffer'] Wrote replay buffer to...
It is:
~36.778s
~1min 17.606s
of delay.

Code:
23:08:43.703: Command Line Arguments: --safe-mode
23:08:43.709: Safe Mode enabled.
23:08:43.962: OBS 30.2.3 (64-bit, windows)

23:20:03.176: Showing Context Bar due to hotkey
23:20:18.271: Hiding Context Bar due to hotkey
23:20:46.326: [ffmpeg muxer: 'Replay Buffer'] Wrote replay buffer to...
23:21:30.474: ==== Replay Buffer Stop ============================================
23:21:31.095: [ffmpeg muxer: 'Replay Buffer'] Wrote replay buffer to...

23:30:08.665: Showing Context Bar due to hotkey
23:30:16.833: ==== Replay Buffer Stop ============================================
It is:
~ 43.150s
~1min 12.824s (and 0.621s after the buffer stopped)
~???s (no info in the log)
of delay.

This is more interesting case because there is intersection of events. The first buffer wrote happened after the second hotkey press event registered in the log! More over, the second buffer wrote happened after the Replay Buffer stopped. And last one was delayed for so long, that it seems it lies out of the log timeline (truncated log was posted, in session).

The buffer wrote after the buffer stop - is something. Because, by logic of OBS, the UI which user can use to trigger buffer save will be already hidden and buffered data discarded.

It is hard case for me, so I need to think, before making any other suggestions other than that already were made.
 
Last edited:
It is hard case for me, so I need to think, before making any other suggestions other than that already was made.
ty for the help so far

I'll try in the meantime to ask again on the discord, hopefully this time they'll try to help me out with this problem (which i thought was because of the scripts, but if even in safe mode i still have the issue, it must be something else).
 

Suslik V

Active Member
When looking for other solutions, please also look at security software - you may underestimate how it can filter and stop actions.
 
When looking for other solutions, please also look at security software - you may underestimate how it can filter and stop actions.
Obs should already be in it's whitelist (i am using kaspersky btw), however, yeah, idk how much the antivirus can interfere, i am not big on tech and computers.

Also, merry christmas (if you celebrate it) or happy holidays (if you don't)(it's the 25th for me already at the time of making this message).

Also #2, i've uninstalled the previous Obs and installed it fresh from Steam, now it seems that it works again (at least, it now saves replays in a reasonable time)(log in the attached files). Ty for all the help so far
 

Attachments

  • 2024-12-24 23-32-44.txt
    317.4 KB · Views: 14

PaiSand

Active Member
As long as you have good behavior online you don't need anything more that the Microsoft security suit that comes with Windows.
Other anti malware are too intrusive and causes more issues than help. The less intrusive I known is Malwarebytes, but it also causes issues some times.

When you save the replay buffer the antivirus is actively checking it, so the delay. Remove the suit, making sure the Microsoft suit is enable again and test it.
 
Last edited:
Hi, me again, happy new year all btw

My kaspersky license expired, so now i am only relying on Windows Defender, as you suggested.

Even with this, i still do have massive delays between me pressing the hotkey and the replay actually being saved (log).
Quick info about this log, in this session i am only using the script "Smart Replay" (link is in my original comment) without any addition feature, so no sound and no notification on replay saves (i thought those were slowing my pc down too much and causing the delays, but nop). Any idea?

edit: just to be clear, the replays are fine, the clip does actually stop where i saved it
 

Suslik V

Active Member
Code:
22:44:00.231: Hiding Context Bar due to hotkey
22:44:00.678: [ffmpeg muxer: 'Replay Buffer'] Wrote replay buffer to

22:47:48.876: Showing Context Bar due to hotkey
22:47:58.611: [ffmpeg muxer: 'Replay Buffer'] Wrote replay buffer to

22:50:30.563: Hiding Context Bar due to hotkey
22:50:56.483: [ffmpeg muxer: 'Replay Buffer'] Wrote replay buffer to

22:53:08.784: Showing Context Bar due to hotkey
22:53:24.846: [ffmpeg muxer: 'Replay Buffer'] Wrote replay buffer to

22:59:49.141: Hiding Context Bar due to hotkey
23:00:27.016: Showing Context Bar due to hotkey
23:01:10.143: [ffmpeg muxer: 'Replay Buffer'] Wrote replay buffer to
23:01:22.687: ==== Replay Buffer Start ===========================================
23:03:29.606: [ffmpeg muxer: 'Replay Buffer'] Wrote replay buffer to

23:05:42.756: Hiding Context Bar due to hotkey
23:06:39.053: [ffmpeg muxer: 'Replay Buffer'] Wrote replay buffer to

23:08:46.451: Showing Context Bar due to hotkey
23:09:31.501: [ffmpeg muxer: 'Replay Buffer'] Wrote replay buffer to
New highs reached. Delays between keypress event registered in OBS and buffer wrote:
  • 0.446s
  • 9.735s
  • 25.920s
  • 16.063s
  • 1m 21.001s (and 43.126s after another hotkey event, intersection of events)
  • 3m 02.644s (and 2m 06.973s after replay buffer stopped!)
  • 56.297s
  • 45.050s
it is huge numbers. And it seems that your case is unique.
  1. Does your mouse buttons works the same way with OBS (for example Mouse 3 - the wheel press)?
  2. Does running OBS as administrator changes mentioned delays?
 

PaiSand

Active Member
It may be the script used, smart replays.
22:44:00.941: ==== Replay Buffer Stop ============================================
22:44:00.941: Video stopped, number of skipped frames due to encoding lag: 1/4402 (0.0%)
22:44:01.088: [Unknown Script] [01.01.2025 22:44:01] Replay buffering stopped.
22:44:01.088: [Unknown Script] [01.01.2025 22:44:01] Starting replay buffering...
22:44:01.088: [Unknown Script] [01.01.2025 22:44:01] Replay buffering started.

As it's a python script make sure the version of python installed in your system correspond with the needed version for the script.
Contact the script creator for more support on this. He may have a better knowledge on what's going on with this.
 

PaiSand

Active Member
In this case he needs to remove all scripts and see if the issue is present. This script was updated yesterday.
In that log file you point Kaspersky is present.

It's needed a clean OBS install log file without any script testing the replay buffer. And OP needs to see if he has installed any of this known app causing conflicts https://obsproject.com/kb/known-conflicts

Also, test with another game, if this still happens.
 
Top