All Products
Search
Document Center

ApsaraVideo Live:ModifyCasterVideoResource

Last Updated:Nov 14, 2024
This topic is generated by a machine translation engine without any human intervention. ALIBABA CLOUD DOES NOT GUARANTEE THE ACCURACY OF MACHINE TRANSLATED CONTENT. To request a human-translated version of this topic or provide feedback on this translation, please include it in the feedback form.

Changes the video source for a production studio.

Operation description

Usage notes

You must call the CreateCaster operation to create a production studio before you call this operation to modify input sources of the production studio.

QPS limit

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

You can run this interface directly in OpenAPI Explorer, saving you the trouble of calculating signatures. After running successfully, OpenAPI Explorer can automatically generate SDK code samples.

Authorization information

The following table shows the authorization information corresponding to the API. The authorization information can be used in the Action policy element to grant a RAM user or RAM role the permissions to call this API operation. Description:

  • Operation: the value that you can use in the Action element to specify the operation on a resource.
  • Access level: the access level of each operation. The levels are read, write, and list.
  • Resource type: the type of the resource on which you can authorize the RAM user or the RAM role to perform the operation. Take note of the following items:
    • The required resource types are displayed in bold characters.
    • If the permissions cannot be granted at the resource level, All Resources is used in the Resource type column of the operation.
  • Condition Key: the condition key that is defined by the cloud service.
  • Associated operation: other operations that the RAM user or the RAM role must have permissions to perform to complete the operation. To complete the operation, the RAM user or the RAM role must have the permissions to perform the associated operations.
OperationAccess levelResource typeCondition keyAssociated operation
live:ModifyCasterVideoResourceupdate
*Caster
acs:live:*:{#accountId}:caster/{#CasterId}
    none
none

Request parameters

ParameterTypeRequiredDescriptionExample
CasterIdstringYes

The ID of the production studio.

If you create a production studio through the CreateCaster interface, check the value of the CasterId parameter in the response.

If you create a production studio through the ApsaraVideo Live Console, log in to the console, then check the ID of the production studio through the following path:

Production Studios > Production Studio Management

Note The CasterId is reflected in the Name column on the Production Studio Management page.
LIVEPRODUCER_POST-cn-0pp1czt****
ResourceIdstringYes

The ID of the video resource. It is reflected in the ResourceId parameter when you call the AddCasterVideoResource operation.

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

The name of the video resource.

test001
LiveStreamUrlstringNo

The URL of the live stream.

This parameter takes effect and is required only when the video resource is a live stream.

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

The ID of the material.

f080575eb5f4427684fc0715159a****
VodUrlstringNo

The URL of the video-on-demand (VOD) file. This parameter takes effect only when the video resource is a video file that is not from the media library.

Note The VOD file must be in the MP4, FLV, or TS format.
http://developer.aliyundoc.com/AppName/StreamName.flv
BeginOffsetintegerNo

The offset of the position where the system starts to read the video resource.

This parameter takes effect only when the video resource is a video file. Unit: milliseconds.

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

This parameter takes effect only when the video resource 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.
10000
RepeatNumintegerNo

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.
0
PtsCallbackIntervalintegerNo

The interval between presentation timestamp (PTS) callbacks. Unit: milliseconds. This parameter takes effect only when the video resource is a VOD file.

2000
ImageIdstringNo

ID of the media library image material.

Note This parameter is only available and must be provided when the video source type is an image.
a089175eb5f4427684fc0715159a****
ImageUrlstringNo

Image material URL.

Note This parameter is only available when the video source type is an image and the image file has not been imported into the material library. Supports uploading images in jpg, png formats, with a maximum file size of 10MB.
http://learn.aliyundoc.com/AppName/image.jpg

Response parameters

ParameterTypeDescriptionExample
object
CasterIdstring

The ID of the production studio. This parameter is used in the requests of the following operations: DescribeCasterVideoResources, AddCasterLayout, and DescribeCasterLayouts.

LIVEPRODUCER_POST-cn-0pp1czt****
RequestIdstring

The ID of the request.

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

The ID of the resource.

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

Examples

Sample success responses

JSONformat

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

Error codes

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

For a list of error codes, visit the Service error codes.

Change history

Change timeSummary of changesOperation
2023-03-31The Error code has changed. The request parameters of the API has changedView Change Details
2023-03-31The Error code has changed. The request parameters of the API has changedView Change Details