海康、大华、宇视的RTSP视频流网址组成
1、海康
例子:rtsp://admin:12345@192.168.1.64:554/Streaming/Channels/1?subtype=0&unicast=true&basicAuth=true
组成:rtsp://<username>:<password>@<ip_addr>:<port>/<path>
username:admin 用户名
password:12345 密码
ip_addr:192.168.1.64 设备的ip地址
port:554 设备RTSP服务的端口号 通常是554或其他用户自定义的端口号
path:Streaming/Channels/1?subtype=0&unicast=true&basicAuth=true 设备摄像头的通道号和码流类型等信息
例子中的1为通道号,
码流类型为主码流(subtype=0),如果是子码流就要等于1
basicAuth:true 使用基本认证,用户名和密码将明文传输,如果要安全就设为0,从而使用摘要认证。
2、宇视
例子1:rtsp://admin:admin@192.168.8.8:554/video1
组成:rtsp://{用户名}:{密码}@{ip}:{port}/video1/2/3
用户名:admin
密码:admin
ip:192.168.8.8
port:端口 554
video1:主码流,子码流为video2,3码流为video3
3、大华
例子1:rtsp://admin:admin@192.168.18.107:554/cam/realmonitor?channel=2&subtype=1
组成: rtsp://[username]:[password]@[ip]:[port]/cam/realmonitor?channel=1&subtype=0
username: 用户名 admin
password:密码 admin
ip:192.168.18.107
port:554
/cam/realmonitor?
channel=2:通道号,起始为1,例如通道2,则为channel=2
subtype:码流类型,主码流为0(即subtype=0),辅码流为1