- Lua 100%
| LICENSE | ||
| OBSReplay.lua | ||
| README.md | ||
OBSReplay
Linux only.
An OBS script that sorts your recordings, replays and screenshots into folders.
Each folder is named after the scene you were on. It can use the window you had focused instead.
What it looks like
Before:
Videos/
2026-08-01 14-32-11.mkv
2026-08-01 15-02-44.mkv
2026-08-01 15-40-02.png
After:
Videos/
Minecraft/
2026-08-01 14-32-11.mkv
Elden Ring/
2026-08-01 15-02-44.mkv
2026-08-01 15-40-02.png
Install
- Download
OBSReplay.lua - Open OBS
- Go to Tools, then Scripts
- Click + and pick the file
Setup
- Click OBSReplay in the list
- Set Destination path to where you want your files sorted
- Click Close
You are done. The other settings are optional.
Settings
OBS output path
Where OBS saves its files. This is filled in for you. Only change it if your files are not being found.
Destination path
Where your sorted folders go. This one is required.
Enable Desktop Notifications
Shows a popup when files are moved.
Restart Replay Buffer After Save
Turns the replay buffer back on after a save.
Use Focused Window Name (instead of Scene)
Names folders after the window you had open, not the scene. Good if you use one scene for everything. See the extra tools needed below.
Name Mappings
Renames folders. One rule per line, written as what to match=folder name.
genshin=Genshin Impact
cs2.exe=Counter-Strike
firefox=Browsing
Matching ignores capital letters. You can use * for any text and ? for any single character.
Minecraft*=Minecraft
Good to know
Files are never moved too early. OBS can still be writing a file when it says it is done. The script watches the file and waits for it to stop growing.
Remuxing is handled. If you have "Automatically remux to MP4" turned on, OBS makes the MP4 after it says the recording is done. The script waits for that file too, then moves both.
Split recordings are handled. If you split recordings by time or size, every part gets sorted, not just the last one.
Nothing is overwritten. If a file with the same name is already there, the new one is saved as name_1, name_2 and so on.
OBS will not freeze. Moving to another drive happens in the background.
Requirements
- Linux
- OBS Studio
Desktop notifications need notify-send.
Use Focused Window Name needs one extra tool, depending on your setup:
| Your setup | You need |
|---|---|
| X11 | xdotool |
| Hyprland | jq |
| Sway | grep (GNU) |
| KDE Plasma on Wayland | kdotool |
| GNOME on Wayland | gdbus and grep (GNU) |
Something went wrong
Files are not moving. Check that Destination path is set.
Folders are named wrong with the window option on. Install the tool for your setup from the table above.
Recordings take a minute to show up. This happens when "Automatically remux to MP4" is on but no MP4 appears. The script waits 60 seconds, then moves the file anyway.
License
Copyright (C) 2025 creations.works
GNU Affero General Public License v3.0 or later
This program is free software. You can share it and change it under the terms of the AGPL, either version 3 or any later version.
It comes with no warranty.