直播功能
State
直播能力更新
Topic: thing/product/{device_sn}/state
Direction: up
Data:
Column | Name | Type | constraint | Description |
---|---|---|---|---|
live_capacity | 直播能力 | struct | ||
»available_video_number | 可用于直播的视频流总数 | int | {} | 表明无人机或设备所拥有的所有可用于直播视频流的总数 |
»coexist_video_number_max | 可同时进行直播的最大视频流总数 | int | {} | |
»device_list | 子设备列表 | array | {} | |
»»[array_item] | Elements in array | struct | {} | {"size": "2"} |
»»»sn | 设备序列号 | text | {"length":"10240"} | |
»»»available_video_number | 可用于直播的视频流总数 | int | {} | 表明无人机或设备所拥有的所有可用于直播视频流的总数 |
»»»coexist_video_number_max | 可同时进行直播的最大视频流总数 | int | {} | |
»»»camera_list | 该设备上的相机列表 | array | {"item":{"type":"struct","specs":[{"identifier":"camera_index","name":"相机索引,由类型枚举值和云台位置编号组成","dataType":{"type":"text","specs":{"length":"24"}}},{"identifier":"available_video_number","name":"可用于直播的视频流总数","desc":"表明该相机可用于直播视频流的总数","dataType":{"type":"int","specs":{}}},{"identifier":"coexist_video_number_max","name":"该相机可同时进行直播的最大视频流总数","dataType":{"type":"int","specs":{}}},{"identifier":"video_list","name":"视频流列表","dataType":{"type":"array","specs":{"item":{"type":"struct","specs":[{"identifier":"video_index","name":"视频索引","dataType":{"type":"text","specs":{"length":"24"}}},{"identifier":"video_type","name":"视频类型","desc":"表明视频镜头的类型,如normal/wide/zoom/ir等","dataType":{"type":"text","specs":{"length":"24"}}},{"identifier":"switchable_video_types","name":"该视频流支持切换的视频镜头类型列表:normal/wide/zoom/ir","dataType":{"type":"array","specs":{"type":"text","length":"24"}}}]}}}}]}} |
Example:
{
"bid": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxx",
"tid": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxx",
"data": {
"live_capacity": {
"available_video_number": 3,
"coexist_video_number_max": 2,
"device_list": [
{
"sn": "4BKBJ4R1010TGD",
"available_video_number": 1,
"coexist_video_number_max": 1,
"camera_list": [
{
"camera_index": "165-0-7",
"available_video_number": 1,
"coexist_video_number_max": 1,
"video_list": [
{
"video_index": "normal-0",
"video_type": "normal",
"switchable_video_types": [
"normal"
]
}
]
}
]
},
{
"sn": "1581F4BND22180040075",
"available_video_number": 2,
"coexist_video_number_max": 2,
"camera_list": [
{
"camera_index": "39-0-7",
"available_video_number": 1,
"coexist_video_number_max": 1,
"video_list": [
{
"video_index": "normal-0",
"video_type": "normal",
"switchable_video_types": [
"normal"
]
}
]
},
{
"camera_index": "52-0-0",
"available_video_number": 1,
"coexist_video_number_max": 1,
"video_list": [
{
"video_index": "normal-0",
"video_type": "wide",
"switchable_video_types": [
"wide",
"zoom",
"ir"
]
}
]
}
]
}
]
}
},
"timestamp:": 1654070968655,
"gateway": "4BKBJ4R1010TGD"
}
Service
开始直播
Topic: thing/product/{gateway_sn}/services
Direction: down
Method: live_start_push
Data:
Column | Name | Type | constraint | Description |
---|---|---|---|---|
url_type | 直播协议类型 | enum | {"1":"RTMP","2":"RTSP","3":"GB28181"\,"101", "4G_RTMP"} | |
url | 直播参数 | text | {} | RTMP: (rtmp://xxxxxxx)示例:rtmp://192.168.1.1:8080/live |
video_id | 直播视频流的ID编号 | text | {} | 格式为 #{uav_sn}/#{camera_id}/#{video_index};无人机SN号/负载及挂载位置枚举值/负载lens编号 比如机巢推流ID"1748FEV3HMA923171787/nest-camera-out/normal", 无人机推流ID "1748FEV3HMA923171787/drone-camera-0/normal" |
video_quality | 直播质量 | enum | {"2":"标清","3":"高清} | 不同清晰度的分辨率为,标清:1280 * 720,超清:1920 * 1080 |
video_type | 直播镜头 | text | {"normal","zoom","ir"} | 不同的镜头类型,比如普通/变焦/红外 |
Example:
{
"timestamp": 1711022516332,
"data": {
"url": "rtmp://test-mediacenter.autelrobotics.cn:1936/live/1748FEV3HMA923171787/drone-camera-0/normal",
"url_type": 1,
"video_id": "1748FEV3HMA923171787/drone-camera-0/normal",
"video_quality": 1,
"video_type": "zoom"
},
"method": "live_start_push",
"tid": "b92a6aa1-96eb-4b4a-848f-c0f63f206d3b",
"bid": "74008969-0d46-4f69-9a03-78423824fe24",
"gateway": "TH7923221094"
}
Topic: thing/product/{gateway_sn}/services_reply
Direction: up
Method: live_start_push
Data:
Example:
\{
"bid": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxx",
"tid": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxx",
"timestamp:": 1654070968655,
"method": "live_start_push",
"data": \{
"result": 0
\}
\}
停止直播
Topic: thing/product/{gateway_sn}/services
Direction: down
Method: live_stop_push
Data:
Column | Name | Type | constraint | Description |
---|---|---|---|---|
video_id | 直播视频流的ID编号 | text | {} | 格式为 #{uav_sn}/#{camera_id}/#{video_index};无人机SN号/负载及挂载位置枚举值/负载lens编号 比如机巢推流ID"1748FEV3HMA923171787/nest-camera-out/normal", 无人机推流ID "1748FEV3HMA923171787/drone-camera-0/normal" |
Example:
{
"bid": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxx",
"tid": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxx",
"timestamp:": 1654070968655,
"method": "live_stop_push",
"data": {
"video_id": "1748FEV3HMA923171787/drone-camera-0/normal"
}
}
Topic: thing/product/{gateway_sn}/services_reply
Direction: up
Method: live_stop_push
Data: null
Example:
\{
"bid": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxx",
"tid": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxx",
"timestamp:": 1654070968655,
"method": "live_stop_push",
"data": \{
"result": 0
\}
\}
设置直播清晰度
Topic: thing/product/{gateway_sn}/services
Direction: down
Method: live_set_quality
Data:
Column | Name | Type | constraint | Description |
---|---|---|---|---|
video_id | 直播视频流的ID | text | {} | 格式为 #{uav_sn}/#{camera_id}/#{video_index};无人机SN号/负载及挂载位置枚举值/负载lens编号 |
video_quality | 直播质量 | enum | {"2":"标清","3":"高清} | 不同清晰度的分辨率为,标清:1280 * 720,超清:1920 * 1080 |
Example:
\{
"bid": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxx",
"tid": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxx",
"timestamp:": 1654070968655,
"method": "live_set_quality",
"data": \{
"video_id": "1ZNDH1D0010098/39-0-7/normal-0",
"video_quality": 4
\}
\}
Topic: thing/product/{gateway_sn}/services_reply
Direction: up
Method: live_set_quality
Data: null
Example:
\{
"bid": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxx",
"tid": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxx",
"timestamp:": 1654070968655,
"method": "live_set_quality",
"data": \{
"result": 0
\}
\}
设置直播镜头
Topic: thing/product/{gateway_sn}/services
Direction: down
Method: live_lens_change
Data:
Column | Name | Type | constraint | Description |
---|---|---|---|---|
video_id | 直播视频流的ID | text | {} | 格式为 #{uav_sn}/#{camera_id}/#{video_index};无人机SN号/负载及挂载位置枚举值/负载lens编号 |
video_type | 直播视频流镜头类型 | enum | {"normal":"默认","wide":"广角","zoom":"变焦","ir":"红外"} |
Example:
\{
"bid": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxx",
"tid": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxx",
"timestamp:": 1654070968655,
"method": "live_lens_change",
"data": \{
"video_id": "1581F5BMD228Q00A82XX/39-0-7/zoom-0",
"video_type": "zoom"
\}
\}
Topic: thing/product/{gateway_sn}/services_reply
Direction: up
Method: live_lens_change
Data: null
Example:
\{
"bid": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxx",
"tid": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxx",
"timestamp:": 1654070968655,
"method": "live_lens_change",
"data": \{
"result": 0
\}
\}