Question / Help Is there a way to detect if a stream is live programmatically?


New Member
Im looking into automating OBS and implement some sort of health checks. Im not streaming to Twitch or Youtube but outputting the stream to an NGINX sever to create an output RTMP link for someone to ingest.

I already have a script that automatically opens OBS and start stream via a batch file but how can i detect if the stream has connected and is outputting? Im struggling to find out ways to detect this

A few questions or theories im thinking about:
  1. Their is a red and green coloured square to indicate if a stream has issues or is connected and is streaming but i havent been able to find a way to read that from OBS, is that even possible and can it be read via the command line or Lua script? (A hacky way maybe is to take a screenshot and at the co-rds of that box and see if the pixels is red or green but i prefer a more reliable way)
  2. Dont know if this is possible/reliable but to be able to read the Port OBS streams from and try and see how much data is being sent and detect if its small or none existent?
If anyone has some other ideas or areas that can be look into to detect if a stream is alive and working without manually checking myself, that be great!


Active Member
For OBS remote control, there is a websocket plugin. Additionally, you can look into the nginx logfiles to get additional information about running streams.


New Member
Hey Koala,

Thank you for this, ill take a look at them and see how i get on. I can already see use cases with the remote control features!