[Live-devel] Setting RTSP Client port number as opposed to ephemeral port number via negotiation

Ross Finlayson finlayson at live555.com
Thu Jun 22 01:16:10 PDT 2023



> On Jun 21, 2023, at 2:08 PM, Faisal, Manir <Manir.Faisal at mda.space> wrote:
> 
> Hello,
>  We are running into an issue where in we would like the server (camera) to send data to a specific client port. I believe what we are doing is the right approach i.e. utilizing the setClientPortNum() to set the appropriate port number

This is the correct approach.  Note, for example, how our “openRTSP” client implements the “-p <startingPortNumber>” option.  See
	http://live555.com/openRTSP/#no-receive
and
	“testProgs/playCommon.cpp”

Two important things to note:
1/ The client port number that you specify should be even.  That port number will be used for RTP; the next (i.e., odd) port number will be used for RTCP.
2/ You must call “setClientPortNum()” *before* you call “initiate()”.


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




More information about the live-devel mailing list