Queries the input sources 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 input sources 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 limit on an API operation in ApsaraVideo Live.

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

ParameterTypeRequiredExampleDescription
ActionStringYesDescribeCasterVideoResources

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

CasterIdStringYesLIVEPRODUCER_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

ParameterTypeExampleDescription
TotalInteger2

The total number of entries returned.

RequestIdStringCF60DB6A-7FD6-426E-9288-122CC1A52FA7

The ID of the request.

VideoResourcesArray of VideoResource

Details about the input sources.

VideoResource
EndOffsetInteger10000

The offset of the position where the system stops reading the video file. This parameter takes effect only if the input source is a video file. Unit: milliseconds.

  • A value greater than 0 indicates an offset from the first frame.
  • A value smaller than 0 indicates an offset from the last frame.
FlvUrlStringhttp://guide.aliyundoc.com/example.org

The source URL.

BeginOffsetInteger1000

The offset of the position where the system starts to read the video file. This parameter takes effect only if the input source is a video file. Unit: milliseconds.

A value greater than 0 indicates an offset from the first frame.

PtsCallbackIntervalInteger0

The interval between presentation timestamp (PTS) callbacks. If you set the value to 0, no PTS callbacks are returned. This parameter takes effect only if the input source is a video-on-demand (VOD) file.

MaterialIdStringd2c429cd907742ee8f6e76465ad3****

The ID of the material.

LocationIdStringRV01

The location of the input source.

LiveStreamUrlStringrtmp://abcLive/appName/b5447c21fcfe444c9e9b6f7ba208****

The URL of the live stream.

VodUrlStringhttp://developer.aliyundoc.com/caster1.flv

The URL of the VOD file.

This parameter is returned only when the input source is an MP4, FLV, or TS file that is not from the media library.

ResourceIdStringb5f8c837-ceeb-424f-b30b-68e94e86****

The ID of the resource.

RepeatNumInteger0

The number of playback times after the first playback is complete. This parameter takes effect only when the input source is a video file. Valid values:

  • 0 (default): The video file is played only once.
  • -1: The video file is played in loop mode.
ResourceNameStringresource-Name1

The name of the resource.

ImageIdStringa089175eb5f4427684fc0715159a****

The ID of the image in the media library.

ImageUrlStringhttp://learn.aliyundoc.com/AppName/image.jpg

The URL of the image.

Examples

Sample requests

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

Sample success responses

XML format

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

<?xml version="1.0" encoding="UTF-8" ?>
<DescribeCasterVideoResourcesResponse>
<RequestId>CF60DB6A-7FD6-426E-9288-122CC1A52FA7</RequestId>
<Total>2</Total>
<VideoResources>
    <VideoResource>
        <EndOffset>10000</EndOffset>
        <BeginOffset>1000</BeginOffset>
        <MaterialId>d2c429cd907742ee8f6e76465ad3****</MaterialId>
        <FlvUrl>http://guide.aliyundoc.com/example.org</FlvUrl>
        <ResourceId>b5f8c837-ceeb-424f-b30b-68e94e86****</ResourceId>
        <ResourceName>resource-Name1</ResourceName>
        <LocationId>RV01</LocationId>
        <RepeatNum>0</RepeatNum>
        <LiveStreamUrl>rtmp://abcLive/appName/b5447c21fcfe444c9e9b6f7ba208****</LiveStreamUrl>
        <PtsCallbackInterval>0</PtsCallbackInterval>
        <VodUrl>http://developer.aliyundoc.com/caster1.flv</VodUrl>
    </VideoResource>
</VideoResources>
</DescribeCasterVideoResourcesResponse>

JSON format

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

{
  "DescribeCasterVideoResourcesResponse" : {
    "RequestId" : "CF60DB6A-7FD6-426E-9288-122CC1A52FA7",
    "Total" : 2,
    "VideoResources" : {
      "VideoResource" : {
        "EndOffset" : 10000,
        "BeginOffset" : 1000,
        "MaterialId" : "d2c429cd907742ee8f6e76465ad3****",
        "FlvUrl" : "http://guide.aliyundoc.com/example.org",
        "ResourceId" : "b5f8c837-ceeb-424f-b30b-68e94e86****",
        "ResourceName" : "resource-Name1",
        "LocationId" : "RV01",
        "RepeatNum" : 0,
        "LiveStreamUrl" : "rtmp://abcLive/appName/b5447c21fcfe444c9e9b6f7ba208****",
        "PtsCallbackInterval" : 0,
        "VodUrl" : "http://developer.aliyundoc.com/caster1.flv"
      }
    }
  }
}

Error codes

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