Resource icon

OBS Python Automate Twitch Categories obs script 4

Auto-Category: OBS Script Automating Twitch Categories​

Automatically updates your Twitch.tv category based on the currently running program.

For example:
minecraft.exe is running -> update Twitch category to "Minecraft"
Manual list of games & lower priority discord api list

Installation & Requirements​

  1. Python version 3.9 or later, configured/loaded with OBS
  2. Python libraries: requests, psutil
    pip install requests psutil
  3. Save As and Place auto-category4.py in:
    C:\Program Files\obs-studio\data\obs-plugins\frontend-tools\scripts
  4. Create a config.json file in the same folder with your Twitch API credentials:
    Code:
    {
    "client_id": "YOUR_CLIENT_ID",
    "client_secret": "YOUR_CLIENT_SECRET",
    "broadcaster_name": "YOUR_TWITCH_USERNAME"
    }

  5. To obtain Twitch API credentials:
    • Go to the Twitch Developer Console
    • Register a New Application
    • Set OAuth Redirect URL to:http://localhost:1111
    • Category: Application Integration
    • Client Type: Confidential
    • Copy the Client ID and Client Secret -> step 4.
      * note the port `1111` must match in both Twitch App and the script (line 234). If changing it: Use a port number above 1024​

Usage​

  1. Launch OBS (run as admin to minimize any issues)
  2. Go to Tools -> Scripts -> + Button
  3. Select auto-category4.py
  4. Click "Login With Twitch"
  5. Login when prompted (required once per OBS session)

Adding More Games Manually override discord database with prioirty over 30

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 drop down selection",
"vscode.exe": "Software and Game Development",

Blacklist​

You can add programs to the blacklist if you do not want them to trigger a category update on twitch.

example:
launcher.exe auto triggers a twitch category update, we can add launcher.exe to blacklists

Note​

  • Login is only needed once per OBS session or less
  • The script is being updated and maintained: Please keep your script updated, unless it works for you and you are happy with what you have currently
Author
Misiphear
Downloads
1,344
Views
3,156
First release
Last update

Ratings

0.00 star(s) 0 ratings

More resources from Misiphear

Back
Top