Skip to content

About

One OBS Studio Lua script that makes Replay Buffer work like NVIDIA ShadowPlay Instant Replay on Windows: auto-restart after each save, per-game clip folders, save alert sound, and a built-in updater.

Topics

Resources

Stars

1 star

Watchers

1 watching

Forks

Latest commit

 

History

59 Commits

Folders and files

Repository files navigation

🎬 OBS Clip Suite

ShadowPlay-style Instant Replay for OBS Studio — in a single file.

Every clip becomes a fresh video, lands in its own game folder, and tells you when it's saved.

Latest release Platform OBS Studio Single file


✨ Why you'll like it

NVIDIA ShadowPlay OBS alone OBS + Clip Suite
Back-to-back clips never overlap ✅ ❌ ✅
Clips sorted into a folder per game ✅ ❌ ✅
"Clip saved" feedback ✅ overlay ❌ ✅ sound (+ optional notification)
Updates itself – – ✅
Works with any GPU ❌ ✅ ✅

🚀 Quick start

  1. Download obs_to_nvidia.lua from the latest release.
  2. Save it somewhere permanent (not Downloads, because OBS remembers the path).
  3. In OBS: Tools → Scripts → + and pick the file.

OBS Tools menu with the Scripts entry highlighted

Then make sure the Replay Buffer is on (Settings → Output → Replay Buffer) and a save hotkey is set. That's it. 🎉

The Scripts window with the Clips, Alerts and Updates groups


🧩 What's inside

🔁 Replay Buffer Restarter

Restarts the buffer right after every save, so each clip is a new video. No more overlapping footage.

Nothing to configure. It adapts to your PC and your save habits.

📁 Replay Organizer

Moves each clip into a folder named after the game you were playing. Everything else goes to Desktop.

Works for windowed and fullscreen games, and with Arabic and other non-English names.

🔔 Clip Alert Sound

A short sound when a clip is saved. Pick from 6 built-in sounds or use your own file, and set the volume.

On by default (10 % volume). Optional Windows notification too.

⬆️ Update Checker

Checks this repo's Releases and updates the script for you, with a backup and a one-click restore.

Asks before installing.

What you'll see in your clips folder

📂 Your replay folder
 ├─ 📂 Valorant
 │   ├─ 🎞️ Replay 2026-11-09 21-14-03.mp4
 │   └─ 🎞️ Replay 2026-11-09 21-31-47.mp4
 ├─ 📂 Minecraft
 ├─ 📂 Hollow Knight
 └─ 📂 Desktop          ← anything that isn't a game

⚙️ How it works

On every Replay Buffer saved event, the modules run in this order. An error in one never stops the others.

 Clip saved ─▶ 🔔 Alert sound ─▶ 📁 Organizer moves the clip ─▶ 🔁 Restarter restarts the buffer
              (first, so it's     (into the game's folder)       (stop → wait → start once)
               never delayed)

🎛️ Settings at a glance

Group Option Default
Clips Restart the Replay Buffer after every save On
Clips Sort clips into a folder per game On
Clips Use official game names (Steam / Epic / GOG / exe info) On
Clips Look up unknown games on Steam On
Clips Add rename (old folder name = new name) –
Alerts Play a sound when a clip is saved On
Alerts Alert sound, custom file, volume, Test Alert Now New Notification, 10 %
Alerts Also show a Windows notification Off
Updates Check for updates when OBS starts On
Updates When an update is found Ask me first

✅ Requirements

  • Windows. The Organizer and the updater use Win32 calls. Without them the Restarter and Alert still work, and the Organizer switches itself off.
  • OBS Studio with Lua scripting (stock Windows build; developed on OBS 33).
  • Replay Buffer enabled with a save hotkey.

📖 Details

🔁 Restarter: how it behaves

After a save, the script asks OBS to stop the buffer, waits for the "stopped" event, starts it once, and waits for the "started" event. A slow watchdog timer is only a safety net in case an event never arrives (it retries a few times, then logs a warning instead of looping forever).

  • Never stops the buffer while a save is still being written.
  • Hotkey spam is handled: a single save restarts immediately, a burst waits a short quiet period based on your own rhythm.
  • Learns how long your PC takes to stop and start the buffer, and remembers it after OBS restarts.
  • If you stop the buffer while a restart is pending, it leaves it alone.
  • If the buffer doesn't come back, it keeps retrying in the background instead of staying OFF.
  • Circuit breaker: after 3 failed restart cycles in a row it pauses itself and says so in the log. Untick and tick the checkbox to resume.
📁 Organizer: how games are detected and named
  • Reads the real foreground window with direct Win32 calls only (no cmd.exe or PowerShell), so fullscreen games are never minimized or kicked to the desktop.
  • The last game you played wins. It remembers what was in front during the past minute (or less if your buffer is shorter). Play, switch to Discord or a browser, press save, and the clip still goes to the game. A game has to stay in front for at least 5 seconds to count, so a window flashing past is ignored.
  • Games installed in a library (Steam, Epic, GOG, Riot...) are detected windowed or fullscreen. A fullscreen game installed anywhere else is detected too. Windows, Office, browsers, launchers (Steam, Epic, Battle.net, Playnite...), helper tools (Lossless Scaling, Voicemeeter, MSI Afterburner...) and per-user apps like Discord are never taken for games.
  • Never overwrites an existing clip if two clips get the same name in the same second.
  • Minecraft: any launcher or modpack is recognised from the window title (- Singleplayer / - Multiplayer (...)) and goes into a Minecraft folder.

Name priority: your own names → built-in list / known_games.txt → official name (Steam appmanifest, Epic manifest, GOG info file, exe ProductName; all offline) → window title → Steam install folder → Steam Store lookup. A game hooked by an OBS Game Capture source is always treated as a game.

Custom names: type the current folder name, type the new name, press Add. If the game has no folder yet, type its exe name from Task Manager (e.g. MyGame or MyGame.exe), as long as it was in front recently.

known_games.txt lives in %APPDATA%\obs-studio\script-data\OBS-Clip-Suite. Reload the script after editing it. To name a game by its window title, add a line like title:hollow knight=Hollow Knight. For Java and Microsoft Store (UWP) games, which share one exe name (javaw, ApplicationFrameHost), this rule is also what makes them count as games. Without a rule, only Minecraft is recognised there.

Steam lookup (optional): used only when a game has no window title and no Steam folder. Results are remembered in known_games.txt.

🔔 Alert Sound: options

On by default. Use the checkbox to switch it off or on, then choose:

  • one of the 6 built-in sounds (embedded in the script, no extra files),
  • or your own file (.wav .mp3 .ogg .aac .flac) under Custom sound file,
  • the volume (0–100 %),
  • then press Test Alert Now to hear it.

It plays only for a real save: the Saved event plus the clip file being on disk. The optional Windows notification ("Clip saved" + the clip name) is shown only while the sound checkbox is on.

⬆️ Updater: how updates are applied
  • Checks GitHub Releases about 10 seconds after OBS starts (can be turned off), or any time with Check for Updates Now.
  • Versions are compared numerically (1.10.0 is newer than 1.9.0), and only a higher version is offered.
  • When an update is found:
    • Ask me first (default): Yes = install, No = skip this version, Cancel = ask again later.
    • Install it automatically: installs when no stream / recording / virtual camera is active and no fullscreen game is in front.
    • Only mention it in the log.
  • The dialog is held back while a fullscreen game is in front or a stream / recording / virtual camera is active. The Replay Buffer doesn't block it: it is stopped first and started again by the new OBS.
  • An update restarts OBS twice; the second restart loads the new version, and the Replay Buffer resumes at the end.
  • How it's applied (2.4.2+): the new file is written as obs_to_nvidia.lua.staged, OBS starts a fresh instance, the old one closes, and the new instance swaps the file in. The running script is never overwritten while OBS uses it.
  • Your old script is kept as obs_to_nvidia.lua.bak and .bak-<version>. Restore previous version brings it back and puts the newer version on the skipped list, so it isn't offered again right away.
🗂️ Files the script creates
File Purpose
obs_to_nvidia.lua.bak, .bak-<version> Backups made by the updater
obs_to_nvidia.lua.staged Downloaded update waiting to be applied (temporary)
obs_to_nvidia_update_state.tmp Temporary marker used during a self-update
known_games.txt (in %APPDATA%\obs-studio\script-data\OBS-Clip-Suite) Your extra game names and cached Steam results

🛠️ Troubleshooting

"No properties available" / Error opening file: (null) in the Script Log

OBS couldn't read the script file. Check that obs_to_nvidia.lua exists at the path shown in Tools → Scripts, remove the entry, and add the file again.

A game went into the wrong folder, or a folder has an ugly name

Use the Add rename field in the Clips group: type old folder name = new name and press Add.

"auto-restart paused" appears in the log

The Restarter hit 3 failed restarts in a row and paused itself. Untick and tick Restart the Replay Buffer after every save to resume.

I don't hear the alert

Make sure Play a sound when a clip is saved is ticked, then press Test Alert Now. Check that the volume isn't 0 and that no custom file path is set to a missing file.


Found a bug or have an idea? Open an issue · Like it? ⭐ the repo.

About

One OBS Studio Lua script that makes Replay Buffer work like NVIDIA ShadowPlay Instant Replay on Windows: auto-restart after each save, per-game clip folders, save alert sound, and a built-in updater.

Topics

Resources

Stars

1 star

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages