Not getting stream from a depepstream application running insde Kubernetes

I attempted to publish port 554 on Docker, but was unable to resolve the issue. After examining the logs, I understand that the transmission is occurring via a random port.How can I specify and open a particular port for this purpose? Additionally, I’m trying to understand how OpenCV manages to stream from the same RTSP URL.