Replies: 1 comment
-
Hello,
Absolutely yes, a lot of people do that. You can either forward streams: Or alternatively use the IP address of an existing MediaMTX instance as RTSP source: In this way you can watch streams with WebRTC without exposing the original server to the internet.
I agree with the idea of using an intermediary backend between MediaMTX and users, in order to filter incoming requests and responses, providing the desired level of security and visibility of the system. |
Beta Was this translation helpful? Give feedback.
-
Question
Hey there! Just wanted to say again how awesome this project is – it's constantly blowing me away with its capabilities.
I'm reaching out for some guidance on a potential solution. Here's the scenario:
I have a camera server running mediamtx with multiple cameras connected.
The key goal is to minimize latency while ensuring smooth playback directly in the browser. With that in mind, I tried the mediamtx WebRTC & WHAP connections, and they worked fantastically – virtually no noticeable latency beyond the inherent VPN and internet overhead.
This server is connected to a VM running a REST API via a VPN.
Ideally, I want web browsers to connect to the REST API, discover available cameras and their details, and then be able to view the live streams directly.
By utilizing the REST API as an intermediary, web browsers wouldn't require a VPN connection and would remain completely oblivious to the camera server's IP address and ports. This creates a nice separation of concerns.
Here's a quick diagram to illustrate the flow:
However, I feel like WebRTC & WHAP might make forwarding data to the browser a bit cumbersome.
Here are some options I've been exploring:
My questions are:
Is "chaining" mediamtx instances even possible/recommended?
Are there any other approaches I might be overlooking that could achieve my goals?
Any insights or suggestions would be greatly appreciated!
Beta Was this translation helpful? Give feedback.
All reactions