Creates a monitoring session.

Description

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

Limits on QPS

You can call this operation up to 10 times per second per account. If the number of calls per second exceeds the limit, throttling is triggered. This may affect your business. We recommend that you take note of the limit when you call this operation. For more information, see QPS limits.

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer. OpenAPI Explorer dynamically generates the sample code of the operation for different SDKs.

Request parameters

Parameter Type Required Example Description
Action String Yes CreateLiveStreamMonitor

The operation that you want to perform. Set the value to CreateLiveStreamMonitor.

Domain String Yes demo.aliyundoc.com

The endpoint of the monitoring session.

MonitorName String Yes liveMonitor****

The name of the monitoring session.

OutputTemplate String Yes lp_ud

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.
App String No monitor****

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.

Stream String No monitorStream****

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

InputList String No InputConfig

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

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

Parameter Type Example Description
MonitorId String 445409ec-7eaa-461d-8f29-4bec2eb9****

The ID of the monitoring session.

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

The ID of the request.

Examples

Sample requests

http(s)://live.aliyuncs.com/?Action=CreateLiveStreamMonitor
&Domain=demo.aliyundoc.com
&MonitorName=liveMonitor****
&OutputTemplate=lp_ud
&<Common request parameters>

Sample success responses

XML format

<CreateLiveStreamMonitorResponse>
  <RequestId>5c6a2a0d-f228-4a64-af62-20e91b9676b3</RequestId>
  <MonitorId>445409ec-7eaa-461d-8f29-4bec2eb9****</MonitorId>
</CreateLiveStreamMonitorResponse>

JSON format

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

Error codes

For a list of error codes, visit the API Error Center.