Auto-Category: OBS Script Automating Twitch Categories
This script automatically updates your Twitch.tv category based on the currently running program. For example:- If minecraft.exe is running -> update Twitch category to "Minecraft"
Installation & Requirements
- Python version 3.9 or later, configured/loaded with OBS
- Python libraries: requests, psutil
pip install requests psutil
- Save As and Place auto-category4.py in:
C:\Program Files\obs-studio\data\obs-plugins\frontend-tools\scripts
- Create a config.json file in the same folder with your Twitch API credentials:
{ "client_id": "YOUR_CLIENT_ID", "client_secret": "YOUR_CLIENT_SECRET", "broadcaster_name": "YOUR_TWITCH_USERNAME" }
- To obtain Twitch API credentials:
- Go to the Twitch Developer Console
- Register a new application
- Set OAuth Redirect URL to: http://localhost
- Copy the Client ID and Client Secret
Usage
- Launch OBS
- Go to Tools -> Scripts -> + Button
- Select auto-category4.py
- Click "Login With Twitch"
- Login when prompted (required once per OBS session)
Adding More Games
Edit these two lines in auto_category4.py:process_categories = {"minecraft.exe": "Minecraft"}
process_priorities = {"minecraft.exe": 90}
Further example:
"game or app in lowercase as is on task manager.exe": "Category as it appears in Twitch categories",
"vscode.exe": "Software and Game Development",
Note
- Login is only needed once per OBS session. Thank you and have fun