[Live-devel] RTSP over TLS with IP Camera Not Working

Ross Finlayson finlayson at live555.com
Fri Mar 12 04:40:22 PST 2021



> On Mar 12, 2021, at 3:01 AM, Kommoju, Sekhar via live-devel <live-devel at us.live555.com> wrote:
> 
> Background: As per your comment, I’ve modified the testRTSPClient to call the function “useTLS()” on “RTSPClient” before sending the first RTSP command, but unfortunately I was getting a “Bad Request” error response from IP camera for the OPTIONS command (as shown in the below screenshot). 
>  
> Just for your reference, the sample code used in the testRTSPClient program:
>  
>        RTSPClient* rtspClient = ourRTSPClient::createNew(env, rtspURL, RTSP_CLIENT_VERBOSITY_LEVEL, progName, 443);

Your problem was including the “443” parameter.  This tells the client to attempt RTSP-over-HTTP tunneling on port 443.  This is probably not what you wanted, and it will not work (RTSP-over-HTTP tunneling does not work with TLS).

Instead, leave out that parameter, and just call:
	RTSPClient* rtspClient = ourRTSPClient::createNew(env, rtspURL, RTSP_CLIENT_VERBOSITY_LEVEL, progName);


>        rtspClient->useTLS();

Note that you don’t need to add this line if your RTSP URL begins with “rtsps://“ (instead of “rtsp://“), or if the RTSP URL specifies a port number of 322 (the port number reserved for RTSP over TLS).


> 	• Do you have any test client to check/test RTSP over TLS to connect to an IP camera using Live555 libraries?

Our existing RTSP client applications - “testRTSPClient” and “openRTSP” will work, provided that you give it a RTSP URL that begins with “rtsps://“, or specifies a port number of 322 - as noted above.  In this case, you should not need to modify any existing code.


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




More information about the live-devel mailing list