[Live-devel] Is it possible to override the RTP port chosen by the server?

Ross Finlayson finlayson at live555.com
Wed May 23 21:17:25 PDT 2012


>     Some Samsung cameras (SNB-5000, SND-5080, SNO-5080) choose the RTP destination port; kindly, the Live555 RTSPClient respect this request.
>     Instead Samsung, unkindly, doens't let us disable this feature or set the desired port up via the camera's configuration web page; so sometimes two or more cameras (and all after power on) choose the same port: so some streams starve and other ones receive frames coming from two or more cameras.
>  
>     Could you please tell me if and where subclassing in order to make Live555 refuse the port chosen by the camera and answer with a port chosen by the OS (hoping the camera will accept the change

That's the big question - i.e., if, for these cameras, the client were to choose its ports itself, would the server (the camera) accept this?

Therefore, I suggest that you first run the following test:
- First, upgrade to the latest version of the "LIVE555 Streaming Media" code.  (The version (2005.10.05) that you are using now is *extremely* out of date!)
- Change line 596 of "liveMedia/MediaSession.cpp" from
	if (fClientPortNum != 0) {
to
	if (fClientPortNum != 0 && IsMulticastAddress(tempAddr.s_addr)) {

This will force your client code to choose its own port numbers, even if the server specified a port number in the SDP description.

The problem here is that your camera is specifying - in the SDP description - a port number for unicast streaming.  This is unusual.  It is more common for the server to specify its port number later, when it handles the RTSP "SETUP" command.  (Specifying a port number in the SDP description is usually done only for multicast streams (because, for multicast streams, the port number will be the same for both clients and the server.)


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

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.live555.com/pipermail/live-devel/attachments/20120524/a9b7a3b0/attachment-0001.html>


More information about the live-devel mailing list