You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A clean, first-class pixel bridge between OBS Studio scenes and Lua automation scripts.
OBS FrameBridge
The Problem — and Why This Plugin Exists
OBS Studio is a powerful recording and streaming tool, but it has always had a blind spot: you cannot easily inspect what is happening inside a scene that is not currently on-air.
Developers who needed this — for example, to automate scene switching based on in-game state — were forced into creative workarounds: spawning hidden projector windows, abusing studio-mode transitions, or relying on fragile screen-grab APIs outside of OBS entirely. These tricks worked — barely — but they were brittle, resolution-dependent, tightly coupled to the desktop layout, and completely undocumented.
obs-framebridge was built to replace all of that.
It hooks directly into OBS's render pipeline and exposes a clean, thread-safe, Lua-callable API that lets any script read pixel data from any source or scene — whether it is currently visible on the stream or not. No window hacks, no external screen capture, no undocumented internals.
Every frame, the plugin captures the GPU output of a configured OBS source into a CPU-side RGBA pixel buffer. Your Lua scripts can then interrogate this buffer at any time through OBS's built-in proc_handler interface — no custom Lua bindings, no native module loading.
Features
Capability
Description
Per-pixel queries
Read the exact RGBA value at any coordinate
Region average colour
Average colour of an arbitrary rectangle
Colour matching
Check whether a region matches a target colour within a tolerance
Template matching
Compare a region against a reference image (PNG/JPEG) using MAE similarity
Reference image store
Load images from disk by ID; reuse across multiple comparisons
On-demand screenshots
Render any scene to a PNG — even if it is not currently active
Thread-safe
Pixel buffer is protected by a mutex; safe to query from any thread
Pure Lua integration
Uses OBS's standard proc_handler — works in any OBS Lua script
Lua API Reference
All procedures are called via obs.proc_handler_call(obs.obs_get_proc_handler(), "<name>", cd).
Renders a named OBS scene on demand and saves the result as a PNG — even if the scene is not currently live.
Input
Type
Description
scene_name
string
Scene to render
path
string
Output file path (.png)
width, height
int
Render resolution; 0 = use scene's native size
Example: Automated Scene Switching
The following snippet reads the average luminance of a region in a game capture scene and automatically switches OBS scenes based on thresholds — detecting, for example, a pause menu versus active gameplay versus a loading screen.
An OBS Studio plugin that captures the rendered frame buffer of any source or scene and exposes it to Lua scripts — enabling **real-time, per-frame pixel analysis** from within OBS scripts.