Adds layout settings for a virtual production studio.
Operation description
You can call this operation to add layout settings for a virtual production studio. This operation supports both common and studio layouts.
QPS limit
The queries per second (QPS) limit for this operation is 10 per user. If you exceed this limit, your API calls are throttled. This may affect your business. We recommend that you call this operation at a reasonable rate.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
live:AddStudioLayout |
create |
*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. Important
Create a virtual production studio in advance. You can create a production studio in the console or by calling the CreateCaster API operation. The production studio must be a virtual 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**** |
| LayoutName |
string |
Yes |
The name of the studio layout. |
测试布局 |
| LayoutType |
string |
Yes |
The type of the studio layout. Valid values:
|
studio |
| CommonConfig |
string |
No |
The configuration of the common layout. The value is a JSON string. For more information, see CommonConfig. Important
This parameter is required only when you set LayoutType to common. |
{"ChannelId":"RV01" } |
| BgImageConfig |
string |
No |
The configuration of the background resource. The value is a JSON string. For more information, see BgImageConfig. Important
This parameter is required only when you set LayoutType to studio. |
{ "Id":"k12kj31****", "MaterialId":"f080575eb5f4427684fc0715159a****" } |
| ScreenInputConfigList |
string |
No |
The settings for the chroma keying input. The value is a JSON string. For more information, see ScreenInputConfig. Important
This parameter is required only when you set LayoutType to studio. |
[ { "Index":"1", "ChannelId":"RV01", "Color":"green", "PositionX":"0.1", "PositionY":"0.2", "HeightNormalized":"0.4" } ] |
| MediaInputConfigList |
string |
No |
The settings for the multimedia input resource. The value is a JSON string. For more information, see MediaInputConfig. Important
This parameter is valid and optional only when you set LayoutType to studio. |
[ { "Id":"k12kj31****", "Index":"1", "ChannelId":"RV01", "FillMode":"none", "PositionRefer":"topLeft", "WidthNormalized":"0.4", "HeightNormalized":"0.4", "PositionNormalized":"[0.1, 0.2]" }, { "Id":"k12kj31****", "Index":"2", "ImageMaterialId":"lkajsdfsa8fd89asd8****", "FillMode":"none", "PositionRefer":"topLeft", "WidthNormalized":"0.6", "HeightNormalized":"0.4", "PositionNormalized":"[0.1, 0.2]" } ] |
| LayerOrderConfigList |
string |
No |
The layer order settings. The value is a JSON string. For more information, see LayerOrderConfig. You can sort background materials and multimedia materials. Chroma keying layers are not supported. The earlier a material appears in the list, the lower its layer. |
[ { "Type":"media", "Id":"k12kj31****" }, { "Type":"media", "Id":"k12kj31****" } ] |
CommonConfig
Name | Type | Example | Description |
ChannelId | String | RV01 | The ID of the channel to which the video resource is attached. |
BgImageConfig
Specify only one of ImageUrl or MaterialId.
Name | Type | Example | Description |
Id | String | k12kj31**** | The unique ID of the background material. |
ImageUrl | String | http://aliyundoc.com | The URL of the material. |
MaterialId | String | f080575eb5f4427684fc0715159a**** | The ID of the video on demand (VOD) material. |
ScreenInputConfig
Name | Type | Example | Description |
Index | Integer | 1 | The number of the chroma keying source. This parameter is for display on the frontend and has no logical function. It must be a positive integer greater than 0. |
ChannelId | String | RV01 | The ID of the channel to which the video resource is attached. |
Color | String | green | The color for chroma keying. Valid values: |
PositionX | Float | 0.1 | The x-coordinate. The value must be in the range [0, 1]. |
PositionY | Float | 0.2 | The y-coordinate. The value must be in the range [0, 1]. |
HeightNormalized | Float | 0.4 | The normalized height. This is the ratio of the height of the keyed-out portrait to the height of the background. The value must be in the range [0, 1]. |
MediaInputConfig
If the multimedia material is a video source, specify ChannelId.
If the multimedia material is an image, specify ImageMaterialId.
ChannelId and ImageMaterialId are mutually exclusive. Specify only one.
Name | Type | Example | Description |
Id | String | k12kj31**** | The unique ID of the multimedia material. |
Index | Integer | 1 | The number of the multimedia material. This parameter is for display on the frontend and has no logical function. It must be a positive integer greater than 0. |
ChannelId | String | RV01 | The ID of the channel to which the video resource is attached. |
ImageMaterialId | String | lkajsdfsa8fd89asd8**** | The ID of the VOD image material. |
FillMode | String | none | The fill type. Set this to none. |
PositionRefer | String | topLeft | The reference point for the material's position. Set this to topLeft. This indicates that the top-left corner is the reference point. |
WidthNormalized | Float | 0.4 | The normalized width of the material. This is the ratio of the width of the material to the width of the background. The value must be in the range [0, 1]. |
HeightNormalized | Float | 0.4 | The normalized height of the material. This is the ratio of the height of the material to the height of the background. The value must be in the range [0, 1]. |
PositionNormalized | Float | [0.1, 0.2] | The normalized position of the material's fill area [x, y]. The values of x and y must be in the range [0, 1]. |
LayerOrderConfig
Name | Type | Example | Description |
Type | String | media | The type of the resource configuration. |
Id | String | k12kj31**** | The unique ID of the resource. |
Response parameters
|
Parameter |
Type |
Description |
Example |
|
object |
|||
| LayoutId |
string |
The layout ID. Use this ID to delete, modify, or query a virtual production studio layout. |
445409ec-7eaa-461d-8f29-4bec2eb9**** |
| RequestId |
string |
The request ID. |
5c6a2a0d-f228-4a64-af62-20e91b96**** |
Examples
Success response
JSON format
{
"LayoutId": "445409ec-7eaa-461d-8f29-4bec2eb9****",
"RequestId": "5c6a2a0d-f228-4a64-af62-20e91b96****"
}
Error codes
|
HTTP status code |
Error code |
Error message |
Description |
|---|---|---|---|
| 400 | MissingParameter | %s | |
| 400 | InvalidParameter.Malformed | %s | |
| 400 | InvalidCasterId.Malformed | %s | |
| 400 | InvalidUserId.Malformed | %s | |
| 400 | InvalidPositionNormalized.Malformed | %s | |
| 400 | InvalidHeightOrWidthNormalized | %s | |
| 401 | IllegalOperation | %s | |
| 500 | InternalError | %s | |
| 404 | InvalidCaster.NotFound | %s |
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.