All Products
Search
Document Center

ApsaraVideo Live:UpdateLiveStreamMonitor

Last Updated:Dec 05, 2024

Updates the configurations of a monitoring session.

Operation description

You can call this operation to update the configurations of a monitoring session. The updates that you make to the input source configurations when the monitoring session is in the Running state immediately take effect.

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:UpdateLiveStreamMonitorupdate
*All Resources
*
    none
none

Request parameters

ParameterTypeRequiredDescriptionExample
MonitorIdstringYes

The ID of the monitoring session.

Note You can obtain the monitoring session ID from the response of the CreateLiveStreamMonitor operation.
445409ec-7eaa-461d-8f29-4bec2eb9****
MonitorNamestringNo

The name of the monitoring session.

liveMonitor****
DomainstringNo

The domain name.

demo.aliyundoc.com
AppstringNo

The name of the application to which the output stream of the monitoring session belongs. 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.

monitorStream****
OutputTemplatestringNo

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
InputListstringYes

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

InputConfig
MonitorConfigstringNo

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}"
CallbackUrlstringNo

The callback URL. Supported formats include HTTP and HTTPS.

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

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 Configure a custom chatbot.

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

FieldTypeDescriptionExample
IndexIntegerThe index.1
LayoutIdIntegerThe layout ID, which must start from 1.1
StreamNameStringThe display name of the stream to monitor.monitorStream****
InputUrlStringThe URL of the input stream.demo.aliyundoc.com
LayoutConfigLayoutConfigThe layout information.See the following LayoutConfig table.
PlayConfigPlayConfigThe playback configurations.See the following PlayConfig table.

LayoutConfig

FieldTypeDescriptionExample
FillModeStringThe fill type. Set this value to none.none
PositionReferStringThe reference position of the element. Valid values: topLeft, topRight, bottomLeft, and bottomRight.TopLeft
PositionNormalizedFloatThe normalized value of the position of the layer, in the format of [x,y].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]
SizeNormalizedFloatThe normalized value of the size of the layer, in the format of [w,h].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

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

MonitorConfig

FieldTypeDescriptionExample
fpsLowThresFloatThe 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
brHighThresFloatThe 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
eofDurationThresSecFloatThe 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

ParameterTypeDescriptionExample
object
RequestIdstring

The request ID.

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

Examples

Sample success responses

JSONformat

{
  "RequestId": "5c6a2a0d-f228-4a64-af62-20e91b9676b3"
}

Error codes

HTTP status codeError codeError message
400InvalidUserId.Malformed%s
400InvalidParameter.Malformed%s
400MissingParameter%s
400InvalidMonitorId.Malformed%s
401IllegalOperation%s
404InvalidDomainName.NotFound%s
404StreamMonitorNotExist%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