All Products
Search
Document Center

ApsaraVideo Live:CreateLiveStreamMonitor

Last Updated:Dec 05, 2024
This topic is generated by a machine translation engine without any human intervention. ALIBABA CLOUD DOES NOT GUARANTEE THE ACCURACY OF MACHINE TRANSLATED CONTENT. To request a human-translated version of this topic or provide feedback on this translation, please include it in the feedback form.

Creates a monitoring session.

Operation description

You can call this operation to create a monitoring session. Make sure that the parameter settings meet the requirements.

QPS limit

You can call this operation up to 10 times per second per account. Requests that exceed this limit are dropped and you will experience service interruptions. We recommend that you take note of this limit when you call this operation.

Debugging

You can run this interface directly in OpenAPI Explorer, saving you the trouble of calculating signatures. After running successfully, OpenAPI Explorer can automatically generate SDK code samples.

Authorization information

The following table shows the authorization information corresponding to the API. The authorization information can be used in the Action policy element to grant a RAM user or RAM role the permissions to call this API operation. Description:

  • Operation: the value that you can use in the Action element to specify the operation on a resource.
  • Access level: the access level of each operation. The levels are read, write, and list.
  • Resource type: the type of the resource on which you can authorize the RAM user or the RAM role to perform the operation. Take note of the following items:
    • The required resource types are displayed in bold characters.
    • If the permissions cannot be granted at the resource level, All Resources is used in the Resource type column of the operation.
  • Condition Key: the condition key that is defined by the cloud service.
  • Associated operation: other operations that the RAM user or the RAM role must have permissions to perform to complete the operation. To complete the operation, the RAM user or the RAM role must have the permissions to perform the associated operations.
OperationAccess levelResource typeCondition keyAssociated operation
live:CreateLiveStreamMonitorcreate
*All Resources
*
    none
none

Request parameters

ParameterTypeRequiredDescriptionExample
MonitorNamestringYes

The name of the monitoring session.

liveMonitor****
OutputTemplatestringYes

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
DomainstringYes

The endpoint of the monitoring session.

demo.aliyundoc.com
AppstringNo

The name of the application that plays the output streams of the monitoring session.

You can specify a name. If you do not specify a name, the system uses monitor as the name of the application.

monitor****
StreamstringNo

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****
InputListstringYes

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

InputConfig
MonitorConfigstringNo

Alarm threshold setting for monitoring, in JSON format. For more details, please refer to the table below for MonitorConfig.

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

Supports input of callback addresses in HTTP(S) format.

http://guide.aliyundoc.com/notify
DingTalkWebHookUrlstringNo

DingTalk alert monitoring sends alert notifications through a DingTalk group robot. Please set up the DingTalk group robot first and enter the HTTP(S) address of the robot here. For more details, see Custom Robot Access.

Note Configure the custom keyword for the DingTalk group robot as 'alert', otherwise, messages will not be received.
https://oapi.dingtalk.com/robot/send?access_token=7a7d404056eee1f2fd944ace9bcfc361dc6448583e1d3d3baa****

InputConfig| Parameter | Type | Description | Example | | --------- | ---- | ----------- | ------- | | Index | Integer | The index. | 1 | | LayoutId | Integer | The ID of the layout. The value starts from 1. | 1 | | StreamName | String | The display name of a monitored stream. | monitorStream**** | | InputUrl | String | The URL of an input stream. | demo.aliyundoc.com | | LayoutConfig | LayoutConfig | The details of the layout. | For more information, see the following table LayoutConfig. | | PlayConfig | PlayConfig | The playback configurations. | For more information, see the following table PlayConfig. | LayoutConfig| Parameter | Type | Description | Example | | --------- | ---- | ----------- | ------- | | FillMode | String | The fill type. Set this value to none. | none | | PositionRefer | String | The reference coordinate value of an element position. Valid values: topLeft (upper left), topRight (upper right), bottomLeft (lower left), and bottomRight (lower right). | topLeft | | PositionNormalized | Float | The normalized value [x,y] of the coordinates of the layer.

The values of x and y range from 0 to 1.

For example, [0.1,0.1] indicates that the layer is horizontally offset by 10% and vertically offset by 10% towards the upper-left corner. | [0.1, 0.1] | | SizeNormalized | Float | The normalized value [w,h] of the size of the layer.

The values of w and h range from 0 to 1.

For example, [0.2,0.3] indicates that the width of the layer is 20% of the screen width, and the height of the layer is 30% of the screen height. | [0.2, 0.3] | PlayConfig| Parameter | Type | Description | Example | | --------- | ---- | ----------- | ------- | | VolumeRate | Float | The volume. The value ranges from 0 to 1 and rounded down to two decimal places. | 0.50 |

Response parameters

ParameterTypeDescriptionExample
object
MonitorIdstring

The ID of the monitoring session.

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

The ID of the request.

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

Examples

Sample success responses

JSONformat

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

Error codes

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

For a list of error codes, visit the Service error codes.

Change history

Change timeSummary of changesOperation
2024-09-04The Error code has changedView Change Details