All Products
Search
Document Center

ApsaraVideo Live:CreateLiveStreamMonitor

Last Updated:Jul 11, 2025

Creates a monitoring session.

Operation description

You can call this operation to create a monitoring session. Ensure that your parameter settings meet all requirements.

QPS limits

This operation can be called up to 10 times per second for each Alibaba Cloud account. Requests that exceed this limit are dropped and you may experience service interruptions. We recommend that you consider this limit when calling this operation.

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 support 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:CreateLiveStreamMonitor

create

*All Resource

*

None None

Request parameters

Parameter

Type

Required

Description

Example

RegionId

string

No

MonitorName

string

Yes

The name of the monitoring session.

liveMonitor****

OutputTemplate

string

Yes

The output template of the monitoring session. Valid values:

  • lp_ld: low definition.

  • lp_sd: standard definition.

  • lp_hd: high definition.

  • lp_ud: ultra-high definition.

lp_ud

Domain

string

Yes

The endpoint of the monitoring session.

demo.aliyundoc.com

App

string

No

The name of the application to which the output stream of the monitoring session belongs. You can specify a custom name. If you do not specify a name, monitor is used as the AppName.

monitor****

Stream

string

No

The name of the output stream of the monitoring session. If you do not specify a name, the system generates a name at random.

monitorStream****

InputList

string

Yes

The list of input streams to monitor. For more information, see the following InputConfig table.

InputConfig

MonitorConfig

string

No

The monitoring alert thresholds. The value is a JSON string. For more information, see the following MonitorConfig table.

"{\"fpsLowThres\": 0.6,\"brLowThres\": 1.1,\"eofDurationThresSec\": 10}"

CallbackUrl

string

No

The callback URL. Supported formats include HTTP and HTTPS.

http://guide.aliyundoc.com/notify

DingTalkWebHookUrl

string

No

The URL of the DingTalk chatbot. Specify a DingTalk chatbot that you have configured, and you can receive live monitoring alerts from the chatbot. For more information, see Custom Robot Access.

Note

Specify "Alert" as the custom keyword of the DingTalk chatbot. Otherwise, you cannot receive messages.

https://oapi.dingtalk.com/robot/send?access_token=7a7d404056eee1f2fd944ace9bcfc361dc6448583e1d3d3baa****

InputConfig

Parameter

Type

Description

The sample value of the parameter

Index

Integer

The index.

1

LayoutId

Integer

The layout ID, which must start from 1.

1

StreamName

String

The display name of the monitored stream.

monitorStream****

InputUrl

String

The URL of the input stream.

demo.aliyundoc.com

LayoutConfig

LayoutConfig

The details of the layout.

See the following LayoutConfig table

PlayConfig

PlayConfig

The playback configurations.

See the following PlayConfig table

LayoutConfig

Parameter

Type

Description

The sample value of the parameter

FillMode

String

The fill type. Set this value to none.

none

PositionRefer

String

The reference coordinate for the position of the element. Valid values: topLeft (top-left), topRight (top-right), bottomLeft (bottom-left), bottomRight (bottom-right).

topLeft

PositionNormalized

Float

The normalized value of the position of the layer, in the format of [x,y].
Valid values of x and y: 0 to 1.
For example, [0.1,0.1] indicates a horizontal offset of 10% and a vertical offset of 10% from the top-left corner.




[0.1, 0.1]

SizeNormalized

Float

The normalized value of the size of the layer, in the format of [w,h].
Valid values of w and h: 0 to 1. The width and height are normalized values.
For example, [0.2,0.3] indicates a width of 20% and a height of 30%.




[0.2, 0.3]

PlayConfig

Parameter

Type

Description

The sample value of the parameter

VolumeRate

Float

The volume. Valid values: 0 to 1. The value is rounded to two decimal places.

0.50

MonitorConfig

Parameter

Type

Description

The sample value of the parameter

fpsLowThres

Float

The video frame rate alert threshold. This threshold is a scale factor. Valid values: (0.0,1.0]. Default value: 0.7. When the video frame rate of the monitored stream is less than the threshold times the original frame rate of the stream, an alert is triggered.

0.7

brHighThres

Float

The audio/video bitrate alert threshold. This threshold is a scale factor. Valid values: (0.0,100]. Default value: 1.0. When the audio/video bitrate of the monitored stream is greater than the threshold times the original bitrate of the stream, an alert is triggered.

1.0

eofDurationThresSec

Float

The interruption duration alert threshold. If the monitored stream is interrupted for a period of time that is longer than the threshold, an alert is triggered. Valid values: (0,65535]. Default value: 0. Unit: seconds. - After the stream is interrupted, the connection is still available and a packet timeout occurs after 5 seconds. The system determines whether there is an interruption based on the timeout. If you set this parameter to a value that is less than or equal to 5 seconds, the threshold is fixed at 5 seconds. If you set this parameter to a value that is greater than 5 seconds, the threshold is the specified value. -If the stream is resumed within the threshold after it is interrupted, no alert is triggered. If you modify the URL of the monitored stream within the threshold after the stream is interrupted, interruption detection is not performed for the stream and no alert is triggered.

10

Response parameters

Parameter

Type

Description

Example

object

MonitorId

string

The ID of the monitoring session.

445409ec-7eaa-461d-8f29-4bec2eb9****

RequestId

string

The ID of the request.

5c6a2a0d-f228-4a64-af62-20e91b9676b3

Examples

Success response

JSON format

{
  "MonitorId": "445409ec-7eaa-461d-8f29-4bec2eb9****",
  "RequestId": "5c6a2a0d-f228-4a64-af62-20e91b9676b3"
}

Error codes

HTTP status code

Error code

Error message

Description

400 InvalidParameter.Malformed %s
400 InvalidUserId.Malformed %s
400 MissingParameter %s
400 StreamMonitorExist %s
401 IllegalOperation %s
500 InternalError %s
404 InvalidDomainName.NotFound %s

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.