Amazon Rekognition
Developer Guide

Working with Stored Videos

Amazon Rekognition Video is an API that you can use to analyze videos. With Amazon Rekognition Video, you can detect labels, faces, people, celebrities, and adult (suggestive and explicit) content in videos that are stored in an Amazon Simple Storage Service (Amazon S3) bucket. You can use Amazon Rekognition Video in categories such as media/entertainment and public safety. Previously, scanning videos for objects or people would have taken many hours of error-prone viewing by a human being. Amazon Rekognition Video automates the detection of items and when they occur throughout a video.

This section covers the types of detection and recognition that Amazon Rekognition Video can perform, an overview of the API, and examples for using Amazon Rekognition Video.

Types of Detection and Recognition

You can use Amazon Rekognition Video to analyze videos for the following information:

For more information, see Amazon Rekognition: How It Works.

Amazon Rekognition Video API Overview

Amazon Rekognition Video processes a video that's stored in an Amazon S3 bucket. The design pattern is an asynchronous set of operations. You start video analysis by calling a Start operation such as StartLabelDetection. The completion status of the request is published to an Amazon Simple Notification Service (Amazon SNS) topic. To get the completion status from the Amazon SNS topic, you can use an Amazon Simple Queue Service (Amazon SQS) queue or an AWS Lambda function. After you have the completion status, you call a Get operation, such as GetLabelDetection, to get the results of the request.

The following diagram shows the process for detecting labels in a video that's stored in an Amazon S3 bucket. In the diagram, an Amazon SQS queue gets the completion status from the Amazon SNS topic. Alternatively, you can use an AWS Lambda function.

The process is the same for detecting faces and people. The following table lists the Start and Get operations for each of the non-storage Amazon Rekognition operations.

For Get operations other than GetCelebrityRecognition, Amazon Rekognition Video returns tracking information for when entities are detected throughout the input video.

For more information about using Amazon Rekognition Video, see Calling Amazon Rekognition Video Operations. For an example that does video analysis by using Amazon SQS, see Analyzing a Video Stored in an Amazon S3 Bucket with Java or Python (SDK). For AWS CLI examples, see Analyzing a Video with the AWS Command Line Interface.

Video Formats and Storage

Amazon Rekognition operations can analyze videos that are stored in Amazon S3 buckets. The video must be encoded using the H.264 codec. The supported file formats are MPEG-4 and MOV.

A codec is software or hardware that compresses data for faster delivery and decompresses received data into its original form. The H.264 codec is commonly used for recording, compressing, and distributing video content. A video file format can contain one or more codecs. If your MOV or MPEG-4 format video file doesn't work with Amazon Rekognition Video, check that the codec used to encode the video is H.264.

The maximum file size for a stored video is 8GB.

Searching for People

You can use facial metadata that's stored in a collection to search for people in a video. For example, you can search an archived video for a specific person or for multiple people. You store facial metadata from source images in a collection by using the IndexFaces operation. You can then use StartFaceSearch to start asynchronously searching for faces in the collection. You use GetFaceSearch to get the search results. For more information, see Searching Stored Videos for Faces. Searching for people is an example of a storage-based Amazon Rekognition operation. For more information, see Storage-Based API Operations.

You can also search for people in a streaming video. For more information, see Working with Streaming Videos.