All Products
Search
Document Center

:UpdateMixStream

Last Updated:Oct 29, 2025

Updates a stream mix task.

Operation description

You can call this API operation to update a stream mix task. You can update the input sources and layout, but you cannot update parameters such as the output resolution.

QPS limit

The queries per second (QPS) limit for a single user is 10 calls per second. If you exceed this limit, your API calls are throttled. This may impact your business. Plan your calls accordingly.

Try it now

Try this API in OpenAPI Explorer, no manual signing needed. Successful calls auto-generate SDK code matching your parameters. Download it with built-in credential security for local usage.

Test

RAM authorization

The table below describes the authorization required to call this API. You can define it in a Resource Access Management (RAM) policy. The table's columns are detailed below:

  • Action: The actions can be used in the Action element of RAM permission policy statements to grant permissions to perform the operation.

  • API: The API that you can call to perform the action.

  • Access level: The predefined level of access granted for each API. Valid values: create, list, get, update, and delete.

  • Resource type: The type of the resource that supports authorization to perform the action. It indicates if the action supports resource-level permission. The specified resource must be compatible with the action. Otherwise, the policy will be ineffective.

    • For APIs with resource-level permissions, required resource types are marked with an asterisk (*). Specify the corresponding Alibaba Cloud Resource Name (ARN) in the Resource element of the policy.

    • For APIs without resource-level permissions, it is shown as All Resources. Use an asterisk (*) in the Resource element of the policy.

  • Condition key: The condition keys defined by the service. The key allows for granular control, applying to either actions alone or actions associated with specific resources. In addition to service-specific condition keys, Alibaba Cloud provides a set of common condition keys applicable across all RAM-supported services.

  • Dependent action: The dependent actions required to run the action. To complete the action, the RAM user or the RAM role must have the permissions to perform all dependent actions.

Action

Access level

Resource type

Condition key

Dependent action

live:UpdateMixStream

update

*Domain

acs:live:*:{#accountId}:domain/{#DomainName}

None None

Request parameters

Parameter

Type

Required

Description

Example

RegionId

string

No

The region ID.

cn-shanghai

DomainName

string

Yes

The streaming domain.

Important Only domain names in the China (Shanghai) and China (Beijing) regions are supported.

example.com

MixStreamId

string

Yes

The ID of the stream mix task. If you created the task by calling the CreateMixStream operation, use the MixStreamId value returned in the response.

5b2a046e-74d7-385e-d2d7-8a5b87e4****

InputStreamList

string

Yes

The list of input streams for the mix. This is a JSON array.

For more information, see InputStreamConfig below.

{"InputStreamList":[{"LayoutConfig":{"FillSizeNormalized":[0.5,0.5],"FillPositionNormalized":[0,0],"PositionRefer":"topLeft","FillMode":"fit"},"LayoutChildId":1,"ResourceValue":"rtmp://aliyundoc.com/caster/8564a8d1659b4dc69df5f66cf4c9****","ResourceType":"live"},{"LayoutConfig":{"FillSizeNormalized":[0.5,0.5],"FillPositionNormalized":[0.5,0],"PositionRefer":"topLeft","FillMode":"fit"},"LayoutChildId":2,"ResourceValue":"http://developer.aliyundoc.com/3c3c25426cf744fdb90423e76b78a28a/69b1a16e2b1d423d9841bf27a96f134e-0b1cba51f58bb5ad3a854x96a2c735f****.mp4","ResourceType":"url"},{"LayoutConfig":{"FillSizeNormalized":[1,0.5],"FillPositionNormalized":[0,0.5],"PositionRefer":"topLeft","FillMode":"fit"},"LayoutChildId":3,"ResourceValue":"http://aliyundoc.com/c0c6c5446b56432389e91535864938da/ed4adc5263b4474c954b95607a5350ae-fda757b3328438a8cf-4k57f373a0f0****.mp4","ResourceType":"url"}]}

LayoutId

string

No

The layout ID. The following values are supported:

  • MixStreamLayout-1-1

  • MixStreamLayout-2-1

  • MixStreamLayout-2-2

  • MixStreamLayout-2-3

  • MixStreamLayout-3-1

  • MixStreamLayout-3-2

  • MixStreamLayout-4-1

  • USERDEFINED (If you use a custom layout instead of a preset layout, set this parameter to this value.)

Note

For more information, see Preset stream mix layouts.

MixStreamLayout-3-2

InputStreamConfig

NameTypeDescription
ResourceTypeStringThe resource type.
live: A live streaming URL.
url: A file streaming URL.




ResourceValueStringThe resource URL.
If ResourceType is set to live, this is the live streaming URL. The URL must use the RTMP, FLV, or Alibaba Real-Time Communication (ARTC) protocol. The HLS protocol is not supported.
If ResourceType is set to url, this is the file streaming URL.




LayoutChildIdStringThe ID of the layout pane. This ID also determines the stacking order of the streams.
LayoutConfigLayoutConfig[]A JSON array that specifies layout information, such as the position and fill mode.
This parameter is optional if you use a preset layout.
If you set this parameter, the preset layout information that corresponds to LayoutChildId is ignored.




LayoutConfig

NameTypeRequiredDescription
FillSizeNormalizedJSON array of floating-point numbersYesThe size of the area to fill for this layer element.
[w,h]: The values of w and h range from 0 to 1. The width and height are normalized.
For example, [0.2,0.3] means the element occupies 20% of the horizontal space and 30% of the vertical space.




FillPositionNormalizedArray of floating-point numbersYesThe normalized position of the fill area for this layer element.
[x,y]: The values of x and y range from 0 to 1.
For example, [0.1,0.1] means a horizontal offset of 10% and a vertical offset of 10% from the top-left corner.




PositionReferStringNoThe reference coordinate for the position of the element.
Set this parameter to topLeft to use the top-left corner as the reference.

FillModeStringNoThe fill mode for the element.
none: No fill.
fit: Scales the stream to fit the pane. The longest edge reaches the border, and black bars may be added to the shorter edge.
fill: Scales the stream proportionally based on the larger of the width or height ratio, and then crops the stream to fill the entire pane.
Set this parameter to fit.










Response elements

Element

Type

Description

Example

object

MixStreamId

string

The ID of the stream mix task. You can use this ID to query or delete the task.

5b2a046e-74d7-385e-d2d7-8a5b87e4****

RequestId

string

The request ID.

1A8CDDFF-0121-4ABB-DA60-AEF095A8W34F

Examples

Success response

JSON format

{
  "MixStreamId": "5b2a046e-74d7-385e-d2d7-8a5b87e4****",
  "RequestId": "1A8CDDFF-0121-4ABB-DA60-AEF095A8W34F"
}

Error codes

HTTP status code

Error code

Error message

Description

400 InvalidUserId.Malformed %s
400 InvalidParameter.Malformed %s
400 MissingParameter %s
401 IllegalOperation %s
500 InternalError %s
403 MixStreamAlreadyExist %s
403 MixStreamNotExist %s
404 InvalidDomainName.NotFound %s

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.