All Products
Search
Document Center

ApsaraVideo Live:DescribeCasterLayouts

更新時間:Jun 05, 2024

Queries a specific layout or all layouts of a production studio.

Usage notes

You can call this operation to query the layout of a production studio. If no specific layout ID is specified, the operation returns all layouts 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 DescribeCasterLayouts

The operation that you want to perform. Set this value to DescribeCasterLayouts.

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 ID/Name column.
LayoutId String No 72d2ec7a-4cd7-4a01-974b-7cd53947****

The ID of the layout.

If you do not specify a layout ID, the operation returns all layouts of the production studio.

Response parameters

Parameter

Type

Example

Description

Layouts Array of Layout

The layouts.

Layout
AudioLayers Array of AudioLayer

The configurations of the audio layer.

AudioLayer
FixedDelayDuration Integer 20

The fixed delay of the audio layer N. This parameter is used to synchronize the audio with subtitles.

Unit: milliseconds. Default value: 0. Valid values: 0 to 5000.

ValidChannel String all

The sound channels that are used for volume input in the audio layer. Valid values:

  • leftChannel: the left channel
  • rightChannel: the right channel
  • all (default): both the left and right channels
VolumeRate Float 1

The normalized value of heights for the elements in the audio layer. The widths of the elements are scaled based on this parameter.

Note The default value is 0, which indicates that the elements in the component layer are not scaled.
BlendList Array of String "RV01", "RV02"

The location ID of the video layer in the production studio. The video layers specified by this parameter are in the same order as those specified by the VideoLayers parameter.

LayoutId String 72d2ec7a-4cd7-4a01-974b-7cd53947****

The ID of the layout.

MixList Array of String RV01

The location ID of the audio layer in the production studio. The audio layers specified by this parameter are in the same order as those specified by the AudioLayers parameter.

VideoLayers Array of VideoLayer

The configurations of the video layer that are arranged by the default array sequence.

VideoLayer
FillMode String fit

The scaling mode of the video layer. Valid values:

  • none(default): The image is not scaled to fill in the specified layout section. The video layer is set based on the image size of the video resource.
  • fit: The image is scaled with the original aspect ratio to fill in the specified layout section. The image is scaled with the original aspect ratio to fill in the specified layout section. The video layer is set based on the section size. The image is centered in the section with the long side of the image equaling that of the section. If the aspect ratio of the image is inconsistent with that of the section, the short side of the image may be shorter than that of the section. The area outside the image displays the next video layer or the background if no next video layer exists. By default, the background color is black.
FixedDelayDuration Integer 20

The fixed delay of the video layer. This parameter is used to synchronize the video with subtitles.

Unit: milliseconds. Default value: 0. Valid values: 0 to 5000.

HeightNormalized Float 0.5

The normalized value of the height of the video layer image.

  • If the FillMode parameter of the video layer is set to none, the width of the video image is scaled based on this parameter. The default value is 0, which indicates that the video image is displayed in the original size.
  • If the FillMode parameter of the video layer is set to fit, the value of the parameter is greater than 0.
PositionNormalizeds Array of Float [0,3]

The normalized value of the [x,y] coordinates of the video layer in the production studio. The default coordinates are [0,0].

Note The coordinates indicate the location of the video layer in the production studio. The value of the parameter is normalized.
PositionRefer String topLeft

The reference coordinates of the video layer. Valid values:

  • topLeft (default): the upper-left corner
  • topRight: the upper-right corner
  • bottomLeft: the lower-left corner
  • bottomRight: the lower-right corner
  • center: the center position
  • topCenter: the upper center position
  • bottomCenter: the lower center position
  • leftCenter: the left center position
  • rightCenter: the right center position
WidthNormalized Float 0.5

The normalized value of the width of the video layer image.

  • If the FillMode parameter of the video layer is set to none, the height of the video image is scaled based on this parameter. The default value is 0, which indicates that the video image is displayed in the original size.
  • If the FillMode parameter of the video layer is set to fit, the value of the parameter is greater than 0.
RequestId String 3be7ade8-d907-483c-b24a-0dad4595beaf

The request ID.

Total Integer 3

The total number of entries returned.

Examples

Sample requests

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

Sample success responses

XML format

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

<DescribeCasterLayoutsResponse>
<RequestId>3be7ade8-d907-483c-b24a-0dad4595beaf</RequestId>
<Layouts>
    <Layout>
        <LayoutId>72d2ec7a-4cd7-4a01-974b-7cd53947****</LayoutId>
        <AudioLayers>
            <AudioLayer>
                <ValidChannel>all</ValidChannel>
                <VolumeRate>1</VolumeRate>
                <FixedDelayDuration>20</FixedDelayDuration>
            </AudioLayer>
        </AudioLayers>
        <VideoLayers>
            <VideoLayer>
                <FillMode>fit</FillMode>
                <HeightNormalized>0.5</HeightNormalized>
                <PositionRefer>topLeft</PositionRefer>
                <FixedDelayDuration>20</FixedDelayDuration>
                <WidthNormalized>0.5</WidthNormalized>
                <PositionNormalizeds>
                    <Position>[0,3]</Position>
                </PositionNormalizeds>
            </VideoLayer>
        </VideoLayers>
        <BlendList>
            <LocationId>"RV01",  "RV02"</LocationId>
        </BlendList>
        <MixList>
            <LocationId>RV01</LocationId>
        </MixList>
    </Layout>
</Layouts>
<Total>3</Total>
</DescribeCasterLayoutsResponse>

JSON format

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

{
  "RequestId" : "3be7ade8-d907-483c-b24a-0dad4595beaf",
  "Layouts" : {
    "Layout" : [ {
      "LayoutId" : "72d2ec7a-4cd7-4a01-974b-7cd53947****",
      "AudioLayers" : {
        "AudioLayer" : [ {
          "ValidChannel" : "all",
          "VolumeRate" : "1",
          "FixedDelayDuration" : "20"
        } ]
      },
      "VideoLayers" : {
        "VideoLayer" : [ {
          "FillMode" : "fit",
          "HeightNormalized" : "0.5",
          "PositionRefer" : "topLeft",
          "FixedDelayDuration" : "20",
          "WidthNormalized" : "0.5",
          "PositionNormalizeds" : {
            "Position" : "[0,3]"
          }
        } ]
      },
      "BlendList" : {
        "LocationId" : "\"RV01\",  \"RV02\""
      },
      "MixList" : {
        "LocationId" : "RV01"
      }
    } ]
  },
  "Total" : "3"
}

Error codes

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