Python HTTP Server
Run webpages locally on a simple Python HTTP Server. Javascript libraries, like Google MediaPipe, require the secure context of a localhost webserver to run locally.
Features
- An OBS Python script to start an HTTP Server after OBS loads
- serve webpages locally
- A page to open OBS and set the OBS WebSocket server
- A Javascript to connect the OBS Browser Source or a Chrome Browser to the OBS websocket Server
- Send WebSocket messages between browsers and OBS
- A macOS shortcuts shortcut to automate opening OBS
Add the HTTP Server Script to OBS
The "Python HTTP Server" script and accompanying OBS Collection can be found on Github.
python http server repo
Import the HTTP Server OBS Collection
- Download the HTTP server collection
- In OBS, from the menu select
Scene Collection > Import - Import the collection
- Choose the collection
Scene Collection
Add the HTTP Server Script
- Download the HTTP Server Script
- In OBS, from the menu select
Tools > Scripts - Click the
+ Add scriptbutton
Serve webpages
In the same folder where the Python HTTP Server Script is saved, add HTML, CSS, Javascript, and other resources. See the "set websocket server" repo for using the python HTTP Server.