Queries the video resources of a production studio.

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 DescribeCasterVideoResources

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

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

The ID of the production studio.

RegionId String No cn-shanghai

The ID of the region.

Response parameters

Parameter Type Example Description
RequestId String CF60DB6A-7FD6-426E-9288-122CC1A52FA7

The ID of the request.

VideoResources Array of VideoResource

The video resources.

VideoResource
ResourceId String b5f8c837-ceeb-424f-b30b-68e94e86****

The ID of the video resource.

ResourceName String resource-Name1

The name of the video resource.

LocationId String RV01

The location of the video resource.

LiveStreamUrl String rtmp://abcLive/appName/b5447c21fcfe444c9e9b6f7ba208f141

The URL of the live stream.

MaterialId String d2c429cd907742ee8f6e76465ad3****

The ID of the material.

RepeatNum Integer 0

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

  • 0: indicates that the video is played only once. This is the default value.
  • -1: indicates that the video is played in loop mode.
BeginOffset Integer 1000

The offset of the start position where the video resource is read. This parameter is returned only when the video resource is a file. Unit: milliseconds.

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

EndOffset Integer 10000

The offset of the end position where the video resource is read. This parameter is returned only when the video resource is a 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.
PtsCallbackInterval Integer 0

The interval between presentation timestamp (PTS) callbacks. If you set the value to 0, the PTS callback is disabled. This parameter is returned only when the video resource is a video-on-demand (VOD) file.

VodUrl String http://sophon-test.aliyunlive.com/caster1.flv

The URL of the VOD file.

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

Total Integer 2

The total number of returned entries.

Examples

Sample requests

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

Sample success responses

XML format

<DescribeCasterVideoResourcesResponse>
  <RequestId>CF60DB6A-7FD6-426E-9288-122CC1A52FA7</RequestId>
  <VideoResources>
        <ResourceId>b5f8c837-ceeb-424f-b30b-68e94e86****</ResourceId>
        <ResourceName>resource-Name1</ResourceName>
        <LocationId>RV01</LocationId>
        <LiveStreamUrl>rtmp://abcLive/appName/b5447c21fcfe444c9e9b6f7ba208****</LiveStreamUrl>
  </VideoResources>
  <VideoResources>
        <ResourceId>b5f8c837-ceeb-424f-b30b-68e94e86****</ResourceId>
        <MaterialId>d2c429cd907742ee8f6e76465ad3****</MaterialId>
        <ResourceName>resource-Name3</ResourceName>
        <LocationId>RV02</LocationId>
        <BeginOffset>1000</BeginOffset>
        <EndOffset>10000</EndOffset>
        <PtsCallbackInterval>0</PtsCallbackInterval>
        <RepeatNum>2</RepeatNum>
  </VideoResources>
</DescribeCasterVideoResourcesResponse>

JSON format

{
    "RequestId": "CF60DB6A-7FD6-426E-9288-122CC1A52FA7",
    "VideoResources": [
        {
            "ResourceId": "b5f8c837-ceeb-424f-b30b-68e94e86****",
            "ResourceName": "resource-Name1",
            "LocationId": "RV01",
            "LiveStreamUrl": "rtmp://abcLive/appName/b5447c21fcfe444c9e9b6f7ba208****"
        },
        {
            "ResourceId": "b5f8c837-ceeb-424f-b30b-68e94e86****",
            "MaterialId": "d2c429cd907742ee8f6e76465ad3****",
            "ResourceName": "resource-Name3",
            "LocationId": "RV02",
            "BeginOffset":1000,
            "EndOffset":10000,
            "PtsCallbackInterval":0,
            "RepeatNum": 2
        }
    ]
}

Error codes

For a list of error codes, visit the API Error Center.