Unlike streaming video games, showcasing software development entails interaction with many windows, often on multiple monitors.
This inconvenient proliferation of application windows makes anything but 'Display Capture' impractical. This is an unfortunate burden to those who would otherwise be willing to stream from their (often highly-configured) personal or work machines.
To further detriment, arranging windows to fit a solitary display counteracts the productivity boon of extra screen real-estate.
Leverage the ahkUnwrapped Python package and OBS Scripting API to asynchronously monitor application windows from an allowlist, populating and layering Window Captures within OBS as necessary to reflect focus, child windows, etc.
See recent Software and Game Development broadcasts at https://www.twitch.tv/CodeOptimist.
- Explicit allowlist for intentional window captures.
- Regular expression matching of window titles.
- On-demand capture of child windows.
- Capture windows from any monitor.
- Automated layering by recently focused.
I value minimal setup, but it's not here yet.
It's recommended that you aren't broadcasting, or if so, edit the included captures.yaml before loading the script.
- Install Python 3.6 to a unique path, e.g.
%AppData%\..\Local\Programs\Python\Python36-obs
(Python 3.6 is the latest OBS supports, and it won't use virtualenv.)
You probably don't want to add this to your system PATH. - Clone (or download) this repository to a preferred location, e.g.
C:\path\to\repo
- Install dependencies via commandline:
%AppData%\..\Local\Programs\Python\Python36-obs\python -m pip install -r C:\path\to\repo\requirements.txt
- Within OBS, create an empty group named
Windows
on the desired scene(s). The script will manage its contents. - Within OBS, select
Tools->Scripts, Python Settings
and browse to your Python install path. - Within OBS, select
Tools->Scripts, ➕ (Add Scripts)
and browse tocapture-windows.py
- Done. Matching application windows from
captures.yaml
should automatically be captured within OBS. - Make changes to captures.yaml and
🔃 (Reload)
capture-windows.py (make sure it's selected) anytime.
POLL_INTERVAL_MS
at the top of capture-windows.py
will be adjustable from Loaded Scripts in the future.
If you encounter:
Encoding overloaded! Consider turning down video settings or using a faster encoding preset.
try increasing the value to 500
(half a second). Default is 250
(and can probably be set to 100
on many machines).