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, click Data Center and then click Billing or Monitoring to query the corresponding data.
On the Statistics-Usage page, you can query the usage data, such as the streaming bandwidth and traffic, ingested streams, transcoding duration, and snapshots. For more information, see Usage statistics.
On the Operational Analysis page, you can query data, such as the bandwidth and traffic, back-to-origin bandwidth and traffic, unique visitors (UVs), and user distribution. For more information, see Resource monitoring.
On the Real-time Monitoring page, you can query the monitoring data, such as the stream ingest bandwidth and traffic. For more information, see Real-time monitoring.
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. The monitoring data is returned every second in real time, including the frame rates of received audio and video from a streamer to points of presence (POPs), audio and video timestamps, sequence headers, audio and video bitrates (in Kbit/s), maximum audio and video frame intervals (in milliseconds), error codes for interrupted stream ingest, and real-time logs. You can monitor a live stream in real time by checking the status of the stream every second to determine the stability of stream ingest. This reduces issues that are caused by video stuttering.
You can perform the following steps to check the stream ingest quality in the ApsaraVideo Live console. You can also call the DescribeLiveDomainFrameRateAndBitRateData operation to query the bitrates and frame rates 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 Search.
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 earlier monitoring data, select Last 30 Minutes or Last 1 Hour. You can also select Custom to specify a custom time period. The monitoring data of up to the last 24 hours can be queried.
The following tables describe the metric details.
Stream details
Metric | Description | Scenario |
Ingest URL | The ingest URL of the streamer. Format: 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. |
Streamer 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. Format: {Video codec ID}{Resolution}/{Audio codec ID}{Audio sampling rate}. The server collects the video codec ID, resolution, audio codec ID, and audio sampling 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 or interrupted stream ingest occurs. |
Frame rates of received audio and video from a streamer to POPs
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 a second, the value is -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 a second, the value is -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 Frame 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
Real-time log delivery allows you to collect logs within seconds after they are generated. This way, you can 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, choose
.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 |
(Real-time) Streaming Bandwidth/Traffic | Displays the real-time traffic and bandwidth of a streaming domain within a specific 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 specific 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.
|
User Distribution | Displays the distribution of regions in which 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.
|
Domain Ranking | 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 specific time period. |