Start Live Streaming

No Rating

Live Start Push

The server sends the command method=live_start_push to the device via mqtt, which uses the service method of the thing model to interact.


Communication method: MQTT

API interface:

PUB Topic: thing/product/#{remote control/airport SN}/services
SUB Topic: thing/product/#{remote control/airport SN}/services_reply
  • Parameter Description:
  • #{pid}:Refers to the product ID of the gateway device, which is usually expressed by the SN number of the device, and is different for each device. So you need to use a wildcard when the server side subscribes to topic.

Example of parameters for Services

    "tid": "1af9204671b24e4fb016e6506380a4e0",
    "bid": "88bcbac59d71447b863c6dac70d30563",
    "method": "live_start_push",
    "data": {
        "url_type": 0,
        "url": "channel=1ZNDH1D0010098_39-0-7\u0026sn=1ZNDH1D0010098\u0026token=006dca67721582a48768ec4d817b7b25a86IADk%2Fcm%2Fdv%2BHY6qT%2FAKM6y7TcUe4lXNvZpycH7vUMAlM6pFALUKF2zyCIgA82pQE8cCoYAQAAQDxwKhgAgDxwKhgAwDxwKhgBADxwKhg\u0026uid=50000",
        "video_id": "1ZNDH1D0010098/39-0-7/normal-0",
        "video_quality": 0

Parameter Description:

  • url_type: Live streaming protocol type. Enumeration

    • 0: Agora
    • 1: RTMP
    • 2: RTSP
    • 3: GB28181
  • url: Live streaming parameters. String

    RTMP: (rtmp://xxxxxxx)

    ​ Example: rtmp://


    ​ Example: userName=dji-cloud-api&password=123456&port=8080


    ​ Example: serverIP=


    Example: channel=1ZNDH360010162_39-0-7&sn=1ZNDH360010162&token=006dca67721582a48768ec4d817b7b25a86IAB4cw2JgN6iX8BpTPdc3e4S1Iendz94IFJ56aSXKvzAJei27MqF2zyCIgCLIIoBt41+YAQAAQC3jX5gAgC3jX5gAwC3jX5gBAC3jX5g&uid=50000

    Note: The token generated by Agora may have special characters such as "+" and " ", you need to encode it, otherwise the DJI Pilot 2 will have a parsing error.

  • video_id: ID number of the live video stream. String

    video_id has a format requirement, the specific combination format is aircraft SN / payload and enumeration values for mount locations / payload lens number.

    ​ Example: 1ZNDH1D0010098/0-39-7/normal-0

  • video_quality: Live quality.

    • 0: Auto
    • 1: Smooth
    • 2: Standard Definition
    • 3: High Definition
    • 4: Ultra HD

Different types of field requirements

video_qualityRequired when setting the quality.Required when setting the quality.Required when setting the quality.Required when setting the quality.


For the message response, the server needs to keep the tid and bid consistent. The client uses these two fields to determine which message the server responds to.


        // The following is the ack for rtsp, which needs to return the live url back.
        "info": "rtsp://${username}:${password}@"
  • Parameter Description:

    • result: Error code, see the chapter Error Code for specific meaning.
    • info: For the case that you need to bring parameters when replying, you can add them in output. For example, RTSP needs to return the live url of the device.


1. The RTSP is special, and the device's live streaming address needs to be added to the response message for the server to pull the stream.