Git Product home page Git Product logo

obs-file-renamer's Introduction

๐ŸŽฎ OBS File Renamer

This Python script monitors a specified folder for new video files (like those created by OBS Replay Buffer) and renames the latest file to include the name of the currently active window's process. This is useful for situations where you are recording gameplay from different games and want the output files to be automatically named according to the game that was being recorded.

๐Ÿš€ Simple Usage

  1. Download the latest release from the Releases

  2. Create a .env file in the same directory as the .exe with the following content:

OBS_FOLDER=path_to_your_OBS_folder
  1. Launch obs_file_renamer.exe.

๐Ÿง‘โ€๐Ÿ”ฌ Advanced Usage

๐Ÿ› ๏ธ Requirements

This script requires Python 3.6 or higher, along with the following Python packages:

  • pywin32==300
  • psutil==5.8.0
  • python-dotenv==0.19.2

These packages can be installed using pip:

pip install -r requirements.txt

๐Ÿ’ป Usage

First, create a .env file in the same directory as your script with the following content:

OBS_FOLDER=path_to_your_OBS_folder

Then, adjust the SECONDS_THRESHOLD variable in the script to match your setup. SECONDS_THRESHOLD is the number of seconds within which a file should have been created in order to be renamed. This prevents the script from renaming older files.

To run the script, simply execute it with Python:

python obs_file_renamer.py

The script will continuously monitor the OBS_FOLDER for new files and rename the latest file with the name of the active window's process.

โš ๏ธ Disclaimer

Please be aware that the script might not work perfectly for all applications. Some applications might not set their window title to the name of the game, or they might have multiple windows open. You may need to adjust the script to fit your specific use case. Also, be aware that this script has the potential to access sensitive information, as it reads the title of the currently active window.

obs-file-renamer's People

Contributors

nordikk avatar

Watchers

 avatar

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.