[Live-devel] Port forwarding of multiple cameras

Ross Finlayson finlayson at live555.com
Tue Jan 15 22:24:51 PST 2019


> We are developing an android app to stream media from an IP camera.
> We are running a proxy server in android to multiplex the camera stream.
> We use port-forwading to get media stream from remote cameras connected to a router. 
> At present, streaming RTP over UDP, we can connect to a single remote camera connected to the router, at a time. I beleive we need to configure RTP and RTCP ports for video/audio streams also with the router. And If I need to connect to multiple cameras simultaneously, I need to configure additional 4 ports for each camera. 
> 
> My question is how can we use a user defined value for server ports in Live555 library. I have changed the default value of "initialPortNum" in "OnDemandServerMediaSubsession" constructor, but the log shows it still use 6970 as server RTP port. 

You’re on the right track; however the “initialPortNum” parameter that you should change is the one that’s passed to the “ProxyServerMediaSession” constructor.  And you should *not* do so by modifying the supplied “ProxyServerMediaSession” code.  Instead, you should define your own subclass of “ProxyServerMediaSession”, and define this subclass so that its constructor passes your appropriate value for “initialPortNum” to the (parent) “ProxyServerMediaSession” constructor.  Then define and implement your own “createNew()” function for your subclass.


Ross Finlayson
Live Networks, Inc.
http://www.live555.com/




More information about the live-devel mailing list