How to make WebRTC work on OctoPrint?

I saw several mentions about WebRTC being included in Octoprint > 1.8 (e.g., https://www.reddit.com/r/octoprint/comments/urr0l4/new_release_180/ )

What is required to get it to work?

I have a Janus WebRTC stream generated by Obico and I tried to just type in the relevant URL -- e.g., http://myrpi:8088/janus -- but nothing shows up when I press the test button in "Webcam & Timelapse".

The Janus stream is definitely working... and I can access it using either Obico or a generic Janus streamingtest.

Any thoughts here?

Currently, the only supported WebRTC stream is the one that is provided by aiortc. This is because there is no standard signalling protocol for these types of stream. For a stream to connect, there must be some communication between the server and the client, which is only setup for aiortc at the moment with OctoPrint.

For Janus to work, there has to be a lot of custom Janus code in the frontend. In the core of OctoPrint, we didn't want to have lots of spaghetti code & complex configuration handling the different stream types, so a webcam plugin system is being developed. This would allow for plugins like Obico to provide the code they need to get their WebRTC stream connected in the browser, or for other plugins and services to do the same. So the conclusion is, 'Coming Soon...' with regards to support for stuff like this.

1 Like

IIRC I think Leigh from Print Nanny actually got a POC working with janus based on a discussion in Discord and the webcam plugin system. There are several people with their eyes on that implementation for sure.

1 Like

Thanks for the helpful replies - I guess the best option is to wait a bit for the interface/plugins to mature. Happy to help beta test if helpful when ready.

1 Like

Has there been any progress in supporting Janus WebRTC in octoprint?

OctoPrint 1.9.0 had the webcam plugin system introduced which allows for plugin developers to provide a webcam feed. I made one for camera-streamer but it's not yet fully published, but from what I know it works fine.

I don't know of anyone that's tried to make a plugin to support Janus yet.