文档中心 > API类目 > 天眼工作室API

alibaba.security.deepvision.camera.live.start (开启摄像头视频直播)

开启摄像头视频直播

公共参数

请求参数

名称 类型 是否必须 示例值 更多限制 描述
mode Number 可选 0
  • 默认值:0
  • 0 主码流 1 子码流 必填
    need_audio Boolean 可选 true
  • 默认值:true
  • 是否需要声音
    camera_id String 必须 cam-8084-29-19-141-117 摄像头ID
    api_sign String 可选 '' ''
    tenant_code String 必须 Hema 租户
    field_id String 必须 8084 门店
    token String 可选 eSR5rBpYz1ttfFxY token

    响应参数

    名称 类型 示例值 描述
    result Result '' 接口返回model
    • result
    • StartLiveResp
    • ''
    • 接口返回model
    • rts_pull_stream_urls
    • Datas []
    • ''
    • rts拉流地址
    • └ type
    • String
    • artc
    • rts拉流类型
    • └ url
    • String
    • artc://rts.pull.deepvision-live.visionin3w.top/Hema_8084_LIVE/cam-8084-29-19-141-117?auth_key=1612355455-0-0-8564282940cefbd2abe2236f5516fcd4&aliyun_uuid=8abe563b32414bb998a9c66c4b1d7ee9
    • 拉流地址
    • └ stream_id
    • String
    • 3cc4bba8c198450cafa536a5f65de68a
    • 流ID
    • push_stream_urls
    • Datas []
    • ''
    • 推流地址
    • └ type
    • String
    • rtmp
    • 拉流类型
    • └ url
    • String
    • rtmp://push.deepvision-live.visionin3w.top/Hema_8084_LIVE/cam-8084-29-19-141-117?auth_key=1612355455-0-0-f790f4abc4e134305f993fe6a7f4911b
    • 拉流地址
    • pull_stream_urls
    • Datas []
    • ''
    • 普通拉流
    • └ type
    • String
    • rtmp
    • 普通拉流类型
    • └ url
    • String
    • rtmp://pull.deepvision-live.visionin3w.top/Hema_8084_LIVE/cam-8084-29-19-141-117?auth_key=1612355455-0-0-3ce6998129b7de1ddb7007b049305b17&aliyun_uuid=8abe563b32414bb998a9c66c4b1d7ee9
    • 普通拉流地址
    • └ device_id
    • String
    • cam-8084-29-19-141-117
    • 摄像头ID
    • └ token
    • String
    • eSR5rBpYz1ttfFxY
    • token
    • └ first_frame_time
    • Number
    • 163213821
    • 163213821
    • └ width
    • Number
    • 10
    • └ height
    • Number
    • 10
    • err_code
    • ErrCode
    • ''
    • 错误
    • └ error_name
    • String
    • FAIL_BIZ_SUCCESS
    • 错误名称
    • └ error_code
    • Number
    • 1
    • 错误代码
    • └ error_msg
    • String
    • success
    • 错误信息
    • └ success
    • Boolean
    • true
    • 是否成功
    • └ message
    • String
    • ''
    • message

    请求示例

    • JAVA
    • .NET
    • PHP
    • CURL
    • Python
    • C/C++
    • NodeJS
    TaobaoClient client = new DefaultTaobaoClient(url, appkey, secret);
    AlibabaSecurityDeepvisionCameraLiveStartRequest req = new AlibabaSecurityDeepvisionCameraLiveStartRequest();
    req.setMode(0L);
    req.setNeedAudio(true);
    req.setCameraId("cam-8084-29-19-141-117");
    req.setApiSign("''");
    req.setTenantCode("Hema");
    req.setFieldId("8084");
    req.setToken("eSR5rBpYz1ttfFxY");
    AlibabaSecurityDeepvisionCameraLiveStartResponse rsp = client.execute(req);
    System.out.println(rsp.getBody());

    响应示例

    • XML示例
    • JSON示例
    <alibaba_security_deepvision_camera_live_start_response>
        <result>
            <result>
                <rts_pull_stream_urls>
                    <datas>
                        <type>artc</type>
                        <url>artc://rts.pull.deepvision-live.visionin3w.top/Hema_8084_LIVE/cam-8084-29-19-141-117?auth_key=1612355455-0-0-8564282940cefbd2abe2236f5516fcd4&amp;aliyun_uuid=8abe563b32414bb998a9c66c4b1d7ee9</url>
                    </datas>
                </rts_pull_stream_urls>
                <stream_id>3cc4bba8c198450cafa536a5f65de68a</stream_id>
                <push_stream_urls>
                    <datas>
                        <type>rtmp</type>
                        <url>rtmp://push.deepvision-live.visionin3w.top/Hema_8084_LIVE/cam-8084-29-19-141-117?auth_key=1612355455-0-0-f790f4abc4e134305f993fe6a7f4911b</url>
                    </datas>
                </push_stream_urls>
                <pull_stream_urls>
                    <datas>
                        <type>rtmp</type>
                        <url>rtmp://pull.deepvision-live.visionin3w.top/Hema_8084_LIVE/cam-8084-29-19-141-117?auth_key=1612355455-0-0-3ce6998129b7de1ddb7007b049305b17&amp;aliyun_uuid=8abe563b32414bb998a9c66c4b1d7ee9</url>
                    </datas>
                </pull_stream_urls>
                <device_id>cam-8084-29-19-141-117</device_id>
                <token>eSR5rBpYz1ttfFxY</token>
                <first_frame_time>163213821</first_frame_time>
                <width>10</width>
                <height>10</height>
            </result>
            <err_code>
                <error_name>FAIL_BIZ_SUCCESS</error_name>
                <error_code>1</error_code>
                <error_msg>success</error_msg>
            </err_code>
            <success>true</success>
            <message>&apos;&apos;</message>
        </result>
    </alibaba_security_deepvision_camera_live_start_response>

    异常示例

    • XML示例
    • JSON示例
    <error_response>
        <code>50</code>
        <msg>Remote service error</msg>
        <sub_code>isv.invalid-parameter</sub_code>
        <sub_msg>非法参数</sub_msg>
    </error_response>

    错误码解释

    错误码 错误描述 解决方案

    API工具

    如何获得此API

    FAQ

    返回
    顶部