1. RTSP
The Real Time Streaming Protocol, or RTSP, is an application-level protocol for control over the delivery of data with real-time properties. RTSP provides an extensible framework to enable controlled, on-demand delivery of real-time data, such as audio and video. Sources of data can include both live data feeds and stored clips. This protocol is intended to control multiple data delivery sessions, provide a means for choosing delivery channels such as UDP, multicast UDP and TCP, and provide a means for choosing delivery mechanisms based upon RTP (RFC 1889).
2.海康RTSP播放地址格式
rtsp://[username]:[password]@[ip]:[port]/[codec]/[channel]/[subtype]/av_stream
- username
用户名. 例如admin. - password
密码. 例如123456。 - ip
设备IP. 例如 192.168.2.231 - port
端口号默认为554,若为默认可不填写。 - codec
h264/MPEG-4/mpeg4 - channel
通道号,起始为1. 如通道1则为ch1. - subtype
码流类型. 主码流为main,辅码流为sub.
e.g.
- 主码流
rtsp://admin:123456@192.168.2.231:554/h264/ch1/main/av_stream
等价于:
rtsp://admin:123456@192.168.2.231
- 子码流
rtsp://admin:123456@192.168.2.231:554/h264/ch1/sub/av_stream