Resource icon

Smart Replays 1.0.2

Qvvonk

New Member
Qvvonk submitted a new resource:

OBS Smart Replays - Significantly expands functionality of the replay buffer, making it similar to Nvidia Shadow Play.

OBS Smart Replays

OBS Smart Replays is a python OBS script whose main purpose is to save clips with different names and to separate folders depending on the application being recorded (imitating NVIDIA Shadow Play functionality).
This script also has additional functionality, such as sound and pop-up notifications, auto-replay buffer restart, etc.

3fee87e1-5dcb-475b-a7a6-d85304b842ee
...

Read more about this resource...
 

ThatRonin8

New Member
Hi, first of all, thanks for this plug in, it's awesome.
Second, is it normal that i can't see the pop up notification when i am playing? could it be that it doesn't work if the app you're currently on it's set on "fullscreen" or am i doing something wrong? (because when saving a replay while on the desktop i can clearly see the pop up, acrually if i do save the replay, then quickly switch to any other window that it's not in full screen, i do see the pop up)
 

Qvvonk

New Member
Hi, first of all, thanks for this plug in, it's awesome.
Second, is it normal that i can't see the pop up notification when i am playing? could it be that it doesn't work if the app you're currently on it's set on "fullscreen" or am i doing something wrong? (because when saving a replay while on the desktop i can clearly see the pop up, acrually if i do save the replay, then quickly switch to any other window that it's not in full screen, i do see the pop up)
Hi!

Yes, you are right, in fullscreen programms popup notifications dont work.
Need to create an overlay or something to make notifications visible on top of games in fullscreen mode, and that's too complicated for a small script.

The solution I'm using is to play in frameless window mode.

P.S. Actually, i have some idea that might work, but i only can start makin' it in 5-6 days. And it definitelly will require to install 3rd party libs.
 
Last edited:

ThatRonin8

New Member
Hi, i've got this error while trying to save a replay
[smart_replays.py] [25.12.2024 00:43:47] Loading default values...

[smart_replays.py] [25.12.2024 00:43:47] The default values are set.

[smart_replays.py] [25.12.2024 00:43:47] Loading script...

[smart_replays.py] [25.12.2024 00:43:47] Loading custom names...

[smart_replays.py] [25.12.2024 00:43:47] 2 custom names are loaded.

[smart_replays.py] [25.12.2024 00:43:47] Script loaded.

[smart_replays.py] [25.12.2024 00:43:47] Updating script...

[smart_replays.py] [25.12.2024 00:43:47] {"notifications":false,"notification_on_success_file":"D:/Manuel/Media/Audio/Crash Bandicoot Sound Effects Library: Aku Aku.mp3","notification_on_failure_file":"D:/Manuel/Media/Audio/Error | Sound Effects (No Copyright).mp3","obssmartreplayshk1":[],"obssmartreplayshk2":[],"obssmartreplayshk3":[],"base_path":"D:/Registrazioni OBS e Nvidia/Registrazioni Obs","filename_condition":3,"notification_on_success":true,"notification_on_failure":true,"restart_buffer_loop":1200}

[smart_replays.py] [25.12.2024 00:43:48] Script updated

[smart_replays.py] [25.12.2024 00:43:49] Exe history deque created. Maxlen=180.

[smart_replays.py] [25.12.2024 00:43:49] Saving script...

[smart_replays.py] [25.12.2024 00:43:49] Script saved

[smart_replays.py] [25.12.2024 00:43:50] Saving script...

[smart_replays.py] [25.12.2024 00:43:50] Script saved

[smart_replays.py] [25.12.2024 00:43:51] Exe history deque created. Maxlen=180.

[smart_replays.py] [25.12.2024 00:43:51] Saving script...

[smart_replays.py] [25.12.2024 00:43:51] Script saved

[smart_replays.py] [25.12.2024 00:43:52] ------ SAVING BUFFER HANDLER ------

[smart_replays.py] [25.12.2024 00:43:52] Old clip file path: D:/Registrazioni OBS e Nvidia/Registrazioni Obs/Clip 2024-12-25 00-43-52.mkv

[smart_replays.py] [25.12.2024 00:43:52] Generating clip name...

[smart_replays.py] [25.12.2024 00:43:52] Clip filename depends on the name of the current scene name.

[smart_replays.py] [25.12.2024 00:43:52] New clip file path: D:\Registrazioni OBS e Nvidia\Registrazioni Obs\For Honor\For Honor_25.12.2024_00-43-52.mkv

[smart_replays.py] [25.12.2024 00:43:52] Clip file successfully moved.

[smart_replays.py] [25.12.2024 00:43:52] An error occurred while moving file to the new destination.

[smart_replays.py] [25.12.2024 00:43:52] Traceback (most recent call last):

[smart_replays.py] File "E:\SteamLibrary/steamapps/common/OBS Studio/data/obs-plugins/frontend-tools/scripts\smart_replays.py", line 1155, in on_buffer_save_callback

[smart_replays.py] notify(True, str(path))

[smart_replays.py] File "E:\SteamLibrary/steamapps/common/OBS Studio/data/obs-plugins/frontend-tools/scripts\smart_replays.py", line 928, in notify

[smart_replays.py] python_exe = os.path.join(get_obs_config("Python", "Path64bit", str, True), "pythonw.exe")

[smart_replays.py] File "C:\Users/manue/AppData/Local/Programs/Python/Python310\lib\ntpath.py", line 104, in join

[smart_replays.py] path = os.fspath(path)

[smart_replays.py] TypeError: expected str, bytes or os.PathLike object, not NoneType

[smart_replays.py]

[smart_replays.py] Traceback (most recent call last):

[smart_replays.py] File "E:\SteamLibrary/steamapps/common/OBS Studio/data/obs-plugins/frontend-tools/scripts\smart_replays.py", line 1155, in on_buffer_save_callback

[smart_replays.py] notify(True, str(path))

[smart_replays.py] File "E:\SteamLibrary/steamapps/common/OBS Studio/data/obs-plugins/frontend-tools/scripts\smart_replays.py", line 928, in notify

[smart_replays.py] python_exe = os.path.join(get_obs_config("Python", "Path64bit", str, True), "pythonw.exe")

[smart_replays.py] File "C:\Users/manue/AppData/Local/Programs/Python/Python310\lib\ntpath.py", line 104, in join

[smart_replays.py] path = os.fspath(path)

[smart_replays.py] TypeError: expected str, bytes or os.PathLike object, not NoneType

[smart_replays.py]

[smart_replays.py] During handling of the above exception, another exception occurred:

[smart_replays.py]

[smart_replays.py] Traceback (most recent call last):

[smart_replays.py] File "E:\SteamLibrary/steamapps/common/OBS Studio/data/obs-plugins/frontend-tools/scripts\smart_replays.py", line 1159, in on_buffer_save_callback

[smart_replays.py] notify(False, "")

[smart_replays.py] File "E:\SteamLibrary/steamapps/common/OBS Studio/data/obs-plugins/frontend-tools/scripts\smart_replays.py", line 928, in notify

[smart_replays.py] python_exe = os.path.join(get_obs_config("Python", "Path64bit", str, True), "pythonw.exe")

[smart_replays.py] File "C:\Users/manue/AppData/Local/Programs/Python/Python310\lib\ntpath.py", line 104, in join

[smart_replays.py] path = os.fspath(path)

[smart_replays.py] TypeError: expected str, bytes or os.PathLike object, not NoneType

[smart_replays.py] [25.12.2024 00:43:52] Stopping replay buffering...

[smart_replays.py] [25.12.2024 00:43:52] Saving script...

[smart_replays.py] [25.12.2024 00:43:52] Script saved

[Unknown Script] [25.12.2024 00:43:52] Replay buffering stopped.

[Unknown Script] [25.12.2024 00:43:52] Starting replay buffering...

[smart_replays.py] [25.12.2024 00:43:52] Exe history deque created. Maxlen=180.

[Unknown Script] [25.12.2024 00:43:52] Replay buffering started.

[smart_replays.py] [25.12.2024 00:43:52] Saving script...

[smart_replays.py] [25.12.2024 00:43:52] Script saved

[smart_replays.py] [25.12.2024 00:43:55] Saving script...

[smart_replays.py] [25.12.2024 00:43:55] Script saved

Idk what could cause this since python's version is 3.10 (as suggested):
1735084074098.png

Any idea of what is the issue here?

(oh yeah, also merry Christmas, it's the 25th for me at the moment of typing this message)
 

Qvvonk

New Member
Hi, i've got this error while trying to save a replay


Idk what could cause this since python's version is 3.10 (as suggested):
View attachment 110234
Any idea of what is the issue here?

(oh yeah, also merry Christmas, it's the 25th for me at the moment of typing this message)
Hi, merry xmas!

Looks like script is not able to get python path from OBS settings.
Can u send ur OBS version and screenshot of Python path settings (Tools -> Scripts -> Python Settings)?

P.S. The clip is still renamed and saved, the error occurs when trying to display a pop-up notification.
 

Qvvonk

New Member
does it work on vids. the other plugins like this tend to break
Hi, no, it doesn't work with videos. The script won't break anything and won't break itself, it will just ignore the saved videos. It will work only with Replay Buffer.
I can add this functionality, but after January 1 :(
 

ThatRonin8

New Member
Hi, merry xmas!

Looks like script is not able to get python path from OBS settings.
Can u send ur OBS version and screenshot of Python path settings (Tools -> Scripts -> Python Settings)?
Obs version is the 31.0.0
1735123667159.png

This is the python path:
1735123725295.png


P.S. The clip is still renamed and saved, the error occurs when trying to display a pop-up notification.

Weird...i only enabled the sound notification..
either way, thanks for the help so far
 

ThatRonin8

New Member
Yeah sorry if i didn't replied immediately, i was left speechless for a bit because i just noticed that obs broke or something, like i can't even record a game (that previously had no issue now it's a black screen) nor it register the movement of the controller (assigned as a browser source); all things it did like 1 month ago. My usual luck, i guess.

Btw thanks for the quick fix, even on xmas day, have a nice rest of the day
 

ThatRonin8

New Member
yep, that's what i did.
I saw from my log, that i posted about the replay buffer being delayed, that i was using obs 30.2.3, so i removed all the files from the v.31 (by simply uninstalling) and then installed the older one (the 30.2.3). Now i can record the game again correctly and the controller does work now. Thanks everyone, expecially for the patience, i am not very expert when it comes to this stuff (not only obs, like computers in general)
 
Top