This topic describes how to query data that is generated during stream ingest and streaming in ApsaraVideo Live.
Log on to the ApsaraVideo Live console. In the left-side navigation pane, you can click Monitoring, Statistics-Visits, and to query the corresponding data.
On the Resource Monitoring page, you can query the monitoring data on the Upstream Bandwidth, Downstream Bandwidth, Back-to-Origin Statistics, and HTTP Status Codes tabs. For more information, see Resource monitoring.
On the Real-time Monitoring page, you can query the monitoring data on the Ingest Monitoring, Bandwidth and Traffic, and HTTP Status Codes tabs. For more information, see Real-time monitoring.
On the Statistics-Visits page, you can query the data on the Unique Visitors (UV), Total Visits, and Domains tabs. For more information, see Access statistics.
On the Statistics-Usage page, you can query the usage data such as Streaming Bandwidth/Traffic, Ingested Streams, Transcoding Duration, and Snapshots. For more information, see Usage statistics.
You can also query data by calling the following API operations:
Query the data generated during stream ingest
Monitoring stream ingest in real time can help you diagnose live streaming issues such as stuttering and high latency. Monitoring data is returned every second in real time, including the frame rates of received audio and video from a streamer to CDN nodes, audio and video timestamps, sequence headers, audio and video bitrates (Kbit/s), maximum audio and video frame intervals (milliseconds), error codes for interrupted stream ingest, and real-time logs. You can check the status of video streams every second to determine the stability of stream ingest and monitor live streams in real time. This reduces issues that are caused by video stuttering.
You can perform the following steps to view the stream ingest quality in the ApsaraVideo Live console. You can also call the DescribeLiveDomainFrameRateAndBitRateData operation to query the bitrate and frame rate of ingested streams in real time.
Procedure
Log on to the ApsaraVideo Live console.
In the left-side navigation pane, choose
.Specify the domain name, time period, application name, and stream name. Then, click Update.
To query the real-time monitoring data, select Last 10 Minutes. The monitoring data can be queried 3 minutes after events occur.
To query the historical monitoring data, select Last 30 Minutes, Last 1 Hour, or Custom. Monitoring data of up to the last 24 hours can be queried.
The following tables describe the metric details.
Stream details
Item | Description | Scenario |
Ingest URL | The ingest URL of the streamer, in the format of rtmp://domainName/appName/streamName. | View the ingest URL. |
AppName | The name of the application to which the stream belongs. | View the application name. |
StreamName | The name of the stream that is ingested by the streamer. | View the stream name. |
Start At | The start time when the streamer ingests the stream. | View the start time of stream ingest. |
Finish At | The end time when the streamer ingests the stream. | View the end time of stream ingest. |
Caster IP Address | The IP address of the streamer that ingests the stream. | Monitor the IP address of the streamer. |
Encoding | The metadata of the stream that is ingested by the streamer, in the format of {Video codec ID}{Resolution}/{Audio codec ID}{Audio sampling rate}. The server collects the video codec ID, resolution, audio codec ID, and audio sample rate from the videocodecid, frame_rate, audiocodecid, and aac headers in the metadata. | Monitor the encoding information of the stream. |
Activity Log | The records of stream ingest and interrupted stream ingest that are generated by the stream. | Monitor the point in time when stream ingest and interrupted stream ingest occur. |
Frame rates of received audio and video from a streamer to CDN nodes
Metric | Description | Scenario |
Video Frame Rate | The number of received video frames, the statistics of which are collected by the server per second. | Monitor the stability of the upstream video frame rate from the streamer to the server. |
Audio Frame Rate | The number of received audio frames, the statistics of which are collected by the server per second. | Monitor the stability of the upstream audio frame rate from the streamer to the server. |
Audio and video timestamps
Metric | Description | Scenario |
Video Timestamp | The timestamp of the last video frame, the statistics of which are collected by the server per second, in milliseconds. Note If no video frames are received in the one second, the value is set to -1. | Monitor the monotonicity of video timestamps. |
Audio Timestamp | The timestamp of the last audio frame, the statistics of which are collected by the server per second, in milliseconds. Note If no audio frames are received in the one second, the value is set to -1. | Monitor the monotonicity of audio timestamps. |
Difference Between Audio and Video Timestamps | The difference between the audio and video timestamps, in milliseconds. | Determine whether the audio and video timestamps are synchronized during live streaming by monitoring the difference trend of audio and video timestamps. |
Sequence headers
Metric | Description | Scenario |
AVC | The cumulative number of AVC sequence headers ingested by the streamer, the statistics of which are collected by the server. | Monitor the number of AVC sequence headers that are ingested by the streamer. |
AAC | The cumulative number of AAC sequence headers ingested by the streamer, the statistics of which are collected by the server. | Monitor the number of AAC sequence headers that are ingested by the streamer. |
Audio and video bitrates
Metric | Description | Scenario |
Video Bitrate | The video bitrate, the statistics of which are collected by the server per second, in Kbit/s. | Monitor the video bitrate of the stream that is ingested by the streamer. |
Audio Bitrate | The audio bitrate, the statistics of which are collected by the server per second, in Kbit/s. | Monitor the audio bitrate of the stream that is ingested by the streamer. |
Maximum audio and video frame intervals
Metric | Description | Scenario |
Video Keyframe Interval | The maximum interval for capturing video frames, the statistics of which are collected by the server per second. | Monitor whether the timestamp of video frames jumps. |
Audio Frame Interval | The maximum interval for capturing audio frames, the statistics of which are collected by the server per second. | Monitor whether the timestamp of audio frames jumps. |
Error codes for interrupted stream ingest
Metric | Description | Scenario |
Error Code | The error code of interrupted stream ingest, the statistics of which are collected by the server per second. | Monitor the reason why stream ingest is interrupted. The following common error codes may be returned:
|
Real-time logs
With real-time log delivery, logs can be collected within seconds after they are generated. This can help you know the details of live stream ingest and access in real time.
Procedure
Log on to the ApsaraVideo Live console.
In the left-side navigation pane, click Log Management.
Specify the domain name and date. Then, click Search to query the logs of the domain name on the specified date.
For more information about the log fields of ingested streams, see Log management.
Analyze the data generated during streaming
You can analyze the data that is generated during streaming based on the bandwidth and traffic, HTTP status codes, number of unique visitors, and user distribution.
Tab | Description | Query method |
Bandwidth and Traffic | Displays the real-time traffic and bandwidth of a streaming domain within a specified time period for each provider in a region. | Note You can perform the following steps to query the data in the ApsaraVideo Live console. You can also call the DescribeLiveDomainRealTimeTrafficData operation to query the data.
|
Streaming Bandwidth/Traffic | Displays the traffic and bandwidth usage of a specified domain name. | Note You can perform the following steps to query the data in the ApsaraVideo Live console. You can also call the DescribeLiveDomainRealTimeBpsData operation to query the data.
|
HTTP Status Codes | Displays the returned HTTP status codes. | Note You can perform the following steps to query the data in the ApsaraVideo Live console. You can also call the DescribeLiveDomainRealTimeHttpCodeData operation to query the data.
|
Total Visits | Displays the distribution of regions where the video users reside. | Note You can perform the following steps to query the data in the ApsaraVideo Live console. You can also call the DescribeLiveDomainPvUvData operation to query the data.
|
Domains | Displays the visit rankings of accelerated domain names. | |
Unique Visitors (UV) | Displays the number of independent requests from IP addresses under a domain name within a specified time period. |