How can I connect to OBS Websocket server and get the scene into Unity

I noticed that OBS has a Websocket server in-built, which provides us a port and everything.
I am thinking if there is a way to access that Websocket server and retrieve OBS Virtual Camera feed directly into Unity, using Video Player or maybe some other component.
If this is possible, can someone tell me how to do it ? A basic script would go a long way in helping.

Don’t bump questions with answers without any content or progress. I can’t imagine that you haven’t found anything in the last 8 hours.

Your main problem here is that this websocket interface that OBS provides only seems to be for remote control actions, not for streaming video or audio. WebSockets are implemented over a TCP connection which is generally bad for streaming real-time data.

Within 2 minutes I’ve found this library which documents everything you can actually do with the interface. When you look at the list of requests all you can do is query the state of obs or change its state.

However to actually get the virtual camera stream inside Untiy, you can use a WebCamTexture in Unity. When you have one of the latest versions of Unity (I think 2021+) using a WebCamTexture with the virtual camera that obs provides should work out of the box. I tried it in Unity 2021.3.14 and I can see my OBS live stream on that texture.