Control OBS recorder via N4M script
Feb 05 2021 | 8:39 pm
Hey everyone here's a weekend gift for those interested in augmenting their video recording capabilities via the fantastic open source OBS app and a little Node for Max script.
The basic gist is, wouldn't it be nice to trigger OBS recordings from inside Max, in order to better synchronize these recordings with whatever is going on in your patch? Well it turns out OBS has an extensive API for controlling and querying all manner of functionality, a plugin for web socket access of this API, and a node library for interacting with this plugin. So all we need for Max is a little node wrapper, and I just so happen to have one for ya.
Make sure you first install the web socket plugin for your platform here. The first time you open the patch, make sure you hit the script npm install button to install all the node dependencies.
There are tester patches for both Mac and Win, and they assume either Syphon or Spout is installed via the Package Manager. To send video from Max to OBS add either a Syphon Client of Spout2 Capture source to your OBS scene.
You probably will also want to adjust the default video output settings in OBS to record as mp4.
Very interested to know if this is useful for people, so please reply here with any comments or questions. Happy patching!