This python script allows capturing of windows in OBS that have a dynamic title. This is useful for capturing WhatsApp or other programs where you want to capture a window based on a regular expression.
This script only works on Windows.
OBS requires you to install a compatible version of Python.
After installing Python, you will also need pywin32 which can be downloaded from here.
To install other dependencies:
pip install -r requirements.txt
- Create a scene and a Window Capture source. The program/window this captures is not important at this point.
- Add the script to OBS.
- Choose the name of the source you wish to update.
- Specify an executable (case insensitive) - e.g. "whatsapp.exe".
- Provide a regular expression for the window title - e.g. ".*video call".
Whenever the scene is changed, a check is done to see if the selected source matches the window that is configured.