SetCasterConfig
Configures the detailed settings of a production studio, including parameters such as the name, transcoding configuration, and recording configuration.
Operation description
Create a production studio by calling the CreateCaster operation, and then call this operation to configure the detailed settings of the production studio.
QPS limit
The QPS limit for a single user is 10 calls per second. If the limit is exceeded, API calls are throttled, which may affect your business. Make API calls at a reasonable frequency.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
live:SetCasterConfig |
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 production studio list on the Cloud Production Studio page is the ID of the production studio. |
a2b8e671-2fe5-4642-a2ec-bf93880e**** |
| CasterName |
string |
No |
The name of the production studio. |
liveCaster**** |
| DomainName |
string |
No |
The streaming domain. Configure the domain name before you start the production studio. If this parameter is left empty, the domain name configuration of the production studio is cleared by default. |
example.com |
| TranscodeConfig |
string |
No |
The transcoding configuration. The value must be a JSON string. The fields in the struct must be in camel case with the first letter capitalized. If this parameter is left empty, the transcoding configuration is cleared by default. If the transcoding template is empty, an error is reported when the production studio is started. |
{"casterTemplate": "lp_ld"} |
| RecordConfig |
string |
No |
The recording configuration. The value must be in JSON format. The configuration elements are as follows:
Note
If this parameter is left empty, the recording feature is disabled. If this parameter is set to empty, the recording configuration is cleared by default. |
{ "endpoint": "oss-cn-********.aliyuncs.com", "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 |
number |
No |
The stream delay. Unit: seconds.
Note
The maximum stream delay is 300 seconds. |
0 |
| UrgentMaterialId |
string |
No |
The ID of the standby video material in the media asset library. If this parameter is set to empty, the standby configuration is cleared by default. |
a2b8e671 |
| UrgentLiveStreamUrl |
string |
No |
The URL of the standby live stream. |
rtmp://demo.aliyundoc.com |
| SideOutputUrl |
string |
No |
The custom ingest URL that corresponds to the bypass output URL of the production studio. If this parameter is left empty, the ingest URL that corresponds to the automatically generated output URL of Alibaba Cloud is used by default. Note
Currently, the SideOutputUrl parameter only supports RTMP stream ingest. |
rtmp://****/aliyundoc.com:8000/caster/4a82a3d1b7f0462ea37348366201****?auth_key=1608953344-0-0-53f0758162964516ac850f2ddc3f**** |
| SideOutputUrlList |
string |
No |
The list of multi-channel relay ingest URLs. The URLs can be CDN ingest URLs of Alibaba Cloud or third-party vendors. A single production studio supports up to 20 RTMP relay ingest URLs. Note
Specify multiple URLs in the array format, such as ["rtmp://domain/app1/stream1","rtmp://domain/app2/stream2"]. |
rtmp://domain/app/stream?*** |
| CallbackUrl |
string |
No |
The custom callback URL. To receive callback notifications, enter an available receiving URL that supports the HTTP protocol. If this parameter is set to empty, the callback notifications for the production studio are canceled by default. Note
For more information about production studio callbacks, see Cloud production studio callback information. |
http://****/aliyundoc.com:8000/caster/4a82a3d1b7f0462ea37348366201****?auth_key=1608953344-0-0-53f0758162964516ac850f2ddc3f**** |
| ProgramEffect |
integer |
No |
The carousel effect flag.
|
1 |
| ProgramName |
string |
No |
The name of the carousel studio. This parameter can be configured when the carousel feature is used. |
program_name |
| ChannelEnable |
integer |
No |
Specifies whether to enable the channel. If the production studio channel was previously enabled (ChannelEnable=1), you must explicitly pass ChannelEnable=1 in each call to maintain the channel status. Otherwise, the InvalidCaster.ChannelDisableUnsupported error is returned.
Note
By default, the channel is not enabled and cannot be disabled after it is enabled. When the channel is not enabled, resources are directly referenced by layouts. The channel must be enabled for the first time when the production studio is stopped. Existing layouts are deprecated. Resources must be set to the channel first. New layouts directly reference the channel. You can adjust the playback progress and status of the video source through the channel. In this mode, if the video source, PVW, and PGM areas reference the same resource, the corresponding screens remain synchronized. |
1 |
| SyncGroupsConfig |
string |
No |
The multi-view synchronization configuration, which synchronizes multiple video sources. Multi-view synchronization has two modes:
Streamer mode: hostResourceId: the streamer video source in streamer mode. Conference mode: the hostResourceId field is not provided. Only the resource IDs in the resourceIds field are provided. |
"[{\"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 material in the media asset library. |
a089175eb5f4427684fc0715159a**** |
| UrgentImageUrl |
string |
No |
The URL of the standby image material. |
http://learn.aliyundoc.com/AppName/image.jpg |
| AutoSwitchUrgentOn |
boolean |
No |
Specifies whether to enable automatic switchover to the standby source upon stream interruption.
|
true |
| AutoSwitchUrgentConfig |
string |
No |
The automatic switchover to the standby source configuration. eofThres: the time threshold for automatic switchover to the standby source after stream interruption, in seconds. |
{"eofThres":3} |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
|||
| CasterId |
string |
The ID of the production studio. This parameter can be used as a request parameter for querying the stream URL of the production studio, starting the production studio, adding video resources to the production studio, adding layouts to the production studio, querying the layout list of the production studio, adding components to the production studio, and adding program lists to the production studio. |
b4810848-bcf9-4aef-bd4a-e6bba2d9**** |
| RequestId |
string |
The request ID. |
16A96B9A-F203-4EC5-8E43-CB92E68F4CD8 |
Examples
Success response
JSON format
{
"CasterId": "b4810848-bcf9-4aef-bd4a-e6bba2d9****",
"RequestId": "16A96B9A-F203-4EC5-8E43-CB92E68F4CD8"
}
Error codes
|
HTTP status code |
Error code |
Error message |
Description |
|---|---|---|---|
| 400 | InvalidUserId.Malformed | %s, please check userId. | The userId passed in is invalid, please check. |
| 400 | InvalidCasterId.Malformed | %s, please check and try again later. | The parameter CasterId is invalid, please check and try again. |
| 400 | InvalidParameter.Malformed | There are invalid parameters: %s. | There are invalid parameters: %s. |
| 400 | IncorrectCasterStatus.Inuse | %s, please check and try again later. | Caster status is inuse, please check and try again later. |
| 400 | MissingParameter | %s. | Missing parameter |
| 400 | InvalidCaster.ChannelDisableUnsupported | %s, please check. | Disabling an enabled Channel is not supported. |
| 400 | IncorrectCasterStatus.EnableChannel | %s, please check and try again later. | Caster status does not support EnableChannel settings, please check and try again. |
| 403 | PermissionDenied | %s, please check and try again later. | Access denied, please check and try again. |
| 404 | InvalidCaster.NotFound | %s, please check and try again later. | The guide station does not exist, please check and try again. |
| 404 | InvalidDomainName.NotFound | %s, please check and try again later. | Domain name does not exist, please check and try again. |
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.