All Products
Search
Document Center

ApsaraVideo Live:DescribeCasterStreamUrl

Last Updated:Apr 26, 2024

Queries the streaming URLs of a production studio.

Usage notes

You can call the CreateCaster operation to create a production studio and then call this operation to query the streaming URLs of the production studio.

QPS limit

You can call this operation up to 5 times per second per account. Requests that exceed this limit are dropped and you will experience service interruptions. We recommend that you take note of this limit when you call this operation. For more information, see QPS limits.

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer. OpenAPI Explorer dynamically generates the sample code of the operation for different SDKs.

Request parameters

Parameter

Type

Required

Example

Description

Action String Yes DescribeCasterStreamUrl

The operation that you want to perform. Set the value to DescribeCasterStreamUrl.

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

The ID of the production studio.

  • If the production studio was created by calling the CreateCaster operation, check the value of the response parameter CasterId to obtain the ID.
  • If the production studio was created by using the ApsaraVideo Live console, obtain the ID on the Production Studio Management page. To go to the page, log on to the ApsaraVideo Live console and click Production Studios in the left-side navigation pane.
Note You can find the ID of the production studio in the Instance Name column.

Response parameters

Parameter

Type

Example

Description

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

The ID of the production studio.

CasterStreams Array of CasterStream

The information about the streams in the production studio.

CasterStream
OutputType Integer 1

Indicates whether the output video is in preview mode or program mode.

  • 0: preview mode
  • 1: program mode
RtmpUrl String rtmp://live/caster/example.edu

The ingest URL in the Real-Time Messaging Protocol (RTMP) format.

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

The ID of the scene.

StreamInfos Array of StreamInfo

The information about the stream.

StreamInfo
OutputStreamUrl String http://out/caster/example.net

The streaming URL.

TranscodeConfig String lld

The transcoding configuration. Valid values:

  • lsd: standard definition
  • lld: low definition
  • lud: ultra-high definition
  • lhd: high definition
VideoFormat String flv

The format. Valid values:

  • flv
  • rtmp
  • m3u8
  • artc
Note The URL in the Alibaba Real-Time Communication (ARTC) format can be returned only if Real-Time Streaming (RTS) is enabled for the streaming domain of the production studio. For more information, see Enable RTS.
StreamUrl String http://live/caster/example.org

The URL of the output stream.

RequestId String 16A96B9A-F203-4EC5-8E43-CB92E68F4CD8

The request ID.

Total Integer 1

The number of the streams.

Examples

Sample requests

http(s)://[Endpoint]/?Action=DescribeCasterStreamUrl
&CasterId=a2b8e671-2fe5-4642-a2ec-bf93880e****
&<Common request parameters>

Sample success responses

XML format

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

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

JSON format

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

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

Error codes

For a list of error codes, see Service error codes.