Sending and receiving video stream via websockets
-
Dear Mark, dear all,
It has been a while. I am trying to receive into Isadora a video stream that has been converted into jpeg images before being sent out on the Ethernet in websockets. OSC was not considered as the size of the images are too large. I saw the earlier thread https://community.troikatronix... where OSC played a role but size was not an issue then. Would there a possibility via the javascript actor - despite float output only? How could the received image be then passed out to a standard videoplayer? Would specific sender-receiver actors make sense? Then, should this post be redirected to Feature request?
I initially thought of adapting Spout but the other app is in C# and I could not find a Sendout C# code. Is there any? Any help would be welcome as deadlines before the show are coming close.
Best,
Ikse
-
Are we talking the same machine or over the network ? If we talk the same machine use Spout / Syphon
If we talk Networked machines go down the ndi route
-
If you are stuck with the other app, and it can only share the video over websockets, you may need to create a middleware application.
I would suggest using OpenFrameworks (or processing) to grab the WebSockets stream and convert it to spout/syphon that Isadora can then easily pick up.This OpenFrameworks plugins appears to support what you need: https://github.com/robotconsci...
-
Thanks a lot for the link, I will give it a try. I am actually stuck with the other app, which is on another computer (@Juriaan)
I wish we could exchange websockets directly within Isadora.
Ikse
-
Websockets are great, but I don't think many of us would be using them real soon.
I have used them for text data (used a external Python application as a bridge), but thats the 1 and only time I have needed them. -
You are certainly right. It is rather specific. With the middleware idea in mind, I have finally circumvented the issue by (1) getting the app window onto the same computer (2) capturing the window with OBS Studio https://obsproject.com/downloa... (3) publishing the window as a webcam using the associated VirtualCam pluggin https://obsproject.com/forum/r... (4) watching it inside Isadora with the Video In Watcher actor and live capture setting on OBS-Camera. I could not notice any lag between the orignal videostream and the video output on Isadora stage after setting the OBS video output framerate to 60 fps.
Thanks again,
Ikse
-
I'm really happy to hear you found a workflow that solved the problem.
But, uh, what are websockets? I mean, the name implies using sockets (i.e., TCP/IP) but is there some kind of standard for this? And does it compress the video for you?
(it would be nice if I knew everything, but being human and all, I don't.)
;-)
Best Wishes,
Mark -
its a fairly new realtime web data socket (any sort of data).
see: https://www.tutorialspoint.com...
Many frameworks have support for Websockets now (not just JS as the article totes). Its been a web standard for a number of years.