Modifies input sources of a production studio.

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

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
ActionStringYesModifyCasterVideoResource

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

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.
ResourceIdStringYes05ab713c-676e-49c0-96ce-cc408da1****

The ID of the resource. If you call the AddCasterVideoResource operation to add an input source to a production studio, check the value of ResourceId that is returned.

ResourceNameStringNotest001

The name of the resource.

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

The URL of the live stream.

Important This parameter is required only if the input source is a live stream.
MaterialIdStringNof080575eb5f4427684fc0715159a****

The ID of the material.

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

The URL of the VOD file.

Important This parameter takes effect only if the input source is a VOD file that is not from the media library.
Note The VOD file must be in the MP4, FLV, or TS format.
BeginOffsetIntegerNo0

The offset of the position where the system starts to read the video file. Unit: milliseconds.

Important This parameter takes effect only if the input source is a video file.
Note A value greater than 0 indicates an offset from the first frame.
EndOffsetIntegerNo10000

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 less than 0 indicates an offset from the last frame.
RepeatNumIntegerNo0

The number of playback times after the first playback is complete. This parameter takes effect only if 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.
PtsCallbackIntervalIntegerNo2000

The interval between presentation timestamp (PTS) callbacks. Unit: milliseconds. This parameter takes effect only if the input source is a VOD file.

ImageIdStringNoa089175eb5f4427684fc0715159a****

The ID of the image in the media library.

Note This parameter is required only if the input source is an image.
ImageUrlStringNohttp://learn.aliyundoc.com/AppName/image.jpg

The URL of the image.

Note This parameter takes effect only if the input source is an image that is not from the media library. You can upload images in the JPG or PNG format. The maximum size of each image is 10 MB.

Response parameters

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

The ID of the request.

CasterIdStringLIVEPRODUCER_POST-cn-0pp1czt****

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

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

The ID of the resource.

Examples

Sample requests

http(s)://live.aliyuncs.com/?Action=ModifyCasterVideoResource
&CasterId=LIVEPRODUCER_POST-cn-0pp1czt****
&ResourceId=05ab713c-676e-49c0-96ce-cc408da1****
&<Common request parameters>

Sample success responses

XML format

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

<?xml version="1.0" encoding="UTF-8" ?>
<ModifyCasterVideoResourceResponse>
    <RequestId>CF60DB6A-7FD6-426E-9288-122CC1A52FA7</RequestId>
    <CasterId>LIVEPRODUCER_POST-cn-0pp1czt****</CasterId>
    <ResourceId>98461064-1c94-4dc1-85ce-94098764****</ResourceId>
</ModifyCasterVideoResourceResponse>

JSON format

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

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

Error codes

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