Clon1998 / mobileraker

A Flutter mobile app for Klipper/Moonraker
Other
459 stars 50 forks source link

WebRTC/MediaMTX Support #349

Open ihatemyisp opened 3 months ago

ihatemyisp commented 3 months ago

Feature Request

Problem Description

I use a couple of Wyze cameras to monitor my printer and enclosure. They are streamed to Mainsail via WyzeBridge which uses WebRTC/MediaMTX. Support for MediaMTX is baked into Mailsail and it works flawlessly.

Proposed Solution

Add WebRTC/MediaMTX support.

Alternatives Considered

Unfortunately in my case, there is no alternative that makes sense.

Additional Context

None necessary, I believe.


Checklist To help us understand your feature request, please ensure you've covered the following points:

Your input is valuable in shaping the development of our project. Thank you for taking the time to submit your feature request!

Clon1998 commented 3 months ago

Can you provide me an example code that shows how the messaging for MediaMTX works?

ihatemyisp commented 3 months ago

I've actually been digging through it trying to figure out if I could get this working myself. I'm having issues making heads or tails of all of it, hah.

WyzeBridge gives me a WebRTC URL (i.e., http://3d2.lan:8889/sv06-plus/) and I plug that into Mainsail. I got started down this rabbit hole via the Crowsnest docs: https://crowsnest.mainsail.xyz/faq/how-to-use-wyze-cams.

When I load the URL by itself I get a player and the stream starts. Here's the source from that: https://url.vogon.dev/YellowGummyNorth

Now that I'm thinking about it, I kind of feel like I could've looked at the Mainsail source and tried to grab more info on how they did it before posting. My apologies.

ihatemyisp commented 2 months ago

https://github.com/mainsail-crew/mainsail/blob/develop/src/components/webcams/streamers/WebrtcMediaMTX.vue

It looks very similar to their WebrtcGo2rtc implementation...I think.