Open Broadcaster Software (OBS) can be a helpful tool and tailored for different use cases with custom scripts. These can help solve a wide variety of dynamic features such as counters, timers, displaying data fetched by API, scene transitions, audio/video filters, etc. that require custom automation when hosting live streams.
A lot of the information out there about scripting in OBS is not un-surprisingly YouTube videos for Windows users. This is the blog post I wish I had found when I started setting up OBS 30 as a development environment for macOS.
tl;dr: Use ⌘+shift+G and type in the path to
On the surface this sounds like it should be simple, but there are a few gotchas that I had to research and took a non-trivial amount of time to find the right answer.
The Python/Lua Scripting docs say:
NOTE: To use Python on Windows or macOS, you must download and install a Python version that matches your OBS architecture. Then, in the scripting dialog, you must set the path to the Python install in the “Python Settings” tab.
There are a few additional details that may be helpful.
This can vary from system to system depending on how you've installed Python. In my case, I'm running Python 3.11 that was installed with Homebrew.
> which python3
This is not the path that OBS wants however, the path you need is something that might look like this:
If you input a path to the
/bin directory or even the root
email@example.com or go to far into the
firstname.lastname@example.org/Frameworks/Python.framework folder you'll be left with
Python not currently loaded.
To configure OBS, you'll need to select the menu Tools -> Scripts and then click on the Python Settings tab:
To input the Python location may depend on how you've configured your system, but typically the
/opt folder is not something you will see in your Finder that OBS brings up for selecting the Python Install Path.
The trick here is a keyboard shortcut. Use ⌘+shift+G to pop-open an input window to type in the path.
When you see the message Loaded Python Version along with the version you are ready to roll.
You are now prepared to run Python scripts you may find written by others or start developing your own.
Here are some you may find as helpful examples in the OBS Forums:
Here are the docs for more on how to write scripts:
More examples of this in this series later.