Best Route to Handle API Scripting

boop_xyz

New Member
What would be the best course of action with scripting? I am making calls to an API and getting that data and displaying it I had these ideas:

1. I do all of the scripting in OBS python, make API call, update the text sources, and repeat this every second
2. I have an external application (nodejs) do the API calls and write it to a file which OBS has a text source set to
 
Does the API call ever have to wait for data (network or serial communications etc)?
If not, I would be inclined to script in OBS and update the sources and avoid the overhead of writing and reading files
If the API call DOES need to do something that blocks, I would either use an external application writing to the file, or have your external application talk to OBS using Websocket to update the text source

OBS scripting isn't multi-threaded, so blocking calls that need to wait more than a few msec can cause frame loss.
 
Top