How Prime Video uses machine learning to ensure video quality

Detectors for block corruption, audio artifacts, and errors in audio-video synchronization are just three of Prime Video’s quality assurance tools.

Streaming video can suffer from defects introduced during recording, encoding, packaging, or transmission, so most subscription video services — such as Amazon Prime Video — continually assess the quality of the content they stream.

Manual content review — known as eyes-on-glass testing — doesn’t scale well, and it presents its own challenges, such as variance in reviewers’ perceptions of quality. More common in the industry is the use of digital signal processing to detect anomalies in the video signal that frequently correlate with defects.

Block Corruption Detection.gif
The initial version of Amazon Prime Video's block corruption detector uses a residual neural network to produce a map indicating the probability of corruption at particular image locations, binarizes that map, and computes the ratio between the corrupted area and the total image area.

Three years ago, the Video Quality Analysis (VQA) group in Prime Video started using machine learning to identify defects in captured content from devices, such as gaming consoles, TVs, and set-top boxes, to validate new application releases or offline changes to encoding profiles. More recently, we’ve been applying the same techniques to problems such as real-time quality monitoring of our thousands of channels and live events and to analyzing new catalogue content at scale.

Our team at VQA trains computer vision models to watch video and spot issues that may compromise the customer viewing experience, such as blocky frames, unexpected black frames, and audio noise. This enables us to process video at the scale of hundreds of thousands of live events and catalogue items.

An interesting challenge we face is the lack of positive cases in training data due to the extremely low prevalence of audiovisual defects in Prime Video offerings. We tackle this challenge with a dataset that simulates defects in pristine content. After using this dataset to develop detectors, we validate that the detectors transfer to production content by testing them on a set of actual defects.

An example of how we introduced audio clicks into clean audio

Clean signal.png
Waveform of the clean audio.
Clean audio

Impaired signal.png
Waveform of the audio with clicks added.
Impaired audio with artificial clicks

Spectrogram of the clean audio signal.png
Spectrogram of the clean audio.
Spectrogram of the impaired audio signal after artifical clicks have been introduced.png
Spectrogram of the audio with clicks added.

We have built detectors for 18 different types of defect, including video freezes and stutters, video tearing, synchronization issues between audio and video, and problems with caption quality. Below, we look closely at three examples of defects: block corruption, audio artifacts, and audiovisual-synchronization problems.

Block corruption

One disadvantage of using digital signal processing for quality analysis is that it can have trouble distinguishing certain types of content from content with defects. For example, to a signal processor, crowd scenes or scenes with high motion can look like scenes with block corruption, in which impaired transmission causes the displacement of blocks of pixels within the frame or causes blocks of pixels to all take the same color value.

An example of block corruption

To detect block corruption, we use a residual neural network, a network designed so that higher layers explicitly correct errors missed by the layers below (the residual error). We replace the final layer of a ResNet18 network with a 1x1 convolution (conv6 in the network diagram).

ResNet architecture.png
The architecture of the block corruption detector.

The output of this layer is a 2-D map, where each element is the probability of block corruption in a particular image region. This 2-D map is dependent upon the size of the input image. In the network diagram, a 224 x 224 x 3 image passes to the network, and the output is a 7 x 7 map. In the example below, we pass an HD image to the network, and the resultant map is 34 x 60 pixels.

In the initial version of this tool, we binarized the map and calculated the corrupted-area ratio as corruptionArea = areaPositive/totalArea. If this ratio exceeded some threshold (0.07 proved to work well), then we marked the frame as having block corruption. (See animation, above.)

In the current version of the tool, however, we move the decision function into the model, so it’s learned jointly with the feature extraction.

Audio artifact detection

“Audio artifacts” are unwanted sounds in the audio signal, which may be introduced through the recording process or by data compression. In the latter case, this is the audio equivalent of a corrupted block. Sometimes, however, artifacts are also introduced for creative reasons.

To detect audio artifacts in video, we use a no-reference model, meaning that during training, it doesn’t have access to clean audio as a standard of comparison. The model, which is based on a pretrained audio neural network, classifies a one-second audio segment as either no defect, audio hum, audio hiss, audio distortion, or audio clicks.

Currently, the model achieves a balanced accuracy of 0.986 on our proprietary simulated dataset. More on the model can be found in our paper “A no-reference model for detecting audio artifacts using pretrained audio neural networks”, which we presented at this year’s IEEE Winter Conference on Applications of Computer Vision.

An example of video with distorted audio

Audio/video sync detection

Another common quality issue is the AV sync or lip sync defect, when the audio is not in line with the video. Issues during broadcasting, reception, and playback can knock the audio and video out of sync.

To detect lip sync defects, we have built a detector — which we call LipSync — based on the SyncNet architecture from the University of Oxford.

The input to the LipSync pipeline is a four-second video fragment. It passes to a shot detection model, which identifies shot boundaries; a face detection model, which identifies the faces in each frame; and a face-tracking model, which identifies faces in successive frames as belonging to the same person.

Preprocessing pipeline-cropped.png
Preprocessing pipeline to extract face tracks — four-second clips centered on a single face.

The outputs of the face-tracking model — known as face tracks — and the correlated audio then pass to the SyncNet model, which aggregates across the face tracks to decide whether the clip is in sync, out of sync, or inconclusive, meaning there are either no faces/face tracks detected or there are an equal number of in-sync and out-of-sync predictions.

Future work

These are a select few of the detectors in our arsenal. In 2022, we continue to work on refining and improving our algorithms. In ongoing work, we’re using active learning — which algorithmically selects particularly informative training examples — to continually retrain our deployed models.

To generate synthetic datasets, we are researching EditGan, a new method that allows more precise control over the outputs of generative adversarial networks (GANs). We are also using our custom AWS cloud-native applications and SageMaker implementations to scale our defect detectors, to monitor all live events and video channels.

Research areas

Related content

US, CA, San Francisco
The Artificial General Intelligence (AGI) team is looking for a passionate, talented, and inventive Member of Technical Staff with a strong deep learning background, to build industry-leading Generative Artificial Intelligence (GenAI) technology with Large Language Models (LLMs) and multimodal systems. Key job responsibilities As a Member of Technical Staff with the AGI team, you will lead the development of algorithms and modeling techniques, to advance the state of the art with LLMs. You will lead the foundational model development in an applied research role, including model training, dataset design, and pre- and post-training optimization. Your work will directly impact our customers in the form of products and services that make use of GenAI technology. You will leverage Amazon’s heterogeneous data sources and large-scale computing resources to accelerate advances in LLMs. About the team The AGI team has a mission to push the envelope in GenAI with LLMs and multimodal systems, in order to provide the best-possible experience for our customers.
US, CA, San Francisco
The Artificial General Intelligence (AGI) team is looking for a passionate, talented, and inventive Member of Technical Staff with a strong deep learning background, to build industry-leading Generative Artificial Intelligence (GenAI) technology with Large Language Models (LLMs) and multimodal systems. Key job responsibilities As a Member of Technical Staff with the AGI team, you will lead the development of algorithms and modeling techniques, to advance the state of the art with LLMs. You will lead the foundational model development in an applied research role, including model training, dataset design, and pre- and post-training optimization. Your work will directly impact our customers in the form of products and services that make use of GenAI technology. You will leverage Amazon’s heterogeneous data sources and large-scale computing resources to accelerate advances in LLMs. About the team The AGI team has a mission to push the envelope in GenAI with LLMs and multimodal systems, in order to provide the best-possible experience for our customers.
US, CA, San Francisco
The Artificial General Intelligence (AGI) team is looking for a passionate, talented, and inventive Member of Technical Staff with a strong deep learning background, to build industry-leading Generative Artificial Intelligence (GenAI) technology with Large Language Models (LLMs) and multimodal systems. Key job responsibilities As a Member of Technical Staff with the AGI team, you will lead the development of algorithms and modeling techniques, to advance the state of the art with LLMs. You will lead the foundational model development in an applied research role, including model training, dataset design, and pre- and post-training optimization. Your work will directly impact our customers in the form of products and services that make use of GenAI technology. You will leverage Amazon’s heterogeneous data sources and large-scale computing resources to accelerate advances in LLMs. About the team The AGI team has a mission to push the envelope in GenAI with LLMs and multimodal systems, in order to provide the best-possible experience for our customers.
US, CA, San Francisco
The Artificial General Intelligence (AGI) team is looking for a passionate, talented, and inventive Member of Technical Staff with a strong deep learning background, to build industry-leading Generative Artificial Intelligence (GenAI) technology with Large Language Models (LLMs) and multimodal systems. Key job responsibilities As a Member of Technical Staff with the AGI team, you will lead the development of algorithms and modeling techniques, to advance the state of the art with LLMs. You will lead the foundational model development in an applied research role, including model training, dataset design, and pre- and post-training optimization. Your work will directly impact our customers in the form of products and services that make use of GenAI technology. You will leverage Amazon’s heterogeneous data sources and large-scale computing resources to accelerate advances in LLMs. About the team The AGI team has a mission to push the envelope in GenAI with LLMs and multimodal systems, in order to provide the best-possible experience for our customers.
US, CA, San Francisco
The Artificial General Intelligence (AGI) team is looking for a passionate, talented, and inventive Member of Technical Staff with a strong deep learning background, to build industry-leading Generative Artificial Intelligence (GenAI) technology with Large Language Models (LLMs) and multimodal systems. Key job responsibilities As a Member of Technical Staff with the AGI team, you will lead the development of algorithms and modeling techniques, to advance the state of the art with LLMs. You will lead the foundational model development in an applied research role, including model training, dataset design, and pre- and post-training optimization. Your work will directly impact our customers in the form of products and services that make use of GenAI technology. You will leverage Amazon’s heterogeneous data sources and large-scale computing resources to accelerate advances in LLMs. About the team The AGI team has a mission to push the envelope in GenAI with LLMs and multimodal systems, in order to provide the best-possible experience for our customers.
US, CA, Sunnyvale
Prime Video is a first-stop entertainment destination offering customers a vast collection of premium programming in one app available across thousands of devices. Prime members can customize their viewing experience and find their favorite movies, series, documentaries, and live sports – including Amazon MGM Studios-produced series and movies; licensed fan favorites; and programming from Prime Video add-on subscriptions such as Apple TV+, Max, Crunchyroll and MGM+. All customers, regardless of whether they have a Prime membership or not, can rent or buy titles via the Prime Video Store, and can enjoy even more content for free with ads. Are you interested in shaping the future of entertainment? Prime Video's technology teams are creating best-in-class digital video experience. As a Prime Video technologist, you’ll have end-to-end ownership of the product, user experience, design, and technology required to deliver state-of-the-art experiences for our customers. You’ll get to work on projects that are fast-paced, challenging, and varied. You’ll also be able to experiment with new possibilities, take risks, and collaborate with remarkable people. We’ll look for you to bring your diverse perspectives, ideas, and skill-sets to make Prime Video even better for our customers. With global opportunities for talented technologists, you can decide where a career Prime Video Tech takes you! We are looking for a self-motivated, passionate and resourceful Sr. Applied Scientists with Recommender System or Search Ranking or Ads Ranking experience to bring diverse perspectives, ideas, and skill-sets to make Prime Video even better for our customers. You will spend your time as a hands-on machine learning practitioner and a research leader. You will play a key role on the team, building and guiding machine learning models from the ground up. At the end of the day, you will have the reward of seeing your contributions benefit millions of Amazon.com customers worldwide. Key job responsibilities - Develop AI solutions for various Prime Video Recommendation/Search systems using Deep learning, GenAI, Reinforcement Learning, and optimization methods; - Work closely with engineers and product managers to design, implement and launch AI solutions end-to-end; - Design and conduct offline and online (A/B) experiments to evaluate proposed solutions based on in-depth data analyses; - Effectively communicate technical and non-technical ideas with teammates and stakeholders; - Stay up-to-date with advancements and the latest modeling techniques in the field; - Publish your research findings in top conferences and journals. About the team Prime Video Recommendation/Search Science team owns science solution to power search experience on various devices, from sourcing, relevance, ranking, to name a few. We work closely with the engineering teams to launch our solutions in production.
US, WA, Seattle
Amazon's Price Perception and Evaluation team is seeking a driven Principal Applied Scientist to harness planet scale multi-modal datasets, and navigate a continuously evolving competitor landscape, in order to build and scale an advanced self-learning scientific price estimation and product understanding system, regularly generating fresh customer-relevant prices on billions of Amazon and Third Party Seller products worldwide. We are looking for a talented, organized, and customer-focused technical leader with a charter to derive deep neural product relationships, quantify substitution and complementarity effects, and publish trust-preserving probabilistic price ranges on all products listed on Amazon. This role requires an individual with excellent scientific modeling and system design skills, bar-raising business acumen, and an entrepreneurial spirit. We are looking for an experienced leader who is a self-starter comfortable with ambiguity, demonstrates strong attention to detail, and has the ability to work in a fast-paced and ever-changing environment. Key job responsibilities - Develop the team. Mentor a highly talented group of applied machine learning scientists & researchers. - See the big picture. Shape long term vision for Amazon's science-based competitive, perception-preserving pricing techniques - Build strong collaborations. Partner with product, engineering, and science teams within Pricing & Promotions to deploy machine learning price estimation and error correction solutions at Amazon scale - Stay informed. Establish mechanisms to stay up to date on latest scientific advancements in machine learning, neural networks, natural language processing, probabilistic forecasting, and multi-objective optimization techniques. Identify opportunities to apply them to relevant Pricing & Promotions business problems - Keep innovating for our customers. Foster an environment that promotes rapid experimentation, continuous learning, and incremental value delivery. - Deliver Impact. Develop, Deploy, and Scale Amazon's next generation foundational price estimation and understanding system
US, WA, Seattle
Here at Amazon, we embrace our differences. We are committed to furthering our culture of diversity and inclusion of our teams within the organization. How do you get items to customers quickly, cost-effectively, and—most importantly—safely, in less than an hour? And how do you do it in a way that can scale? Our teams of hundreds of scientists, engineers, aerospace professionals, and futurists have been working hard to do just that! We are delivering to customers, and are excited for what’s to come. Check out more information about Prime Air on the About Amazon blog (https://www.aboutamazon.com/news/transportation/amazon-prime-air-delivery-drone-reveal-photos). If you are seeking an iterative environment where you can drive innovation, apply state-of-the-art technologies to solve real world delivery challenges, and provide benefits to customers, Prime Air is the place for you. Come work on the Amazon Prime Air Team! We are seeking a highly skilled Navigation Scientist to help develop advanced algorithms and software for our Prime Air delivery drone program. In this role, you will conduct comprehensive navigation analysis to support cross-functional decision-making, define system architecture and requirements, contribute to the development of flight algorithms, and actively identify innovative technological opportunities that will drive significant enhancements to meet our customers' evolving demands. Export Control License: This position may require a deemed export control license for compliance with applicable laws and regulations. Placement is contingent on Amazon’s ability to apply for and obtain an export control license on your behalf.
IN, KA, Bengaluru
Alexa+ is Amazon’s next-generation, AI-powered virtual assistant. Building on the original Alexa, it uses generative AI to deliver a more conversational, personalized, and effective experience. As an Applied Scientist II on the Alexa Sensitive Content Intelligence (ASCI) team, you'll be part of an elite group developing industry-leading technologies in attribute extraction and sensitive content detection that work seamlessly across all languages and countries. In this role, you'll join a team of exceptional scientists pushing the boundaries of Natural Language Processing. Working in our dynamic, fast-paced environment, you'll develop novel algorithms and modeling techniques that advance the state of the art in NLP. Your innovations will directly shape how millions of customers interact with Amazon Echo, Echo Dot, Echo Show, and Fire TV devices every day. What makes this role exciting is the unique blend of scientific innovation and real-world impact. You'll be at the intersection of theoretical research and practical application, working alongside talented engineers and product managers to transform breakthrough ideas into customer-facing experiences. Your work will be crucial in ensuring Alexa remains at the forefront of AI technology while maintaining the highest standards of trust and safety. We're looking for a passionate innovator who combines strong technical expertise with creative problem-solving skills. Your deep understanding of NLP models (including LSTM and transformer-based architectures) will be essential in tackling complex challenges and identifying novel solutions. You'll leverage your exceptional technical knowledge, strong Computer Science fundamentals, and experience with large-scale distributed systems to create reliable, scalable, and high-performance products that delight our customers. Key job responsibilities In this dynamic role, you'll design and implement GenAI solutions that define the future of AI interaction. You'll pioneer novel algorithms, conduct ground breaking experiments, and optimize user experiences through innovative approaches to sensitive content detection and mitigation. Working alongside exceptional engineers and scientists, you'll transform theoretical breakthroughs into practical, scalable solutions that strengthen user trust in Alexa globally. You'll also have the opportunity to mentor rising talent, contributing to Amazon's culture of scientific excellence while helping build high-performing teams that deliver swift, impactful results. A day in the life Imagine starting your day collaborating with brilliant minds on advancing state-of-the-art NLP algorithms, then moving on to analyze experiment results that could reshape how Alexa understands and responds to users. You'll partner with cross-functional teams - from engineers to product managers - to ensure data quality, refine policies, and enhance model performance. Your expertise will guide technical discussions, shape roadmaps, and influence key platform features that require cross-team leadership. About the team The mission of the Alexa Sensitive Content Intelligence (ASCI) team is to (1) minimize negative surprises to customers caused by sensitive content, (2) detect and prevent potential brand-damaging interactions, and (3) build customer trust through appropriate interactions on sensitive topics. The term “sensitive content” includes within its scope a wide range of categories of content such as offensive content (e.g., hate speech, racist speech), profanity, content that is suitable only for certain age groups, politically polarizing content, and religiously polarizing content. The term “content” refers to any material that is exposed to customers by Alexa (including both 1P and 3P experiences) and includes text, speech, audio, and video.
IN, KA, Bengaluru
Alexa+ is Amazon’s next-generation, AI-powered virtual assistant. Building on the original Alexa, it uses generative AI to deliver a more conversational, personalized, and effective experience. As an Applied Scientist II on the Alexa Sensitive Content Intelligence (ASCI) team, you'll be part of an elite group developing industry-leading technologies in attribute extraction and sensitive content detection that work seamlessly across all languages and countries. In this role, you'll join a team of exceptional scientists pushing the boundaries of Natural Language Processing. Working in our dynamic, fast-paced environment, you'll develop novel algorithms and modeling techniques that advance the state of the art in NLP. Your innovations will directly shape how millions of customers interact with Amazon Echo, Echo Dot, Echo Show, and Fire TV devices every day. What makes this role exciting is the unique blend of scientific innovation and real-world impact. You'll be at the intersection of theoretical research and practical application, working alongside talented engineers and product managers to transform breakthrough ideas into customer-facing experiences. Your work will be crucial in ensuring Alexa remains at the forefront of AI technology while maintaining the highest standards of trust and safety. We're looking for a passionate innovator who combines strong technical expertise with creative problem-solving skills. Your deep understanding of NLP models (including LSTM and transformer-based architectures) will be essential in tackling complex challenges and identifying novel solutions. You'll leverage your exceptional technical knowledge, strong Computer Science fundamentals, and experience with large-scale distributed systems to create reliable, scalable, and high-performance products that delight our customers. Key job responsibilities In this dynamic role, you'll design and implement GenAI solutions that define the future of AI interaction. You'll pioneer novel algorithms, conduct ground breaking experiments, and optimize user experiences through innovative approaches to sensitive content detection and mitigation. Working alongside exceptional engineers and scientists, you'll transform theoretical breakthroughs into practical, scalable solutions that strengthen user trust in Alexa globally. You'll also have the opportunity to mentor rising talent, contributing to Amazon's culture of scientific excellence while helping build high-performing teams that deliver swift, impactful results. A day in the life Imagine starting your day collaborating with brilliant minds on advancing state-of-the-art NLP algorithms, then moving on to analyze experiment results that could reshape how Alexa understands and responds to users. You'll partner with cross-functional teams - from engineers to product managers - to ensure data quality, refine policies, and enhance model performance. Your expertise will guide technical discussions, shape roadmaps, and influence key platform features that require cross-team leadership. About the team The mission of the Alexa Sensitive Content Intelligence (ASCI) team is to (1) minimize negative surprises to customers caused by sensitive content, (2) detect and prevent potential brand-damaging interactions, and (3) build customer trust through appropriate interactions on sensitive topics. The term “sensitive content” includes within its scope a wide range of categories of content such as offensive content (e.g., hate speech, racist speech), profanity, content that is suitable only for certain age groups, politically polarizing content, and religiously polarizing content. The term “content” refers to any material that is exposed to customers by Alexa (including both 1P and 3P experiences) and includes text, speech, audio, and video.