AWS for M&E Blog

Quality metrics for live streaming video

In the realm of digital streaming, efficient video encoding is critical in achieving optimal performance and cost-effective transmission to end-user devices. However, video encoding introduces the potential for quality loss, leading to a subpar end-user experience. This concern is further exacerbated in the realm of live streaming, where latency is a critical factor, and only a small content chunk is available for inspection at any given moment.

Live streaming, with its real-time nature, demands a nuanced approach to quality assessment, especially when considering the limited time available for inspecting content chunks.

In this blog post, we delve into a comprehensive solution built on the foundation of the Amazon Web Services (AWS) serverless stack. This solution not only addresses the challenges inherent to live streaming but also provides a scalable and efficient framework for live streaming scenarios. By leveraging the power of serverless architecture, we aim to strike a balance between ensuring minimal latency and maintaining a superior level of video quality.

Solution overview

This blog post outlines a solution crafted through an event-driven serverless mechanism to meticulously evaluate each frame of video content. The evaluation involves measuring the quality of each frame using standard video quality metrics such as peak-signal-to-noise ratio (PSNR), structural similarity index (SSIM), and perceptual video quality score (VMAF). By employing these metrics, the solution introduces objective quality assessments, eliminating subjectivity and offering clear, quantifiable insights into video quality.

This video analysis solution provides detailed quality measurements for each frame of a video file or live stream. It delivers granular metrics that pinpoint issues in the visual quality on a moment-by-moment basis. By scrutinizing every frame, the solution ensures adherence to stringent quality standards, detecting even subtle imperfections. It can analyse both pre-recorded and live streaming video in near-real-time. For video-on-demand assets, it identifies quality flaws that should be addressed. For live streams, it enables platforms to monitor quality continuously and make optimizations on the fly to maintain optimal video quality throughout the viewing experience. This per-frame analysis empowers video creators, media companies, and streaming services to deliver flawless video quality to their audiences.

Following is a high-level schematic view of the solution using AWS managed services.

Solution architecture for video quality metrics of a live stream

The following section provides a brief synopsis of each of the steps in the quality metrics processor pipeline:

1.     Data capture and storage: The solution begins by ingesting transcoded HLS VOD/Live content into an Amazon S3 bucket.

2.     Event driver: AWS Lambda triggered based on object create notification.

3.     Trigger video quality analysis: AWS Lambda fetches the mapped passthrough segment and initiates the AWS Batch Job to measure the video quality metrics.

4.     Compute video quality: AWS Batch Fargate job captures all the video quality metrics frame by frame and stores the captured metrics onto Amazon OpenSearch Service by frame indexing.

5.     Reporting and visualization: Amazon OpenSearch Service provides dashboard visualization to view the quality metrics frame by frame to make informed discussions.

An AWS workshop details each of the solution components outlined previously. We encourage our blog readers to explore and adopt this solution into their content workflow.

Conclusion

This blog outlines a detailed walkthrough of how a video quality measurement pipeline can be deployed on a managed set of AWS services such as Amazon OpenSearch and AWS Batch. We explore well-established video quality metrics such as VMAF, SSIM and PSNR and articulate an approach for their calculation for both live and on-demand video streams, and at frame-level accuracy. We believe our customers will benefit from the easy adoption of this solution by following the detailed steps.

This pipeline can be extended to assess other aspects of a video stream, such as absence of audio, audio-visual synchronization, or even content moderation use cases.

Maheshwaran G

Maheshwaran G

Maheshwaran G is a Specialist Solution Architect working with Media and Entertainment supporting Media companies in India to accelerate growth in an innovative fashion leveraging the power of cloud technologies. He is passionate about innovation and currently holds 8 USPTO and 7 IPO granted patents in diversified domains.

Martin Brehm

Martin Brehm

Martin Brehm is a Senior Solutions Architect at AWS. He is a passionate builder who supports global companies on their journey to the cloud not just with his expertise, but by challenging assumptions and the status quo.

Punyabrota Dasgupta

Punyabrota Dasgupta

Punyabrota Dasgupta is a principal solutions architect at AWS. His area of expertise includes machine learning applications for media and entertainment business. Beyond work, he loves tinkering and restoration of antique electronic appliances