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
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
live:ModifyCasterVideoResource |
update |
*Caster
|
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.
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.
|
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 |
| 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.