Skip to content

Repository files navigation

BRB Timer for OBS and Twitch Chat

An OBS Studio script written in python to allow Twitch chatters in your channel to guess how long the streamer/broadcaster will be AFK.

Exposes some chat commands for mods and chatters to use:

  • !brb - Mods can unhide and start the count-up timer and enables the !at MM:SS command.
  • !at MM:SS - Chatters register a guess when the streamer will return.
  • !back - Mods can end an active !brb and sends a chat message stating the "winner".
BRBTimer_Demo.mp4

Usage

Once you go live and start streaming, three new chat commands will be available:

  • !brb - Only accessible to the broadcaster and mods. Starts the count-up timer, shows it on-stream, and enables the !at MM:SS command.
  • !at MM:SS - Accessible to all chatters, including mods. Registers the user's guess for when the streamer will return. Nobody can guess more than once per !brb, since that'd allow people to cheat by constantly updating their guess.
  • !back - Only accessible to the broadcaster and mods. Ends the !brb, hides the on-screen timer (after a cooldown delay), and sends a chat message stating the "winner".
    • The winner is the chat member who registered a guess closest to the count-up timer's final time... without going over-- Price is Right rules.

BRB Timer in action, in a Twitch chat channel

Installation

Setup video:

BRBTimer_install_and_config.mp4
  1. Download the brb_timer.py script to your computer running OBS. That's the only file required. download brb_timer.py from GitHub
  2. Install Python on your system. (OBS requires a python version between v3.6 and v3.12.)
  3. Launch OBS.
    • From the Tools menu, choose Scripts. OBS > Tools > Scripts menu
    • Select the tab named Python Settings. OBS Python Settings pane
    • Click the Browse button and locate your python installation folder.
      • On Windows, that path may look like: C:\Users\YOUR_USERNAME\AppData\Local\Programs\Python\Python312\ Windows file explorer window navigated to python install path
      • On a Mac, /Library/Frameworks/Python.framework or possibly: /opt/homebrew/Cellar/python@3.12/3.12.13_4/Frameworks (Be sure to select the Frameworks/ folder inside the python installation folder.) MacOS Finder window navigated to python install path
    • When the path is correct, OBS will show a message like "Loaded Python Version: 3.12" OBS showing recognized python version
  4. Install this script into OBS.
    • From the Tools > Scripts > Scripts tab, click the + button, navigate to where the brb_timer.py file was downloaded, and select it. File explorer navigated to downloaded brb_timer.py file
    • OBS should show the Description as 'BRB Timer'. BRB Timer script properties in OBS
  5. Quit and relaunch OBS to have the script create the timer Source in the default/active scene.

Configuration

The script requires minimal Twitch OAuth access to make API calls and to process chat messages in your channel.

  1. Visit this page and click the "Connect to Twitch" button to obtain an auth token from Twitch. Copy the token to your clipboard. Twitch OAuth page Landing page with token to copy
  2. Launch OBS.
    • From the Tools > Scripts > Scripts tab, select the brb_timer.py script entry. OBS Tools > Scripts menu
    • In the BRB Timer properties, paste the Twitch OAuth token. BRB Timer properties in OBS Scripts pane
    • If anything goes wrong, the script log should appear with the relevant log messages. OBS Scripts log

Customization

BRBTimer_Customize.mp4

The script will have also created a new text Source in your active OBS scene with some default display settings and transitions.

BRB Timer text source in OBS

This script will show/hide and update the count-up timer in this text Source automatically, but it will retain any styling and positioning you customize, so you can tweak the text Source properties as much as you like.

Source properties

⚠️ The name of the timer source must remain unchanged in OBS, or this script will try to recreate a new one on next launch.

License

MIT

Copyright

Copyright © 2026+ Brian Porter

About

An OBS Studio Python script that lets chatters guess how long the streamer will be afk.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Contributors

Languages