跳到主要内容

Live Streaming Functionality

State​

Live Streaming Capability Update​

Topic: thing/product/{device_sn}/state

Direction: up

Data:

ColumnNameTypeconstraintDescription
live_capacityLive streaming capabilitystruct
»available_video_numberTotal number of video streams available for live streamingint{}Indicates the total number of all video streams available for live streaming owned by the aircraft or device
»coexist_video_number_maxMaximum total number of video streams that can be live streamed simultaneouslyint{}
»device_listSub-device listarray{}
»»[array_item]Elements in arraystruct{}{"size": "2"}
»»»snDevice serial numbertext{"length":"10240"}
»»»available_video_numberTotal number of video streams available for live streamingint{}Indicates the total number of all video streams available for live streaming owned by the aircraft or device
»»»coexist_video_number_maxMaximum total number of video streams that can be live streamed simultaneouslyint{}
»»»camera_listCamera list on this devicearray{"item":{"type":"struct","specs":[{"identifier":"camera_index","name":"Camera index, composed of type enumeration value and gimbal position number","dataType":{"type":"text","specs":{"length":"24"}}},{"identifier":"available_video_number","name":"Total number of video streams available for live streaming","desc":"Indicates the total number of video streams available for live streaming on this camera","dataType":{"type":"int","specs":{}}},{"identifier":"coexist_video_number_max","name":"Maximum total number of video streams that can be live streamed simultaneously on this camera","dataType":{"type":"int","specs":{}}},{"identifier":"video_list","name":"Video stream list","dataType":{"type":"array","specs":{"item":{"type":"struct","specs":[{"identifier":"video_index","name":"Video index","dataType":{"type":"text","specs":{"length":"24"}}},{"identifier":"video_type","name":"Video type","desc":"Indicates the type of video lens, such as normal/wide/zoom/ir etc","dataType":{"type":"text","specs":{"length":"24"}}},{"identifier":"switchable_video_types","name":"List of video lens types that this video stream supports switching: 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

Start Live Streaming​

Topic: thing/product/{gateway_sn}/services

Direction: down

Method: live_start_push

Data:

ColumnNameTypeconstraintDescription
url_typeLive streaming protocol typeenum{"1":"RTMP","2":"RTSP","3":"GB28181"\,"101", "4G_RTMP"}
urlLive streaming parameterstext{}RTMP: (rtmp://xxxxxxx) Example: rtmp://192.168.1.1:8080/live
video_idLive streaming video stream ID numbertext{}Format is #{uav_sn}/#{camera_id}/#{video_index}; Aircraft SN number/payload and mount position enumeration value/payload lens number
For example, dock streaming ID "1748FEV3HMA923171787/nest-camera-out/normal",
Aircraft streaming ID "1748FEV3HMA923171787/drone-camera-0/normal"
video_qualityLive streaming qualityenum{"2":"Standard Definition","3":"High Definition}Different resolution for different quality levels: Standard Definition: 1280 * 720, Ultra HD: 1920 * 1080
video_typeLive streaming lenstext{"normal","zoom","ir"}Different lens types, such as normal/zoom/infrared

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
}
}

Stop Live Streaming​

Topic: thing/product/{gateway_sn}/services

Direction: down

Method: live_stop_push

Data:

ColumnNameTypeconstraintDescription
video_idLive streaming video stream ID numbertext{}Format is #{uav_sn}/#{camera_id}/#{video_index}; Aircraft SN number/payload and mount position enumeration value/payload lens number
For example, dock streaming ID "1748FEV3HMA923171787/nest-camera-out/normal",
Aircraft streaming 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
}
}

Set Live Streaming Quality​

Topic: thing/product/{gateway_sn}/services

Direction: down

Method: live_set_quality

Data:

ColumnNameTypeconstraintDescription
video_idLive streaming video stream IDtext{}Format is #{uav_sn}/#{camera_id}/#{video_index}; Aircraft SN number/payload and mount position enumeration value/payload lens number
video_qualityLive streaming qualityenum{"2":"Standard Definition","3":"High Definition}Different resolution for different quality levels: Standard Definition: 1280 * 720, Ultra HD: 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
}
}

Set Live Streaming Lens​

Topic: thing/product/{gateway_sn}/services

Direction: down

Method: live_lens_change

Data:

ColumnNameTypeconstraintDescription
video_idLive streaming video stream IDtext{}Format is #{uav_sn}/#{camera_id}/#{video_index}; Aircraft SN number/payload and mount position enumeration value/payload lens number
video_typeLive streaming video stream lens typeenum{"normal":"Default","wide":"Wide Angle","zoom":"Zoom","ir":"Infrared"}

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
}
}

Requests

Get Streaming Parameters​

Topic: thing/product/{gateway_sn}/requests

Direction: up

Method: live_config_get

Data:

ColumnNameTypeconstraintDescription
snAircrafttext

Example:

{
"bid": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxx",
"data": {
"sn": "1748xxxxxxxxxx"
},
"tid": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxx",
"timestamp": 1709192149431,
"method": "live_config_get"
}

Topic: thing/product/{gateway_sn}/requests_reply

Direction: down

Method: live_config_get

Data:

ColumnNameTypeconstraintDescription
outputarray
»url_typeLive streaming protocol typeenum{"1":"RTMP","2":"RTSP","3":"GB28181"\,"101", "4G_RTMP"}
»urlLive streaming parameterstext{}RTMP: (rtmp://xxxxxxx) Example: rtmp://192.168.1.1:8080/live
»video_idLive streaming video stream ID numbertext{}Format is #{uav_sn}/#{camera_id}/#{video_index}; Aircraft SN number/payload and mount position enumeration value/payload lens number
For example, dock streaming ID "1748FEV3HMA923171787/nest-camera-out/normal",
Aircraft streaming ID "1748FEV3HMA923171787/drone-camera-0/normal"
»video_qualityLive streaming qualityenum{"2":"Standard Definition","3":"High Definition}Different resolution for different quality levels: Standard Definition: 1280 * 720, Ultra HD: 1920 * 1080
»video_typeLive streaming lenstext{"normal","zoom","ir"}Different lens types, such as normal/zoom/infrared

Example:

{
"timestamp": 1711022516332,
"data": {
"output": [
{
"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"
},
{
"url": "rtmp://test-mediacenter.autelrobotics.cn:1936/live/1748FEV3HMA923171787/drone-camera-0/ir",
"url_type": 1,
"video_id": "1748FEV3HMA923171787/drone-camera-0/ir",
"video_quality": 1,
"video_type": "ir"
}
],
"result": 0
},
"method": "live_config_get",
"tid": "b92a6aa1-96eb-4b4a-848f-c0f63f206d3b",
"bid": "74008969-0d46-4f69-9a03-78423824fe24",
"gateway": "TH7923221094"
}