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
Request parameters
Parameter | Type | Required | Example | Description |
---|---|---|---|---|
Action | String | Yes | ModifyCasterVideoResource | The operation that you want to perform. Set the value to ModifyCasterVideoResource. |
CasterId | String | Yes | LIVEPRODUCER_POST-cn-0pp1czt**** | The ID of the production studio.
Note You can find the ID of the production studio in the Instance Name column. |
ResourceId | String | Yes | 05ab713c-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. |
ResourceName | String | No | test001 | The name of the resource. |
LiveStreamUrl | String | No | rtmp://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. |
MaterialId | String | No | f080575eb5f4427684fc0715159a**** | The ID of the material. |
VodUrl | String | No | http://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. |
BeginOffset | Integer | No | 0 | 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. |
EndOffset | Integer | No | 10000 | 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.
|
RepeatNum | Integer | No | 0 | 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:
|
PtsCallbackInterval | Integer | No | 2000 | The interval between presentation timestamp (PTS) callbacks. Unit: milliseconds. This parameter takes effect only if the input source is a VOD file. |
ImageId | String | No | a089175eb5f4427684fc0715159a**** | The ID of the image in the media library. Note This parameter is required only if the input source is an image. |
ImageUrl | String | No | http://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
Parameter | Type | Example | Description |
---|---|---|---|
RequestId | String | CF60DB6A-7FD6-426E-9288-122CC1A52FA7 | The ID of the request. |
CasterId | String | LIVEPRODUCER_POST-cn-0pp1czt**** | The ID of the production studio. This parameter is used in the requests of the following operations: DescribeCasterVideoResources, AddCasterLayout, and DescribeCasterLayouts. |
ResourceId | String | 98461064-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.