All Products
Search
Document Center

:DescribeCasterConfig

Last Updated:Dec 15, 2023

Queries the configurations 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 configurations of the production studio.

QPS limit

You can call this operation up to 15 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 DescribeCasterConfig

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

CasterId String Yes LIVEPRODUCER_POST-cn-0pp1czt****

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

Delay Float 0

Indicates whether stream delay is enabled. Unit: seconds. Valid values:

  • 0: Stream delay is disabled.
  • A value greater than 0: Stream delay is enabled.
UrgentLiveStreamUrl String rtmp://demo.aliyundoc.com

The URL of the standby live stream.

UrgentMaterialId String 98646538-bcf9-4aef-bd4a-e6bb76588****

The ID of the standby video from the media library.

UrgentImageId String a089175eb5f4427684fc0715159a****

The ID of the standby image from the media library.

UrgentImageUrl String http://learn.aliyundoc.com/AppName/image.jpg

The URL of the standby image.

CallbackUrl String http://learn.aliyundoc.com/callBackLive

The callback URL.

ProgramName String program_name

The name of the playlist for carousel playback.

CasterName String coco-caster10

The name of the production studio.

CasterId String LIVEPRODUCER_POST-cn-0pp1czt****

The ID of the production studio.

ProgramEffect Integer 0

Indicates whether the carousel playback feature is enabled. Valid values:

  • 0: The carousel playback feature is disabled.
  • 1: The carousel playback feature is enabled.
ChannelEnable Integer 1

Indicates whether channels are enabled for the production studio. Valid values:

  • 0: Channels are disabled.
  • 1: Channels are enabled.
DomainName String example.com

The main streaming domain.

RequestId String 97df6b7f-3490-47d2-ac50-8833e1b64597

The request ID.

SideOutputUrlList String ["rtmp://domain/app1/stream1","rtmp://domain/app2/stream2"]

The list of custom stream redirect URLs.

SideOutputUrl String rtmp://sophon-developer.aliyundoc.com/caster/4a82a3d1b7f0462ea37348366201****?auth_key=1608953344-0-0-ac8c628078541d7055a170ec59a5****

The custom stream redirect URL.

AutoSwitchUrgentOn String true

Indicates whether the production studio automatically switches to the standby resource in case of a stream interruption.

  • true
  • false
AutoSwitchUrgentConfig String {"eofThres":3}

The configuration for automatic switchover to the standby resource. The eofThres field indicates the duration after which the production studio automatically switches to the standby resource if a stream interruption occurs. Unit: seconds.

TranscodeConfig Object

The transcoding configuration.

CasterTemplate String lp_hd

The transcoding template of the production studio. Valid values:

  • lp_ld: low definition
  • lp_sd: standard definition
  • lp_hd: high definition
  • lp_ud: ultra high definition
  • lp_ld_v: low definition (portrait mode)
  • lp_sd_v: standard definition (portrait mode)
  • lp_hd_v: high definition (portrait mode)
  • lp_ud_v: ultra high definition (portrait mode)
LiveTemplateIds Array of String lld

The transcoding setting for live streams. Valid values:

  • lsd: standard definition
  • lld: low definition
  • lud: ultra high definition
  • lhd: high-definition adaptive transcoding
  • daobo-lsd: standard definition
  • daobo-lld: low definition
  • daobo-lud: ultra high definition
  • daobo-lhd: high definition
RecordConfig Object

The recording configuration. If this parameter is empty, the recording feature is disabled.

OssEndpoint String oss-cn-shanghai.aliyundoc.com

The Object Storage Service (OSS) endpoint.

OssBucket String liveBucket****

The OSS bucket for storage.

OnDemand Integer 0

Indicates how on-demand recording is configured. Valid values:

  • 0: On-demand recording is disabled.
  • 1: On-demand recording is enabled by using the HTTP callback method.
  • 2: On-demand recording is enabled by parsing the stream ingest parameters.
  • 7: The recording feature is disabled.
RecordFormat Array of RecordFormat

The recording configuration.

RecordFormat
CycleDuration Integer 3600

The recording length.

SliceOssObjectPrefix String record/{liveApp****}/{liveStream****}/{UnixTimestamp****}

The name of the segment.

OssObjectPrefix String record/{liveApp****}/{liveStream****}

The name of the recording.

Format String M3U8

The recording format.

SyncGroupsConfig Array of SyncGroup

The storage configuration.

SyncGroup
HostResourceId String 28768383240243****

The ID of the resource in the production studio.

Mode Integer 0

The cache mode of the Static Page Caching policy. Valid values:

  • 0: standard mode
  • 1: force mode
  • 2: no cache
ResourceIds Array of String 1

The IDs of the resources for which you want to modify the resource group. The number of resource IDs is 1 to 50.

Examples

Sample requests

http(s)://live.aliyuncs.com/?Action=DescribeCasterConfig
&CasterId=LIVEPRODUCER_POST-cn-0pp1czt****
&<Common request parameters>

Sample success responses

XML format

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

<DescribeCasterConfigResponse>
    <Delay>0</Delay>
    <UrgentLiveStreamUrl>rtmp://demo.aliyundoc.com</UrgentLiveStreamUrl>
    <UrgentMaterialId>98646538-bcf9-4aef-bd4a-e6bb76588****</UrgentMaterialId>
    <UrgentImageId>a089175eb5f4427684fc0715159a****</UrgentImageId>
    <UrgentImageUrl>http://learn.aliyundoc.com/AppName/image.jpg</UrgentImageUrl>
    <CallbackUrl>http://learn.aliyundoc.com/callBackLive</CallbackUrl>
    <ProgramName>program_name</ProgramName>
    <CasterName>coco-caster10</CasterName>
    <CasterId>LIVEPRODUCER_POST-cn-0pp1czt****</CasterId>
    <ProgramEffect>0</ProgramEffect>
    <ChannelEnable>1</ChannelEnable>
    <DomainName>example.com</DomainName>
    <RequestId>97df6b7f-3490-47d2-ac50-8833e1b64597</RequestId>
    <SideOutputUrlList>["rtmp://domain/app1/stream1","rtmp://domain/app2/stream2"]</SideOutputUrlList>
    <SideOutputUrl>rtmp://sophon-developer.aliyundoc.com/caster/4a82a3d1b7f0462ea37348366201****?auth_key=1608953344-0-0-ac8c628078541d7055a170ec59a5****</SideOutputUrl>
    <AutoSwitchUrgentOn>true</AutoSwitchUrgentOn>
    <AutoSwitchUrgentConfig>{"eofThres":3}</AutoSwitchUrgentConfig>
    <TranscodeConfig>
        <CasterTemplate>lp_hd</CasterTemplate>
        <LiveTemplateIds>lld</LiveTemplateIds>
    </TranscodeConfig>
    <RecordConfig>
        <OssEndpoint>oss-cn-shanghai.aliyundoc.com</OssEndpoint>
        <OssBucket>liveBucket****</OssBucket>
        <OnDemand>0</OnDemand>
        <RecordFormat>
            <CycleDuration>3600</CycleDuration>
            <SliceOssObjectPrefix>record/{liveApp****}/{liveStream****}/{UnixTimestamp****}</SliceOssObjectPrefix>
            <OssObjectPrefix>record/{liveApp****}/{liveStream****}</OssObjectPrefix>
            <Format>M3U8</Format>
        </RecordFormat>
    </RecordConfig>
    <SyncGroupsConfig>
        <HostResourceId>28768383240243****</HostResourceId>
        <Mode>0</Mode>
        <ResourceIds>1</ResourceIds>
    </SyncGroupsConfig>
</DescribeCasterConfigResponse>

JSON format

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

{
  "Delay" : 0,
  "UrgentLiveStreamUrl" : "rtmp://demo.aliyundoc.com",
  "UrgentMaterialId" : "98646538-bcf9-4aef-bd4a-e6bb76588****",
  "UrgentImageId" : "a089175eb5f4427684fc0715159a****",
  "UrgentImageUrl" : "http://learn.aliyundoc.com/AppName/image.jpg",
  "CallbackUrl" : "http://learn.aliyundoc.com/callBackLive",
  "ProgramName" : "program_name",
  "CasterName" : "coco-caster10",
  "CasterId" : "LIVEPRODUCER_POST-cn-0pp1czt****",
  "ProgramEffect" : 0,
  "ChannelEnable" : 1,
  "DomainName" : "example.com",
  "RequestId" : "97df6b7f-3490-47d2-ac50-8833e1b64597",
  "SideOutputUrlList" : "[\"rtmp://domain/app1/stream1\",\"rtmp://domain/app2/stream2\"]",
  "SideOutputUrl" : "rtmp://sophon-developer.aliyundoc.com/caster/4a82a3d1b7f0462ea37348366201****?auth_key=1608953344-0-0-ac8c628078541d7055a170ec59a5****",
  "AutoSwitchUrgentOn" : true,
  "AutoSwitchUrgentConfig" : "{\"eofThres\":3}",
  "TranscodeConfig" : {
    "CasterTemplate" : "lp_hd",
    "LiveTemplateIds" : "lld"
  },
  "RecordConfig" : {
    "OssEndpoint" : "oss-cn-shanghai.aliyundoc.com",
    "OssBucket" : "liveBucket****",
    "OnDemand" : 0,
    "RecordFormat" : {
      "CycleDuration" : 3600,
      "SliceOssObjectPrefix" : "record/{liveApp****}/{liveStream****}/{UnixTimestamp****}",
      "OssObjectPrefix" : "record/{liveApp****}/{liveStream****}",
      "Format" : "M3U8"
    }
  },
  "SyncGroupsConfig" : {
    "HostResourceId" : "28768383240243****",
    "Mode" : 0,
    "ResourceIds" : 1
  }
}

Error codes

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