Call this operation to configure a production studio in detail, including the name, transcoding configuration, recording configuration, and other parameters of the production studio.
Operation description
You must call the CreateCaster operation to create a production studio before you call this operation. This operation replaces all existing configurations. If you set a parameter to an empty value, the existing configuration for that parameter is cleared.
QPS limit
The queries per second (QPS) limit for a single user is 10 calls per second. API calls that exceed this limit 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: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 list on the Cloud Production Studio page is the production studio ID. |
a2b8e671-2fe5-4642-a2ec-bf93880e**** |
| CasterName |
string |
No |
The name of the production studio. |
liveCaster**** |
| DomainName |
string |
No |
The streaming domain for the streamer. Configure the domain name before you start the production studio. If you leave this parameter empty, the domain name configuration of the production studio is cleared. |
example.com |
| TranscodeConfig |
string |
No |
The transcoding configuration. A JSON string. The fields in the struct must be in UpperCamelCase. If you leave this parameter empty, the transcoding configuration is cleared. If no transcoding template is specified, an error is reported when you start the production studio. |
{"casterTemplate": "lp_ld"} |
| RecordConfig |
string |
No |
The recording configuration. This parameter is a JSON string. The elements are described as follows:
Note
If you leave this parameter empty, the recording feature is disabled and the existing recording configuration 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 |
number |
No |
The stream delay. Unit: seconds.
Note
The maximum value is 300. |
0 |
| UrgentMaterialId |
string |
No |
The ID of the standby video, which is a media asset. If you leave this parameter empty, the standby video configuration is cleared. |
a2b8e671 |
| UrgentLiveStreamUrl |
string |
No |
The URL of the standby live stream. |
rtmp://demo.aliyundoc.com |
| SideOutputUrl |
string |
No |
The custom ingest URL for bypass output from the production studio. If you leave this parameter empty, the system uses the automatically generated ingest URL for the output. Note
The SideOutputUrl parameter supports only stream ingest over RTMP. |
rtmp://****/aliyundoc.com:8000/caster/4a82a3d1b7f0462ea37348366201****?auth_key=1608953344-0-0-53f0758162964516ac850f2ddc3f**** |
| SideOutputUrlList |
string |
No |
The list of ingest URLs for multi-channel stream ingest. The URLs can be ingest URLs of Alibaba Cloud CDN or third-party CDNs. You can add up to 20 RTMP ingest URLs for a production studio. Note
Specify multiple URLs in an array. Example: ["rtmp://domain/app1/stream1","rtmp://domain/app2/stream2"]. |
rtmp://domain/app/stream?*** |
| CallbackUrl |
string |
No |
The webhook address. To receive callback notifications, enter a valid address that accepts HTTP requests. If you leave this parameter empty, callback notifications for the production studio are canceled. Note
For more information about production studio callbacks, see Callback information for production studios. |
http://****/aliyundoc.com:8000/caster/4a82a3d1b7f0462ea37348366201****?auth_key=1608953344-0-0-53f0758162964516ac850f2ddc3f**** |
| ProgramEffect |
integer |
No |
The flag that indicates whether the carousel is effective.
|
1 |
| ProgramName |
string |
No |
The name of the carousel. You can configure this parameter when you use the carousel feature. |
program_name |
| ChannelEnable |
integer |
No |
Specifies whether to enable channels.
Note
By default, this feature is disabled. After you enable this feature, you cannot disable it. If channels are disabled, resources are directly referenced by layouts. To enable channels for the first time, the production studio must be in the Stopped state. Existing layouts are discarded. You must first add resources to channels. New layouts directly reference channels. You can use channels to adjust the playback progress and status of video sources. In this mode, if the video source, Preview (PVW), and Program (PGM) areas reference the same resource, their screens remain synchronized. |
1 |
| SyncGroupsConfig |
string |
No |
The configuration for multi-view synchronization, which synchronizes multiple video sources. Multi-view synchronization has two modes:
Streamer mode: The hostResourceId parameter specifies the video source of the streamer. Conference mode: The hostResourceId parameter is not used. You only need to provide the resource IDs in the resourceIds parameter. |
"[{\"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, which is a media asset. |
a089175eb5f4427684fc0715159a**** |
| UrgentImageUrl |
string |
No |
The URL of the standby image. |
http://learn.aliyundoc.com/AppName/image.jpg |
| AutoSwitchUrgentOn |
boolean |
No |
Specifies whether to enable automatic switchover to the standby resource.
|
true |
| AutoSwitchUrgentConfig |
string |
No |
The configuration for automatic switchover to the standby resource.
|
{"eofThres":3} |
Response parameters
|
Parameter |
Type |
Description |
Example |
|
object |
|||
| CasterId |
string |
The ID of the production studio. You can use this ID to query ingest URLs, start the studio, add video resources, add layouts, query layouts, add components, and add playlists. |
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 | |
| 400 | InvalidCasterId.Malformed | %s | |
| 400 | InvalidParameter.Malformed | %s | |
| 400 | IncorrectCasterStatus.Inuse | %s | |
| 400 | InvalidCaster.ChannelDisableUnsupported | %s | |
| 400 | IncorrectCasterStatus.EnableChannel | %s | |
| 400 | MissingParameter | %s | |
| 500 | InternalError | %s | |
| 403 | PermissionDenied | %s | |
| 404 | InvalidCaster.NotFound | %s | |
| 404 | InvalidDomainName.NotFound | %s |
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.