调用DescribeCasterStreamUrl查询导播台流地址。

使用说明

先通过CreateCaster接口创建导播台,再调用本接口查询导播台流地址。

QPS限制

本接口的单用户QPS限制为5次/秒。超过限制,API调用会被限流,这可能会影响您的业务,请合理调用。更多信息,请参见QPS限制

调试

您可以在OpenAPI Explorer中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer可以自动生成SDK代码示例。

请求参数

名称 类型 是否必选 示例值 描述
Action String DescribeCasterStreamUrl

系统规定参数。取值:DescribeCasterStreamUrl

CasterId String a2b8e671-2fe5-4642-a2ec-bf93880e****

导播台ID。

  • 如果您通过CreateCaster接口创建导播台,请查看CreateCaster接口调用返回的参数CasterId值。
  • 如果您通过直播控制台创建导播台,请通过直播控制台 > 导播台 > 云导播台页面查看。
说明 直播控制台云导播台页面导播台列表中的导播台名称即导播台ID。

返回数据

名称 类型 示例值 描述
RequestId String 16A96B9A-F203-4EC5-8E43-CB92E68F4CD8

请求ID。

CasterId String a2b8e671-2fe5-4642-a2ec-bf93880e****

导播台ID。

Total Integer 1

数量。

CasterStreams Array of CasterStream

导播台流信息列表。

CasterStream
RtmpUrl String rtmp://live/caster/example.edu

Rtmp地址。

SceneId String 23ca74e0-aca3-4e7a-8561-9d96f525****

场景ID。

OutputType Integer 1

是否正式输出。

  • 0:输出预览。
  • 1:输出正式。
StreamUrl String http://live/caster/example.org

输出流地址。

StreamInfos Array of StreamInfo

播放地址列表。

StreamInfo
VideoFormat String flv

格式。取值:

  • flv
  • rtmp
  • m3u8
OutputStreamUrl String http://out/caster/example.net

播放地址。

TranscodeConfig String lld

转码配置。 取值:

  • lsd:标清 。
  • lld:流畅。
  • lud:超清 。
  • lhd:高清 。

示例

请求示例

http(s)://live.aliyuncs.com/?Action=DescribeCasterStreamUrl
&CasterId=a2b8e671-2fe5-4642-a2ec-bf93880e****
&<公共请求参数>

正常返回示例

XML格式

HTTP/1.1 200 OK
Content-Type:application/xml

<?xml version="1.0" encoding="UTF-8" ?>
<DescribeCasterStreamUrlResponse>
<RequestId>16A96B9A-F203-4EC5-8E43-CB92E68F4CD8</RequestId>
<Total>1</Total>
<CasterStreams>
    <CasterStream>
        <SceneId>23ca74e0-aca3-4e7a-8561-9d96f525****</SceneId>
        <StreamUrl>http://live/caster/example.org</StreamUrl>
        <OutputType>1</OutputType>
        <RtmpUrl>rtmp://live/caster/example.edu</RtmpUrl>
        <StreamInfos>
            <StreamInfo>
                <OutputStreamUrl>http://out/caster/example.net</OutputStreamUrl>
                <VideoFormat>flv</VideoFormat>
                <TranscodeConfig>lld</TranscodeConfig>
            </StreamInfo>
        </StreamInfos>
    </CasterStream>
</CasterStreams>
<CasterId>a2b8e671-2fe5-4642-a2ec-bf93880e****</CasterId>
</DescribeCasterStreamUrlResponse>

JSON格式

HTTP/1.1 200 OK
Content-Type:application/json

{
  "DescribeCasterStreamUrlResponse" : {
    "RequestId" : "16A96B9A-F203-4EC5-8E43-CB92E68F4CD8",
    "Total" : 1,
    "CasterStreams" : {
      "CasterStream" : {
        "SceneId" : "23ca74e0-aca3-4e7a-8561-9d96f525****",
        "StreamUrl" : "http://live/caster/example.org",
        "OutputType" : 1,
        "RtmpUrl" : "rtmp://live/caster/example.edu",
        "StreamInfos" : {
          "StreamInfo" : {
            "OutputStreamUrl" : "http://out/caster/example.net",
            "VideoFormat" : "flv",
            "TranscodeConfig" : "lld"
          }
        }
      }
    },
    "CasterId" : "a2b8e671-2fe5-4642-a2ec-bf93880e****"
  }
}

错误码

访问错误中心查看更多错误码。