Coder Social home page Coder Social logo

cr08 / obs-recording-renamer Goto Github PK

View Code? Open in Web Editor NEW
3.0 3.0 0.0 75 KB

OBS recording renamer - Adds extra info to the recording filename such as window title or Twitch stream info

License: GNU General Public License v3.0

Python 100.00%
obs obs-studio python script

obs-recording-renamer's People

Contributors

cr08 avatar pjw29 avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar

obs-recording-renamer's Issues

Reworking window/game title tracking

Currently the script is written to check the foreground window upon stopping the recording/replay and use the title found in that moment for the rename (as documented in the README). This becomes problematic for example if you manually click Stop Recording in OBS as it will see OBS as foreground and label it as a Manual Recording. This means this script is really only viable with a hotkey or external tool such as a Stream Deck where you can stop recording with a game remaining foreground.

A potential fix may be to continually track the foreground window for the duration of the recording, logging this somewhere. We can keep this within the existing timing loop which defaults to checking every 15s. Upon stopping the recording, we have a couple of potential options:

  1. Determine the longest running window logged during the session and use that for the rename.
  2. Include all logged unique window names in the recording filename (may need to add in exceptions for stuff like browsers that can change titles based on the page)
    2a) Include the top <x> window names in the recording filename, count selectable by the user
    2b) Include all logged unique window names, excluding common 'Desktop' applications.
  3. Determine a better way to detect applications in Python that can be tailored to focus on games, even if not in the foreground.

Adding optional/opt-in reporting of user's 'rename mode' choices for polling purposes

This will likely be lowers priority.

Considering giving the user a number of different options at this point of 'Rename mode':

  • Pull game/stream title from Twitch
  • Monitor foreground windows for duration of recording session, using the top <x> (user configurable) windows
  • Use the current or most active scene (probably will use the same user configurable window count for this)
  • Use the current or most active game capture or window source at the bottom of the source list in the current scene (again, likely will use the window count for this)
  • Monitor a specific game capture source if the user chooses the automatic option

Because these are a ton of options, I would ultimately like to add an opt-in reporting mechanism to automatically report back to me JUST the mode people have used during an active recording session so I can get a good idea what's preferable and maybe drop off unused modes.

Discussion welcome. This may all change up as I deliberate on it some more.

Add smarts when matching to the OBS window/check for active game source or scene

New QoL feature I'd like to have implemented:

Currently when the OBS window is active/tracked it just refers to it as 'Manual Recording'. I'd like to see if we can have the script dive deeper and check for the active scene and/or active game capture or video capture and use that in the filename, ie: 'OBS - Console Capture scene'.

error python:3.11 OBS:29.1.3 windows 10

[RecordingRenamer.py] Traceback (most recent call last):
[RecordingRenamer.py] File "F:\Steam/steamapps/common/OBS Studio/data/obs-plugins/frontend-tools/scripts/OBS-Recording-Renamer\RecordingRenamer.py", line 57, in on_event
[RecordingRenamer.py] newfile = root_ext[0] + " - " + title + root_ext[1]
[RecordingRenamer.py] ^^^^^
[RecordingRenamer.py] UnboundLocalError: cannot access local variable 'title' where it is not associated with a value

[RecordingRenamer.py] Traceback (most recent call last):
[RecordingRenamer.py] File "F:\Steam/steamapps/common/OBS Studio/data/obs-plugins/frontend-tools/scripts/OBS-Recording-Renamer\RecordingRenamer.py", line 111, in on_event
[RecordingRenamer.py] newfile = root_ext[0] + " - " + title + root_ext[1]
[RecordingRenamer.py] ^^^^^
[RecordingRenamer.py] UnboundLocalError: cannot access local variable 'title' where it is not associated with a value

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.