All Products
Search
Document Center

ApsaraVideo Live:ModifyCasterVideoResource

Last Updated:Aug 15, 2025

Modifies the video resources of a production studio.

Operation description

Before calling this operation, you must create a production studio by calling the CreateCaster operation.

QPS limit

This operation supports up to 10 queries per second (QPS) per user. If you exceed this limit, your API calls are throttled, which may affect your business. Plan your calls accordingly.

Try it now

Try this API in OpenAPI Explorer, no manual signing needed. Successful calls auto-generate SDK code matching your parameters. Download it with built-in credential security for local usage.

Test

RAM authorization

The table below describes the authorization required to call this API. You can define it in a Resource Access Management (RAM) policy. The table's columns are detailed below:

  • Action: The actions can be used in the Action element of RAM permission policy statements to grant permissions to perform the operation.

  • API: The API that you can call to perform the action.

  • Access level: The predefined level of access granted for each API. Valid values: create, list, get, update, and delete.

  • Resource type: The type of the resource that supports authorization to perform the action. It indicates if the action supports resource-level permission. The specified resource must be compatible with the action. Otherwise, the policy will be ineffective.

    • For APIs with resource-level permissions, required resource types are marked with an asterisk (*). Specify the corresponding Alibaba Cloud Resource Name (ARN) in the Resource element of the policy.

    • For APIs without resource-level permissions, it is shown as All Resources. Use an asterisk (*) in the Resource element of the policy.

  • Condition key: The condition keys defined by the service. The key allows for granular control, applying to either actions alone or actions associated with specific resources. In addition to service-specific condition keys, Alibaba Cloud provides a set of common condition keys applicable across all RAM-supported services.

  • Dependent action: The dependent actions required to run the action. To complete the action, the RAM user or the RAM role must have the permissions to perform all dependent actions.

Action

Access level

Resource type

Condition key

Dependent action

live:ModifyCasterVideoResource

update

*Caster

acs:live:*:{#accountId}:caster/{#CasterId}

None None

Request parameters

Parameter

Type

Required

Description

Example

RegionId

string

No

The region ID.

cn-shanghai

CasterId

string

Yes

The ID of the production studio.

  • If you create a production studio by calling the CreateCaster operation, use the CasterId returned in the response.

  • If you create a production studio in the console, find the ID on the Cloud Production Studio page. To go to this page, choose LIVE Console > Production Studio.

Note

The name of the production studio in the list on the Cloud Production Studio page is its ID.

LIVEPRODUCER_POST-cn-0pp1czt****

ResourceId

string

Yes

The resource ID. If you add a video source to the production studio by calling the AddCasterVideoResource operation, use the ResourceId returned in the response.

05ab713c-676e-49c0-96ce-cc408da1****

ResourceName

string

No

The name of the video source.

test001

LiveStreamUrl

string

No

The URL of the live stream.

Important

This parameter is required only if the video source is a live stream.

rtmp://guide.aliyundoc.com/caster/4a82a3d1b7f0462ea37348366201****?auth_key=1608953344-0-0-ac8c628078541d7055a170ec59a5****

MaterialId

string

No

The material ID.

f080575eb5f4427684fc0715159a****

VodUrl

string

No

The URL of the video on demand (VOD) file.

Important

This parameter is available only if the video source is a video file that has not been imported to the material library.

Note

VOD files must be in MP4, FLV, or TS format.

http://developer.aliyundoc.com/AppName/StreamName.flv

BeginOffset

integer

No

The start offset of the video file. Unit: milliseconds.

Important

This parameter is valid only if the video source is a video file.

Note

A value greater than 0 specifies the start time to read the file. The time is an offset from the first frame.

0

EndOffset

integer

No

This parameter is valid only for video files. Unit: milliseconds.

  • If the value is greater than 0, it specifies the end time to read the file. The time is an offset from the first frame.

  • If the value is less than 0, it specifies the end time to read the file. The time is an offset from the last frame.

10000

RepeatNum

integer

No

This parameter is valid only for video files. It specifies the number of times to loop the video after playback is complete.

  • 0 (default): The video does not loop.

  • -1: The video loops indefinitely.

0

PtsCallbackInterval

integer

No

The Presentation Time Stamp (PTS) callback interval. Unit: milliseconds. This parameter is valid only for VOD materials.

2000

ImageId

string

No

The ID of the image material in the media asset library.

Note

This parameter is required only if the video source is an image.

a089175eb5f4427684fc0715159a****

ImageUrl

string

No

The URL of the image material.

Note

This parameter is available only if the video source is an image that has not been imported to the material library. The image must be in JPG or PNG format, and its size cannot exceed 10 MB.

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

Response parameters

Parameter

Type

Description

Example

object

CasterId

string

The ID of the production studio. You can use this ID to query video sources, add layouts, or query layout lists for the production studio.

LIVEPRODUCER_POST-cn-0pp1czt****

RequestId

string

The request ID.

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

ResourceId

string

The resource ID.

98461064-1c94-4dc1-85ce-94098764****

Examples

Success response

JSON format

{
  "CasterId": "LIVEPRODUCER_POST-cn-0pp1czt****",
  "RequestId": "CF60DB6A-7FD6-426E-9288-122CC1A52FA7",
  "ResourceId": "98461064-1c94-4dc1-85ce-94098764****"
}

Error codes

HTTP status code

Error code

Error message

Description

400 InvalidCasterId.Malformed %s
400 InvalidUserId.Malformed %s
400 InvalidParameter.Malformed %s
400 InvalidResourceId.Malformed %s
400 InvalidLiveStreamUrl.Malformed %s
400 InvalidMaterialId.Malformed %s
400 InvalidVodUrl.Malformed %s
401 IllegalOperation %s
500 InternalError %s
404 InvalidCaster.NotFound %s
404 InvalidResource.NotFound %s

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.