1. Introduction
Totally, we need 3 procedures to achieve play RTSP stream over HTTPS.
First of all, setting Camera as HTTPS server.
Then, since VLC cannot play HTTPS stream, here we use a software stunnel as HTTPS client which is able to communicate with Camera through security protocol.
Lastly, VLC will play the stream URL from stunnel.
After above procedures, we can use below RTSP URL to play on VLC:
Primary Streamrtsp://user:password@stunnel IP:accept Port/main
Secondary Streamrtsp://user:password@stunnel IP:accept Port/sub
Tertiary Streamrtsp://user:password@stunnel IP:accept Port/third
2. How to play RTSP stream over HTTPS
Step 1: Upgrade Camera to the firmware version 4X.7.0.78-r6
This firmware version can be download from:
Step 2: Enable the HTTPS at Camera side
You can create a Private Certificate you like.
Step 3: Install stunnel
https://www.stunnel.org/downloads/stunnel-5.59-win64-installer.exe
Step 4: Edit the stunnel configuration
Jump to bottom and input below info.
[https]
client = yes
accept = 8080
connect = 192.168.7.189:443
; "TIMEOUTclose = 0" is a workaround for a design flaw in Microsoft SChannel
; Microsoft implementations do not use TLS close-notify alert and thus they
; are vulnerable to truncation attacks
TIMEOUTclose = 0
Save the configuration to connect to Camera HTTPS stream.
Note:
If save failed, please try Reload Configuration.
Step 5: Configure the VLC to display Stunnel AllUsers stream
Path: Tools->Preferences->Interface
Select All in Show settings.
Path: Input/Codecs->Demuxers->RTP/RTSP
1) Tick the Tunnel RTSP and RTP over HTTP
2) HTTP tunnel port: Input the port 8080. (Same port as the accept port in stunnel )
Step 6: Input the RTSP URL into VLC
Path: Media->Open Network Stream
rtsp://admin:ms111111@127.0.0.1:8080/sub
127.0.0.1 is the stunnel IP address