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)

New highs reached.
New year, new highs apparently, lol
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?
1. i never tried that, but i def can
2. again, never tried that, but i will in a couple of hours or so when i'll do some testing (rn i can't unfort)

thanks again for the help
 
It may be the script used, smart replays.


As it's a python script make sure the version of python installed in your system correspond with the needed version for the script.
The version of python installed should be correct, the script requires Python 3.10 or higher, which is the one that i have
1735835032718.png
the version that i have
Contact the script creator for more support on this. He may have a better knowledge on what's going on with this.
Ok, i will, thanks
 
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.
Ok, will do

Btw of all the listed programs there, i do have Riva Tuner and MSI Afterburner (Msi just in the background, riva with OSD active)
 
Ok, i did a bit of testing.
I've uninstalled the previous obs and re-installed it (no, i didn't use any scripts this time).
Here's a bunch of logs. It's in the name, but a quick round down of every log:
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
All of this done in the "fresh install obs-no msi-no riva-no script" log.
Does your mouse buttons works the same way with OBS (for example Mouse 3 - the wheel press)?
The "fresh install obs-no msi-no riva-no script- mouse hotkey" log has identical conditions of the log mentioned above, but this time i've saved my replays with a mouse button (my mouse is an DELUX M625, it has an extra button designed for macros, which is what i've used)
Does running OBS as administrator changes mentioned delays?
"fresh install obs-no msi-no riva-no discord-no script-admin" is the log where i've ran obs as admin
Also, test with another game, if this still happens.
I've tried it, but unfort it didn't register any of my hotkeys, for some reason (the log is "fresh install obs-no msi-no riva-no discord-no script-different game" in case it is useful, but as said, it didn't saved any of my replays)
 

Attachments

  • fresh install obs-no msi-no riva-no discord-no script-admin.txt
    26.7 KB · Views: 8
  • fresh install obs-no msi-no riva-no discord-no script-different game.txt
    23.9 KB · Views: 3
  • fresh install obs-no msi-no riva-no script- mouse hotkey.txt
    29.6 KB · Views: 2
  • fresh install obs-no msi-no riva-no script.txt
    36.6 KB · Views: 6

Suslik V

Active Member
...but unfort it didn't register any of my hotkeys, for some reason
It is likely because this time you did run OBS not as admin (key press event cannot be stolen from application that running with higher privileges).

As for the main subject - delay is present and reason is unknown (for me).
Code:
23:23:38.878: obs_hotkey_thread(25 ms): min=24.736 ms, median=25.93 ms, max=35.885 ms, 4.12933% within ±2% of 25 ms (0% lower, 95.8707% higher)
The hotkey thread is normal, the numbers are not huge, just 10th of milliseconds at max and less than 1ms at median. So, it is nothing in comparison to observed delays that reaches half a minute. Expect delays is about 4s maximum - when buffer is not filled up yet - until two sequential keyframes of the video will be encoded and written to memory (for 60 fps video and key frame interval set at 250 frames for the selected encoder it happens at least each 4.166667s). But half a minute... O_o

Anyway, what if you give to OBS process a bit higher priority? Can be set in OBS Settings > Advanced > General group > Process Priority setting like Above Normal shouldn't do much harm to your PC. And running OBS as admin is recommended in your case.
 

Suslik V

Active Member
From other thread:
(also, strange thing ,it's just the replay itself being "registered" as saved, because the clip itself that it produces does stop the moment i press the hotkey, like it should). Any idea of what could cause this?
Wait a moment...

This is from older version:
Code:
01:19:11.500: Hiding Context Bar due to hotkey
01:19:48.278: [ffmpeg muxer: 'Replay Buffer'] Wrote replay buffer to 'D:/Registrazioni OBS e Nvidia/Registrazioni Obs/Clip 2024-12-24 01-19-11.mkv'
it is saved with right timestamp. Just takes a lot of time to write to the disk? Is this SSD drive with caching utils running in background from the manufacturer of the disk drive?
 
It is likely because this time you did run OBS not as admin (key press event cannot be stolen from application that running with higher privileges).
Oh, yeah, that why. The game that i've used to test it this time was Titanfall 2+Northstar, and the norstar launcher does have admin privileges
As for the main subject - delay is present and reason is unknown (for me).
yep, unfortunately, i was really hoping the clean install would do the trick.
But, in your opinion, do you think i can use the script again? what about msi and riva tuner? I've also made a session without the discord overlay,but it seems that i still have this delay, is this safe to use as well? Or is better to turno those things off when i am recording?
Anyway, what if you give to OBS process a bit higher priority? Can be set in OBS Settings > Advanced > General group > Process Priority setting like Above Normal shouldn't do much harm to your PC. And running OBS as admin is recommended in your case.
I can def try that, hold on

1735918997995.png

Ok i just changed it into the settings,let me get a log rq
 
From other thread:

Wait a moment...

This is from older version:
Code:
01:19:11.500: Hiding Context Bar due to hotkey
01:19:48.278: [ffmpeg muxer: 'Replay Buffer'] Wrote replay buffer to 'D:/Registrazioni OBS e Nvidia/Registrazioni Obs/Clip 2024-12-24 01-19-11.mkv'
it is saved with right timestamp. Just takes a lot of time to write to the disk?
Basically yes, like example:
  1. i get a kill in game
  2. i want to save it so i press the hotkey to save the replay
  3. after a while (lets say 30 seconds) i can see the message on the bottom left of obs ui saying "Wrote replay buffer to D:/Registrazioni OBS e Nvidia/..."
    1735919517265.png

    (This one )
  4. But when i actually check the clip, the clip does stop the moment i pressed the hotkey (in this example, after point 1, after the kill)
Is this SSD drive with caching utils running in background from the manufacturer of the disk drive?
eeem, idk what this means, sorry.
but quick explanation, disk E is an M.2 SSD (WD Blue SN570 1Tb)(which is where obs is installled) and the replays/recordings are saved in the D. drive, which is an internal HDD
 
Last edited:
Oh, yeah, that why. The game that i've used to test it this time was Titanfall 2+Northstar, and the norstar launcher does have admin privileges

yep, unfortunately, i was really hoping the clean install would do the trick.
But, in your opinion, do you think i can use the script again? what about msi and riva tuner? I've also made a session without the discord overlay,but it seems that i still have this delay, is this safe to use as well? Or is better to turno those things off when i am recording?

I can def try that, hold on

View attachment 110470
Ok i just changed it into the settings,let me get a log rq
Emh, i forgot about msi and riva tuner... i forgot they were active during the recordings, but it shouldn't be a problem? i guess? i mean with those turned off i still got the delays. either way here's the log, i've attached it to this reply.
 

Attachments

  • above priority + admin-same game as usual.txt
    32.4 KB · Views: 7

Suslik V

Active Member
...internal HDD
Then I out of clues, because
Code:
17:16:53.536: Hiding Context Bar due to hotkey
...
17:17:15.443: ==== Replay Buffer Stop ============================================
...
17:17:17.208: [ffmpeg muxer: 'Replay Buffer'] Wrote replay buffer to
3 minute clip shouldn't be so big that it takes half a minute to be written to the disk, even to HDD.
  1. How large is your replays in MBytes?
  2. What happens if you set mp4 as format for output instead of mkv?

As for 3rd-party applications/utils.
Utils that changes GPU clocks can affect hardware based encoder, so it affects performance of the encoding/rendering. Utils that draws overlays over the game picture (like: temperature, GPU load, fps etc) - can interrupt OBS game capture that itself uses same technologies (usually named "graphics hooks"), so it affects capturing capability and may cause: OBS rendering lags, frame rate drops, black screen or static image.

The "Smart Replays" Python script up to v1.0.4.
Mentioned script waits for OBS events, and only then doing its job (job of finding and renaming last replay), so in my opinion it is safe to use it. The script actually starts to work after the "wrote" of the buffer. It auto-restarts the buffer each time, but author of the script had own thoughts behind this (shortest clip length). Python itself may block some actions and in a much older OBS unfortunate sequence of events may dead block UI of OBS. But it is not your case.

Side note.
It is better to include "seconds" in the file name of the replay file mask. Because OBS up to v31.0.0 overwrites replay file without confirmation, thus short replay files, saved in a one minute, can be lost because the file names will be the same. It is "feature" or known bug in OBS: https://github.com/obsproject/obs-studio/issues/4227
 
Last edited:

PaiSand

Active Member
1440p 60fps CQP18 may be too much for HDD. Everything on memory (buffer) takes longer to be recorded while still using the memory to hold the buffer.
For this it's always recommended to use an SSD M.2 4.0 and double check the recording speed.
 
  1. How large is your replays in MBytes?
1735942481339.png

roughly 4,7 Gb ~ 6 Gb
  1. What happens if you set mp4 as format for output instead of mkv?
Idk, let me try rq
As for 3rd-party applications/utils.
Utils that changes GPU clocks can affect hardware based encoder, so it affects performance of the encoding/rendering. Utils that draws overlays over the game picture (like: temperature, GPU load, fps etc) - can interrupt OBS game capture that itself uses same technologies (usually named "graphics hooks"), so it affects capturing capability and may cause: OBS rendering lags, frame rate drops, black screen or static image.

The "Smart Replays" Python script up to v1.0.4.
Mentioned script waits for OBS events, and only then doing its job (job of finding and renaming last replay), so in my opinion it is safe to use it. The script actually starts to work after the "wrote" of the buffer. It auto-restarts the buffer each time, but author of the script had own thoughts behind this (shortest clip length). Python itself may block some actions and in a much older OBS unfortunate sequence of events may dead block UI of OBS. But it is not your case.

Side note.
It is better to include "seconds" in the file name of the replay file mask. Because OBS up to v31.0.0 overwrites replay file without confirmation, thus short replay files, saved in a one minute, can be lost because the file names will be the same. It is "feature" or known bug in OBS: https://github.com/obsproject/obs-studio/issues/4227
thanks for the info
 

Suslik V

Active Member
I think,
...roughly 4,7 Gb ~ 6 Gb
per file + main recording to the same disk,,, pushes your hardware to its limits.
Likely your HDD drive is fragmented a lot that slows writing even more.
Lowering clip size should reduce delay almost linearly.

My own conclusion: not an issue. Just hardware limit.
 
I think,

per file + main recording to the same disk,,, pushes your hardware to its limits.
Likely your HDD drive is fragmented a lot that slows writing even more.
Lowering clip size should reduce delay almost linearly.

My own conclusion: not an issue. Just hardware limit.
what about the mp4 format over the mkv, is it recommended in my case?

btw, by following PaiSand's advice, i've switched my recording path from D: to the E: drive (the ssd m.2). I have a log here if you want to check it out, unfort i wasn't really "testing" like i usually do (aka i wasn't recording, only replay buffer), but it's something (the format was reverted to mkv to see how it would behave).

Thanks for all the help so far, both you and PaiSand :)
 

Attachments

  • above priority + admin +replays saved on SSD M.2 -same game as usual.txt
    43.4 KB · Views: 3
Top