1. 程式人生 > >海康、大華IpCamera RTSP地址和格式

海康、大華IpCamera RTSP地址和格式

海康:
rtsp://[username]:[password]@[ip]:[port]/[codec]/[channel]/[subtype]/av_stream
說明:
username: 使用者名稱。例如admin。
password: 密碼。例如12345。
ip: 為裝置IP。例如 192.0.0.64。
port: 埠號預設為554,若為預設可不填寫。
codec:有h264、MPEG-4、mpeg4這幾種。
channel: 通道號,起始為1。例如通道1,則為ch1。
subtype: 碼流型別,主碼流為main,輔碼流為sub。


例如,請求海康攝像機通道1的主碼流,Url如下
主碼流:
rtsp://admin:
[email protected]
:554/h264/ch1/main/av_stream
rtsp://admin:[email protected]:554/MPEG-4/ch1/main/av_stream


子碼流:
rtsp://admin:[email protected]/mpeg4/ch1/sub/av_stream
rtsp://admin:[email protected]/h264/ch1/sub/av_stream


大華:
rtsp://username:[email protected]:port/cam/realmonitor?channel=1&subtype=0
說明:
username: 使用者名稱。例如admin。
password: 密碼。例如admin。
ip: 為裝置IP。例如 10.7.8.122。
port: 埠號預設為554,若為預設可不填寫。
channel: 通道號,起始為1。例如通道2,則為channel=2。
subtype: 碼流型別,主碼流為0(即subtype=0),輔碼流為1(即subtype=1)。


例如,請求某裝置的通道2的輔碼流,Url如下
rtsp://admin:
[email protected]
:554/cam/realmonitor?channel=2&subtype=1