The general form of the RTSP chain in brands such as X-Security and Dahua is:
rtsp://<user>:<password>@<ip>:<port>/cam/realmonitor?channel=1&subtype=0&unicast=true
For example: <rtsp://172.18.2.210:554/cam/realmonitor?channel=1&subtype=0&unicast=true>
- channel is the channel number
- subtype=0 indicates main stream, subtype=1 indicates substream
To take advantage of the MJPEG format:
http://<user>:<passwrod>@<IP_address>/cgi-bin/mjpg/video.cgi?subtype=1
To play a video video:
rtsp://<user>:<password>@<ip>:<port>/cam/playback?channel=<num canal>&starttime=<initial>&endtime=<fin>>
If what is required is to add an mjpeg video stream on a web by http, click here.