Configures all parameters for a production studio. If a parameter is not specified, the production studio does not have the relevant configuration.
Operation description
You can call the CreateCaster operation to create a production studio and then call this operation to configure the production studio. This operation allows you to set all parameters for a production studio. If a parameter is not specified, the production studio does not have the relevant configuration.
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.
Debugging
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.
Operation | Access level | Resource type | Condition key | Associated operation |
---|---|---|---|---|
live:SetCasterConfig | update | *Caster acs:live:*:{#accountId}:caster/{#CasterId} |
| none |
Request parameters
Parameter | Type | Required | Description | Example |
---|---|---|---|---|
CasterId | string | Yes | The ID of the production studio.
Note
You can find the ID of the production studio in the Instance ID/Name column.
| a2b8e671-2fe5-4642-a2ec-bf93880e**** |
CasterName | string | No | The name of the production studio. | liveCaster**** |
DomainName | string | No | The main streaming domain. Complete the configuration of the domain name before the production studio is started. If you do not specify this parameter, the domain configuration for the production studio is cleared. | example.com |
TranscodeConfig | string | No | The transcoding configuration. The value is a JSON string. Use upper camel case for fields of the string. If you do not specify this parameter, the transcoding configuration is cleared. If no transcoding template is available, an error occurs when the production studio is started. | {"casterTemplate": "lp_ld"} |
RecordConfig | string | No | The recording configuration. The value is a JSON string. You can configure the following fields:
Note
If you do not specify this parameter, the recording feature is disabled and the recording configuration for the production studio is cleared.
| { "endpoint": "http://oss-cn-********.aliyuncs.com/api", "ossBucket****": "liveBucket****", "VideoFormat":[{\"OssObjectPrefix\":\"record/{AppName}/{StreamName}/{StartTime}_{EndTime}\",\"Format\":\"m3u8\",\"CycleDuration\":21600,\"SliceOssObjectPrefix\":\"record/{AppName}/{StreamName}/{UnixTimestamp}\"},{\"OssObjectPrefix\":\"record/{AppName}/{StreamName}/{StartTime}_{EndTime}\",\"Format\":\"flv\",\"CycleDuration\":21600}] "interval": 5 } |
Delay | float | No | Specifies whether to enable stream delay. Unit: seconds. Valid values:
| 0 |
UrgentMaterialId | string | No | The ID of the standby video from the media library. If you do not specify this parameter, the standby video configuration for the production studio is cleared. | a2b8e671 |
UrgentLiveStreamUrl | string | No | The URL of the standby live stream. | rtmp://demo.aliyundoc.com |
SideOutputUrl | string | No | The custom stream redirect URL. If you do not specify this parameter, the production studio uses the redirect URL generated by the system. Note
Redirect URLs support only the Real-Time Messaging Protocol (RTMP) protocol.
| rtmp://****/aliyundoc.com:8000/caster/4a82a3d1b7f0462ea37348366201****?auth_key=1608953344-0-0-53f0758162964516ac850f2ddc3f**** |
SideOutputUrlList | string | No | The stream relay URLs. A relay URL can be an Alibaba Cloud URL or a URL from a third-party CDN provider. You can specify up to 20 relay URLs over the RTMP protocol. Note
Use the following format to specify multiple relay URLs: "rtmp://domain/app1/stream1","rtmp://domain/app2/stream2".
| rtmp://domain/app/stream?*** |
CallbackUrl | string | No | The callback URL. Enter a valid HTTP address for receiving callback notifications. If you do not specify this parameter, the production studio does not send callback notifications. | http://****/aliyundoc.com:8000/caster/4a82a3d1b7f0462ea37348366201****?auth_key=1608953344-0-0-53f0758162964516ac850f2ddc3f**** |
ProgramEffect | integer | No | Specifies whether to enable the carousel playback feature. Valid values:
| 1 |
ProgramName | string | No | The name of the playlist for carousel playback. You can specify this parameter if you enable the carousel playback feature. | program_name |
ChannelEnable | integer | No | Specifies whether to enable channels. Valid values:
Note
You cannot disable channels after you enable them. If you set this parameter to 0, the production studio references video resources in a layout without using channels. If you enable channels for the first time, make sure that the production studio is in the idle state. After you enable channels, a new layout that references video resources by using channels is generated to replace the original one. Therefore, you must specify video resources for channels. You can use the channels to change the playback progress or status. If the video resource, preview, and program modules of the production studio use the same video source, the three modules display the same content.
| 1 |
SyncGroupsConfig | string | No | The multi-view synchronization configuration. You can specify this parameter to synchronize multiple video sources. There are two modes of multi-view synchronization.
In the streamer mode, the hostResourceId field specifies the video source on the streamer side. In the conference mode, the hostResourceId field is not available. You need to provide only resource IDs that are required. | "[{\"mode\":0,\"resourceIds\":[\"5a6c1c33-8424-46f6-813c-c152220a****\",\"4e6521dc-a40a-4077-b6bf-1fb12a76****\"],\"hostResourceId\":\"3aa2b39a-fd0e-4b8c-be73-b7af31c4****\"}]" |
UrgentImageId | string | No | The ID of the standby image from the media library. | a089175eb5f4427684fc0715159a**** |
UrgentImageUrl | string | No | The URL of the standby image. | http://learn.aliyundoc.com/AppName/image.jpg |
AutoSwitchUrgentOn | boolean | No | Specifies whether the production studio automatically switches to the standby resource in case of a stream interruption.
| true |
AutoSwitchUrgentConfig | string | No | The configuration for automatic switchover to the standby resource. The | {"eofThres":3} |
Response parameters
Examples
Sample success responses
JSON
format
{
"CasterId": "b4810848-bcf9-4aef-bd4a-e6bba2d9****",
"RequestId": "16A96B9A-F203-4EC5-8E43-CB92E68F4CD8"
}
Error codes
HTTP status code | Error code | Error message |
---|---|---|
400 | InvalidUserId.Malformed | %s |
400 | InvalidCasterId.Malformed | %s |
400 | InvalidParameter.Malformed | %s |
400 | IncorrectCasterStatus.Inuse | %s |
400 | InvalidCaster.ChannelDisableUnsupported | %s |
400 | IncorrectCasterStatus.EnableChannel | %s |
400 | MissingParameter | %s |
403 | PermissionDenied | %s |
404 | InvalidCaster.NotFound | %s |
404 | InvalidDomainName.NotFound | %s |
500 | InternalError | %s |
For a list of error codes, visit the Service error codes.
Change history
Change time | Summary of changes | Operation |
---|---|---|
2024-08-21 | The Error code has changed | View Change Details |
2023-11-22 | The Error code has changed. The request parameters of the API has changed | View Change Details |
2023-03-31 | The Error code has changed. The request parameters of the API has changed | View Change Details |