Record Rename

Record Rename 0.1.3

Do you plan to make it work with vertical streaming/live vertical?
Just a suggestion: add some kind of suffix to differentiate replay files. That would be really useful!
 
I might just be dumb, but I can't seem to get the plugin to work properly.
Whenever I stream and record at the same time the plugin doesn't work (I have only tested this with 2+ hour long streams).
But if I just hit record for a few seconds, then the plugin works with no issues.

Am I missing something or doing something wrong?
 
If it all possible, I'd love a %counter% variable or something similar in the filename format.

As it is currently, my files overwrite if I don't use the standard year, month, day, hour, minute, second format.

Having a number that counts up for each recording (Similar to what OBS does by default) would help cut down on these long unnecessary file names.
 
I'm gonna try this out right now. My "recorded" folder is a mess right now and I think this will save my bacon. I'll be back and give my thoughts.

- Two Hours Later +/- 15 minutes -

Ok. I'm back. It worked like a charm. This is fantastic. Thank you very much.
 
Im having an issue where I record my video and after I stop recording it will sometimes ask me to rename but not everytime. I also have multiple different profiles based on where I want the file saved. Am I missing something to make it work with all profiles?
 
I wanted to provide a visual example of my request. This is from the recording settings in Elgato Studio. I'd love an "incrementing number" option for the filename formatting. This can take the form of a variable like %counter% or %number%. When combined with a prefix (which your plugin supports) it makes my file names both short and unique.

OBS does this natively already. If I leave the filename alone, even without that year/date/hour format, it will add a incrementing number to the end of the recording. Your plugin doesn't have that option, which leads to duplicates. The problem with OBS and Elgato Studio is that it doesn't have the ability to auto add the game's name like your plugin does.

So I'm in this weird middle ground were all the features I need exist. But there separated among solutions for some bizarre reason.

Thanks again for all the work you do!

1788062820040.png
 
i really needed this. thx
i moved the folders from the windowsXXXX.zip to C:\Program Files\obs-studio (OBS Studio team had to rename it to or use \Program Files\OBS Studio\... already!)
and obs looked like this
1792959717945.png
then i restarted and this happned.
1792959735939.png

seems like creator of obs-composite-blur has to deliver a patch, however. this is my first time with the plugin Record Rename and it's exactly how i wanted (primarily i record in .MKV and i also found out today that if i rename them in .MP4 and send them over telegram, which is the best messenger on windows and android so far, then telegram does show a preview while with .MKV it doesn't). this means that I tried out Record Rename the first time after UniGetUI with the help of winget on windows 10 upgraded my obs studio installation to obs v33.0.0. and this is special because

1792960003192.png


"Starting with OBS Studio 33.0 we are updating how OBS Studio handles loading plugins."

thank you @Exeldro

also thank you obs studio team for the plugin section in the obs studio forum. i would have become confused trying to find the newst version of the plug Record Rename.
https://obsproject.com/forum/resources/record-rename.2134/updates this is the change log
https://obsproject.com/forum/resources/record-rename.2134/download and this is the current version to download.
 
View attachment 121772

"Starting with OBS Studio 33.0 we are updating how OBS Studio handles loading plugins."

thank you @Exeldro

also thank you obs studio team for the plugin section in the obs studio forum. i would have become confused trying to find the newst version of the plug Record Rename.
https://obsproject.com/forum/resources/record-rename.2134/updates this is the change log
https://obsproject.com/forum/resources/record-rename.2134/download and this is the current version to download.
i will give you a 5 star rating and something with paypal after the obs v33.0.0 "bug"
 
OK. i usually call someone or watch a seminar with a conference software and i start obs, configure the audio correctly and after the call has ended, i quit obs can continue with other work. i do this since corona pandemic. some say it's illegal to record but i don't care. before i have discovered your great plugin, i had to open the /Videos folder and for unknown reasons windows exlorer needs plenty of time to load all the files so i have to wait until i can rename the youngest video-file.
 
it seems like 170 characters are maximum and forbidden characters like – or : on windows tend to not rename the file. I have watched the progress of recording. first the file will be saved with the filename OBS has been set up to name. then after then file is ready, the plugin Record Rename wll show up and offer an alternative name, therefore if you see the prompt of Record Rename and your system crashes, your recorded file is still alright.
 
Temporary Workaround for OBS 33.0.1 (Windows Lua Script)
For anyone who recently updated to OBS 33.0.1 and noticed that Record Rename (v0.1.3) is no longer popping up when a recording finishes: OBS 33's frontend/Qt updates currently prevent the plugin from triggering on recording stop (even though it loads in the Tools menu, shows as "Legacy" in the Plugin Manager, and saves config changes in the log).
Until Exeldro releases an official update for OBS 33, I put together a lightweight Lua script workaround for Windows 10/11 users. When you stop a recording, it automatically opens a native Windows prompt asking you to rename the file while keeping your original file extension (`.mkv`, `.mp4`, etc.).

Features:
  • Triggers automatically when a standard recording stops.
  • Preserves your file extension (works with MKV, Hybrid MP4, MOV, etc.).
  • Waits 300ms after stopping so OBS cleanly unlocks the file before renaming.
  • Automatically strips out characters forbidden in Windows filenames (`\ / : * ? " < > |`).
  • Clicking Cancel or leaving the text box blank keeps OBS's default timestamp filename.
Note: This script uses PowerShell to draw the input box, so it is for Windows only.

---
Step by Step Instructions:
  1. Create the Script:
    1. Open up Notepad or any preferred text editing software (that supports .lua)
    2. Copy and Paste the script below.
    3. Click Save Asand ensure:
      1. Format is set to all files
      2. File name is set to: Record_Rename.lua
    4. Save the script to somewhere on your PC, or even in the default scripts folder in the OBS Program Files directory.
  2. Load it into OBS:
    1. In OBS Studio, go to Tools > Scripts
    2. Click on the '+' (Add Scripts) button
    3. Find the saved .lua file from Step 1, and select it.
  3. Ensure Prompt to rename Recording on Stop is checked on the right side, then click close.
Once Exeldro pushes an official OBS 33 update for the plugin, you can simply remvoe the script from Scripts, delete from your PC and switch back to the native plugin.

I hope this helps people.


The Script
Code:
obs = obslua

local enabled = true
local last_recording_path = ""

function script_description()
    return "Prompts to rename your recording immediately after stopping (Windows)."
end

function script_properties()
    local props = obs.obs_properties_create()
    obs.obs_properties_add_bool(props, "enabled", "Prompt to rename on Recording Stop")
    return props
end

function script_defaults(settings)
    obs.obs_data_set_default_bool(settings, "enabled", true)
end

function script_update(settings)
    enabled = obs.obs_data_get_bool(settings, "enabled")
end

function prompt_and_rename()
    obs.timer_remove(prompt_and_rename)

    if last_recording_path == nil or last_recording_path == "" then
        return
    end

    -- Extract directory, base filename, and extension (.mkv / .mp4)
    local dir, filename, ext = string.match(last_recording_path, "(.-)([^\\/]-)(%.[^%.\\/]+)$")
    if not dir or not filename or not ext then
        return
    end

    -- Escape single quotes for PowerShell
    local safe_filename = string.gsub(filename, "'", "''")

    -- Launch Windows InputBox via PowerShell
    local ps_cmd = string.format(
        [[powershell -NoProfile -WindowStyle Hidden -Command "Add-Type -AssemblyName Microsoft.VisualBasic; $res = [Microsoft.VisualBasic.Interaction]::InputBox('Enter new recording name (Cancel to keep original):', 'Record Rename', '%s'); Write-Output $res"]],
        safe_filename
    )

    local handle = io.popen(ps_cmd)
    if not handle then return end
    local new_name = handle:read("*a")
    handle:close()

    -- Trim whitespace/newlines
    new_name = string.gsub(new_name or "", "^%s*(.-)%s*$", "%1")

    -- Remove characters forbidden in Windows filenames
    new_name = string.gsub(new_name, '[\\/:*?"<>|]', "")

    if new_name ~= "" and new_name ~= filename then
        local new_path = dir .. new_name .. ext
        local ok, err = os.rename(last_recording_path, new_path)
        if ok then
            obs.script_log(obs.LOG_INFO, "Renamed recording to: " .. new_name .. ext)
        else
            obs.script_log(obs.LOG_WARNING, "Failed to rename recording: " .. tostring(err))
        end
    end
end

function on_event(event)
    if event == obs.OBS_FRONTEND_EVENT_RECORDING_STOPPED and enabled then
        last_recording_path = obs.obs_frontend_get_last_recording()
        -- Wait 300ms to ensure OBS finishes closing the file handle
        obs.timer_add(prompt_and_rename, 300)
    end
end

function script_load(settings)
    obs.obs_frontend_add_event_callback(on_event)
end
 
Hey, this plugin works for the most part, but %TITLE and %EXECUTABLE seem to print nothing on the linux version. I’m using Ubuntu Unity 26.04 and OBS Studio 32.1.0. Maybe you can look at it when you have the time, thank you! :)
 
1794945677054.png

sadly Record Rename is not clickable on the taskbar. therefore if it falls behind other windows (can happen easily because the window of Record Rename is small) I have to minimize all the windows then and can finally add some name to the already saved file.
 
Back
Top