I have a particular user case where I need to expose the rtsp stream to the public. I configured the bluenviron/mediamtx to listed on port 80, outside the container. But the rtsp stream is NOT working when I use the public device URL.
It works with:
rtsp://192.168.1.10:80/us1
It doesn’t work with:
rtsp://XXX.balena-devices.com:80/us1 - this request it NOT reaching my container.
rtsp://XXX.balena-devices.com:443/us1 - this request it NOT reaching my container. https://XXX.balena-devices.com/us1 - I do see that it get’s to my container but it’s https - which is expected http://XXX.balena-devices.com/us1 - I do see that it get’s to my container but it’s http - which is expected
Is there anything that I can do to make it work? It seems that only http requests work over balena-devices.com.
I’d say you docker-compose file is not correctly configured to route the ports. Could you share the file to check?
Also, found this thread that may help you to diagnose and get some ideas.
Since the only requirement is to expose port 80, and it works locally, when I access “rtsp://192.168.1.10:80/us1”, and because I get a log statement when I access “https://XXX.balena-devices.com/us1” or " http://xxx.balena-devices.com/us1" - even if it’s an error message - it’s confirmation that the requests get’s to the container.
I found, before I posted this question, the thread that you mentioned, but he states “I’m having trouble making requests from the client to the server from the local IP and the public URL.” for me it works when I access locally.
I’m just not sure if RTSP is supported over the balena-devices.com proxy, since it’s not HTTP. Did anybody use the balena-devices.com proxy for anything else than serving HTTP content? To me it seems that balena-devices.com proxy is more than a simple port forwarding and might expect only HTTP content.