jweb to jit.world question.

TConnors's icon

Hello fellow patchers. Has any found a way to route the jweb windows into the jit.world? Particularly when the internet web stream is video. Or is there another way to live stream web based video into the jit.world? I've worked with streaming photos and sound off the internet, but have not found a solution for a video web stream. I reviewed the 2014 postings on the jit.gl.cef external, which only works for PC, and I'm on a Mac computer. Would this be something Node for Max could cover?

👽'tW∆s ∆lienz👽's icon

Has any found a way to route the jweb windows into the jit.world?

the only way i was ever able to do anything like this was setup 'jit.desktop' so that it captures the exact screen-location of the jweb display, writes that to matrix then translates to texture and into jit.world/openGL(but i was never satisfied with that as a solution - jweb has to remain displayed in a certain position during capture, plus that seems like 2 separate passes at displaying the same exact content, felt too finicky/limited/inefficient/etc...)...

but if you have the screen real-estate to spare, try jit.desktop to capture jweb, not sure if there's any other way(jweb has no matrix/texture output, otherwise that would be the best option)

hope it helps 🍻

TConnors's icon

Thanks Raja for the reply. I did try this option, but, like you, found it very finicky and limited. I was thinking that it would be great to have a way to route the jweb stream into gl texture. Perhaps I'm going down the wrong road.

👽'tW∆s ∆lienz👽's icon

oh, i just read in the other thread where Rob wrote about jit.movie support of streaming from URLs(so this might be the solution), but i haven't figured out how you get the streaming URL to register with jit.movie yet:

if getting the streaming URL from node, and passing it to jit.movie doesn't work, then I'm not sure. It should work fine, both avf and viddll engine versions of jit.movie support streaming from URLs...

anyways, just mentioning: sounds like if it's not currently possible, it will be somewhat soon(and you might be right, there's probably a way to grab the stream by URL through node(?)... then convert into GL texture from jit.movie..).. will be keeping an eye on that thread, myself 😋

TConnors's icon

Yes, after reading Rob's reply to the other thread, I'm going down that rabbit hole to figure it out. Nothing yet, but will post if I find a solution.

There must be a way to do this. :-)

Rob Ramirez's icon

While we are currently investigating some solutions to pipe jweb output into Jitter, there are some viable solutions using existing software.

The best solution I've found for this is using my beloved OBS and the obs-ndi plugin. This works on both Mac and windows. After installing the plugin you tell OBS to capture an open browser window, and then enable the NDI output in the OBS Tools menu.

To pipe this signal into jitter, you can install the jit.ndi externals, and use a jit.ndi.receiver~ object. This works quite well on Windows, but on Mac I've found that a better solution (better meaning higher FPS and lower CPU consumption) is install the NDISyphon app to convert the NDI signal from OBS to a Syphon signal, piped into Jitter via jit.gl.syphonclient object.

You could also use the exact same setup with jweb in a max patch instead of a browser window, if you need the web page hosted in Max for whatever reason. But with a site that generates video (e.g. Shadertoy), I achieved a much better framerate using Chrome instead of jweb. YMMV

The setup is simple enough once you get the hang of things, and gives me a fairly steady 60fps with 1920x1080 dimensions on both Mac and Windows. I plan to make a video walkthrough of this to demo the setup, and will post it here if/when that happens.

TConnors's icon

Thank you Rob. This is helpful and will have a deep dive into the process you have described. And, yes, it's always much appreciated to have walkthroughs. Thanks in advance. PS. I also love OBS.

TConnors's icon

Yipe. That works well Rob, and pretty straight forward once you get everything in place.

john telfer's icon

Any news on that video walkthrough Rob?
There's no NDI output in Tools menu. Evidently version 4.x doesn't work with OBS 28