Description
I want to be able to determine the UDP port of an RTSP source.
I'm running MediaMTX behind a NAT. Currently, with RTSP sources, I have no way to predict which UDP ports I need to forward - which forces all RTSP sessions to use the TCP transport.
Implementation
I'm open to implementing this feature myself, but before I do I'd like to hear from the maintainers on what they think is the best approach for this. From a user perspective, I think the best option is to use the existing RTP & RTCP port (which are used for the server). This requires no additional configuration and will "fix" this issue for many people "in the wild" as these ports are probably already forwarded. However, this will require a change in the gortsplib design, since the RTSP clients & server will now need to share a UDPListener object. Another option is a designated port pair for RTSP clients, which should be easier to implement but requires additional configuration.
Any guidelines/advice on how to implement this will be greatly appreciated 👍