Media Insights on AWS is a development framework for building serverless applications that process video, images, audio, and text on AWS. It takes care of workflow orchestration and data persistence so that you can focus on workflow development. By addressing the concerns of running workflows, Media Insights on AWS empowers you to build applications faster with the benefit of inheriting a pre-built and robust back end.
Media Insights on AWS has been successfully used in a variety of scenarios, such as:
For additional details and sample use cases, refer to How to Rapidly Prototype Multimedia Applications on AWS with the Media Insights on AWS on the AWS Media blog.
This repository contains the Media Insights on AWS back-end framework. Users interact with the framework through REST APIs or by invoking Lambda functions directly. You will not find a graphical user interface (GUI) in this repository, but a reference application for Media Insights on AWS that includes a GUI is in the Content Localization repository.
You can deploy Media Insights on AWS in your AWS account with the following Cloud Formation templates. The Cloud Formation stack name must be 12 or fewer characters long.
Region | Launch |
---|---|
US East (N. Virginia) | ![]() |
US West (Oregon) | ![]() |
EU West (Ireland) | ![]() |
The Cloud Formation options for these one-click deploys are described in the installation parameters section.
Run the following commands to build and deploy Media Insights on AWS from scratch. Be sure to define values for MI_STACK_NAME
and REGION
first.
REGION=[specify a region]
MI_STACK_NAME=[specify a stack name]
git clone https://github.com/aws-solutions/media-insights-on-aws
cd media-insights-on-aws
cd deployment
VERSION=0.0.0
DATETIME=$(date '+%s')
DIST_OUTPUT_BUCKET=media-insights-on-aws-$DATETIME
aws s3 mb s3://$DIST_OUTPUT_BUCKET-$REGION --region $REGION
aws s3 mb s3://$DIST_OUTPUT_BUCKET --region $REGION
./build-s3-dist.sh --template-bucket $DIST_OUTPUT_BUCKET --code-bucket $DIST_OUTPUT_BUCKET --version $VERSION --region $REGION
TEMPLATE={copy "Template to deploy" link from output of build script}
aws cloudformation create-stack --stack-name $MI_STACK_NAME --template-url $TEMPLATE --region $REGION --capabilities CAPABILITY_IAM CAPABILITY_NAMED_IAM CAPABILITY_AUTO_EXPAND --disable-rollback
If you're building applications on Media Insights on AWS then you will need to understand the following resources in the Outputs tab of the Cloud Formation stack:
You are responsible for the cost of the AWS services used while running this solution. The cost for running this solution with the default settings in the us-east-1 (N. Virginia) region is approximately $24 per month without free tiers, or $13 per month with free tiers for 100 workflow runs. Most use cases are covered by the free tier for all AWS services except Amazon Kinesis and AWS Lambda. The costs for the Amazon Kinesis data stream ($12.56/mo) and the Workflow Scheduler lambda ($3.73/mo) will remain relatively unchanged, regardless of how many workflows execute.
AWS Service | Quantity | Cost |
---|---|---|
Amazon API Gateway | 1 million workflows | $3.50 / mo |
Amazon Dynamo DB | 1 million workflows | $.025 / mo |
AWS Lambda | 100 workflows | $4.75 / mo |
Amazon Kinesis | 100 workflows | $12.56 / mo |
Amazon SQS | 1 million workflows | $0.40 / mo |
Amazon SNS | n/a | No charge |
Amazon S3 | 100 workflows | $2.3 / mo |
AWS Xray | 100 workflows | $.0005 / mo |
These cost estimates are based on workflows processing live action videos 10 minutes in duration. Each additional 100 workflow executions will cost roughly $2, or higher for videos longer than 10 minutes and lower for videos shorter than 10 minutes.
The Cloud Formation stack name for Media Insights on AWS must be 12 or fewer characters long. This will ensure all the resources in the stack remain under the maximum length allowed by Cloud Formation.
Media Insights on AWS does not inherently limit media attributes such as file size or video duration. Those limitations depend on the services used in user-defined workflows. For example, if a workflow uses Amazon Rekognition, then that workflow will be subject to the limitations listed in the guidelines and quotas for Amazon Rekognition. For those who use the Amazon Rekognition service within workflows, be aware about use cases that involve public safety and the general AWS Service Terms.
Deploying Media Insights on AWS builds the following environment in the AWS Cloud:
The AWS CloudFormation template provisions the following resources:
Resource: An Amazon API Gateway resource for the control plane REST API
Execution flow: This is the entry point where requests to create, read, update, delete (CRUD), or execute workflows begin.
Resource: AWS Lambda and Amazon Simple Queue Service (Amazon SQS) resources to support workflow orchestration and translating user-defined workflows into AWS Step Functions
Execution flow: Requests for workflow CRUD will finish in this step after an AWS Lambda function updates workflow related tables in DynamoDB. Requests to execute workflows will begin in this step by an AWS Lambda function that saves the request to an SQS queue, which is later read and executed by an AWS Lambda function (called, the workflow scheduler) that controls how many workflows can run at the same time.
Resource: Amazon DynamoDB tables to store workflow-related data, such as state machine definitions for operators, workflow configurations, and workflow execution status.
Resource: Step function resources in AWS Step Functions
Execution flow: When a user defines a new workflow using the workflow API, then an AWS Lambda function creates an executable step function resource in AWS Step Function. When the workflow scheduler starts a workflow, it starts that step function resource, which then invokes a series of AWS Lambda functions that call external services and/or download results from those services. When all the AWS Lambda functions in a workflow have finished execution, then an AWS Lambda function is called to update the workflow status in Amazon DynamoDB.
Resource: AWS Lambda functions for using the following commonly used services in workflows: Amazon Rekognition, Amazon Comprehend, Amazon Translate, Amazon Transcribe, Amazon Polly, and AWS Elemental MediaConvert
Execution flow: Operators consist of AWS Lambda functions that call external services and/or download results from those services. They are invoked by a state machine in AWS Step Functions, as prescribed by the workflow definition. These AWS Lambda functions save results to long-term storage via the data plane REST API.
Resource: An Amazon API Gateway resource for the data plane REST API
Execution flow: Operators save results to long-term storage by calling this API.
Resource: Amazon Simple Storage Service (Amazon S3), DynamoDB, and DynamoDB Streams for media and metadata data storage
Execution flow: The AWS Lambda function behind the data plane API directly accesses Amazon S3 and Amazon DynamoDB to perform incoming CRUD requests. That AWS Lambda function saves files, such as binary media files or JSON metadata files, in Amazon S3. A pointer to those files is saved in an Amazon DynamoDB table. Finally, a time-ordered sequence of modifications to that table are saved in an Amazon DynamoDB Stream and an Amazon Kinesis Data stream.
Resource: An Amazon Kinesis Data stream for interfacing with external applications
Execution flow: The Amazon Kinesis Data Streams provides an interface for external applications to access data stored in the data plane. This interface is appropriate for feeding downstream data stores, such as the Amazon Elasticsearch Service or Amazon Neptune, that support specialized data access patterns required by end-user applications. In order to feed a downstream data store, you must implement a consumer (e.g. an AWS Lambda function) that consumes records from the data stream and performs the necessary extract, transform, and load (ETL) tasks needed for the external application.
NOTE: The ETL tasks that feed downstream data stores are entirely use-case dependent and therefore must be user-defined. The Implementation Guide includes detailed instructions for implementing ETL functions in Media Insights on AWS.
Workflow API: Use the workflow API to create, update, delete, execute, and monitor workflows.
Control plane: The control plane includes the workflow API and state machines for workflows. Workflow state machines are composed of operators from the Media Insights on AWS operator library. When operators within the state machine are run, they interact with the Media Insights on AWS data plane to store and retrieve derived asset and metadata generated from the workflow.
The control plane uses the following Amazon DynamoDB tables store workflow-related data:
Workflow
– This table records user-defined workflows.Workflow Execution
– This table records the details of every workflow run.Operations
– This table records details for each operator in the operator library, such as references to Lambda functions and default runtime parameters.Stage
– This table records the auto-generated AWS Step Functions code needed for each operator.System
– This table records system-wide configurations, such as maximum concurrent workflows.Operators: Operators are generated state machines that call AWS Lambda functions to perform media analysis or media transformation tasks. Users can define custom operators, but the Media Insights on AWS operator library includes the following pre-built operators:
Celebrity Recognition
- An asynchronous operator to identify celebrities in a video using Amazon Rekognition.Content Moderation
- An asynchronous operator to identify unsafe content in videos using Amazon Rekognition.Face Detection
- An asynchronous operator to identify faces in videos using Amazon Rekognition.Face Search
- An asynchronous operator to identify faces from a custom face collection in videos using Amazon Rekognition.Label Detection
- An asynchronous operator to identify objects in a video using Amazon Rekognition.Person Tracking
- An asynchronous operator to identify people in a video using Amazon Rekognition.Shot Detection
- An asynchronous operator to identify camera shots in a video using Amazon Rekognition.Text Detection
– An asynchronous operator to identify text in a video using Amazon Rekognition.Technical Cue Detection
– An asynchronous operator to identify technical cues such as end credits, color bars, and black bars in a video using Amazon Rekognition.Comprehend Key Phrases
– An asynchronous operator to find key phrases in text using Amazon Comprehend.Comprehend Entities
– An asynchronous operator to find references to real-world objects, dates, and quantities in text using Amazon Comprehend.Create SRT Captions
– A synchronous operator to generate SRT formatted caption files from a video transcript generated by Amazon Transcribe.Create VTT Captions
- A synchronous operator to generate VTT formatted caption files from a video transcript generated by Amazon Transcribe.Media Convert
- An asynchronous operator to transcode input video into mpeg4 format using AWS Elemental MediaConvert.Media Info
– A synchronous operator to read technical tag data for video files.Polly
- An asynchronous operator that turns input text into speech using Amazon Polly.Thumbnail
- An asynchronous operator that generates thumbnail images for an input video file using AWS Elemental MediaConvert.Transcribe
- An asynchronous operator to convert input audio to text using Amazon Transcribe.Translate
- An asynchronous operator to translate input text using Amazon Translate.Data plane: This stores the media assets and metadata generated by workflows. Implement a consumer of the Kinesis data stream in the data plane to extract, transform, and load (ETL) data from the master data store to downstream databases that support the data access patterns required by end-user applications.
Data plane API: This API is used to create, update, delete, and retrieve media assets and metadata.
Data plane pipeline: This pipeline stores metadata for an asset that can be retrieved using an object's AssetId
and Metadata
type. Writing data to the pipeline initiates a copy of the data to be stored in Kinesis Data Streams. This data stream is the interface that end-user applications can connect to use data stored in the data plane.
Data pipeline consumers: Changes to the data plane DynamoDB table are reflected in an Amazon Kinesis data stream. For each record in that stream, data pipeline consumers perform the necessary extract, transform, and load (ETL) tasks needed to replicate data, such as media metadata, to the data stores used by external applications. These ETL tasks are entirely use-case dependent and therefore must be user-defined. The Implementation Guide includes detailed instructions for implementing data pipeline consumers.
You can deploy Media Insights on AWS in your AWS account with the one-click deploy buttons shown above.
Stack Name: The name of the stack. This must be 12 or fewer characters long.
Parameter | Default | Description |
---|---|---|
MaxConcurrentWorkflows | 5 | Identifies the maximum number of workflows to run concurrently. When the maximum is reached, additional workflows are added to a wait queue. If too high, then workflows may fail due to external service quotas. Recommended range is 2 to 5. |
DeployAnalyticsPipeline | true | Determines whether to deploy a data streaming pipeline that can be consumed by external applications. By default, this capability is activated when the solution is deployed. Set to false to deactivate this capability. |
DeployTestWorkflow | false | Determines whether to deploy test resources that contain Lambda functions required for integration and end-to-end testing. By default, this capability is deactivated. Set to true to activate this capability. |
EnableXrayTrace | false | Determines whether to activate Active Xray tracing on all entry points to the stack. By default, this capability is deactivated when the solution is deployed. Set to true to activate this capability. |
ExternalBucketArn | `` | The ARN for Amazon S3 resources that exist outside the stack which may need to be used as inputs to the workflows. The ARN must be a valid Amazon S3 ARN and must reference the same AWS account that is used for the stack. By default, ExternalBucketArn will be blank, meaning workflows will only be able to input media files from the data plane bucket. |
Join our Gitter chat at https://gitter.im/awslabs/aws-media-insights-engine! This public chat forum was created to foster communication between Media Insights on AWS developers worldwide.
For instructions on how to build applications with Media Insights on AWS, read the API reference and builder's guide in the Implementation Guide.
Media Insights on AWS uses AWS_IAM to authorize REST API requests. The following screenshot shows how to test authentication to the Media Insights on AWS API using Postman. Be sure to specify the AccessKey
and SecretKey
for your own AWS environment.
For more information, see the Implementation Guide.
Amazon Macie can help you discover and protect sensitive data in AWS. If your use-case generates and stores sensitive data to Amazon S3, we recommend that you
字节跳动发布的AI编程神器IDE
Trae是一种自适应的集成开发环境(IDE),通过自动化和多元协作改变开发流程。利用Trae,团队能够更快速、精确地编写和部署代码,从而提高编程效率和项目交付速度。Trae具备上下文感知和代码自动完成功能,是提升开发效率的理想工具。
AI小说写作助手,一站式润色、改写、扩写
蛙蛙写作—国内先进的AI写作平台,涵盖小说、学术、社交媒体等多场景。提供续写、改写、润色等功能,助力创作者高效优化写作流程。界面简洁,功能全面,适合各类写作者提升内容品质和工作效率。
全能AI智能助手,随时解答生活与工作的多样问题
问小白,由元石科技研发的AI智能助手,快速准确地解答各种生活和工作问题,包括但不限于搜索、规划和社交互动,帮助用户在日常生活中提高效率,轻松管理个人事务。
实时语音翻译/同声传译工具
Transly是一个多场景的AI大语言模型驱动的同声传译、专业翻译助手,它拥有超精准的音频识别翻译能力,几乎零延迟的使用体验和支持多国语言可以让你带它走遍全球,无论你是留学生、商务人士、韩剧美剧爱好者,还是出国游玩、多国会议、跨国追星等等,都可以满足你所有需要同传的场景需求,线上线下通用,扫除语言障碍,让全世界的语言交流不再有国界。
一键生成PPT和Word,让学习生活更轻松
讯飞智文是一个利用 AI 技术的项目,能够帮助用户生成 PPT 以及各类文档。无论是商业领域的市场分析报告、年度目标制定,还是学生群体的职业生涯规划、实习避坑指南,亦或是活动策划、旅游攻略等内容,它都能提供支持,帮助用户精准表达,轻松呈现各种信息。
深度推理能力全新升级,全面对标OpenAI o1
科大讯飞的星火大模型,支持语言理解、知识问答和文本创作等多功能,适用于多种文件和业务场景,提升办公和日常生活的效率。讯飞星火是一个提供丰富智能服务的平台,涵盖科技资讯、图像创作、写作辅助、编程解答、科研文献解读等功能,能为不同需求的用户提供便捷高效的帮助,助力用户轻松获取信息、解决问题,满足多样化使用场景。
一种基于大语言模型的高效单流解耦语音令牌文本到语音合成模型
Spark-TTS 是一个基于 PyTorch 的开源文本到语音合成项目,由多个知名机构联合参与。该项目提供了高效的 LLM(大语言模型)驱动的语音合成方案,支持语音克隆和语音创建功能,可通过命令行界面(CLI)和 Web UI 两种方式使用。用户可以根据需求调整语音的性别、音高、速度等参数,生成高质量的语音。该项目适用于多种场景,如有声读物制作、智能语音助手开发等。
AI助力,做PPT更简单!
咔片是一款轻量化在线演示设计工具,借助 AI 技术,实现从内容生成到智能设计的一站式 PPT 制作服务。支持多种文档格式导入生成 PPT,提供海量模板、智能美化、素材替换等功能,适用于销售、教师、学生等各类人群,能高效制作出高品质 PPT,满足不同场景演示需求。
选题、配图、成文,一站式创作,让内容运营更高效
讯飞绘文,一个AI集成平台,支持写作、选题、配图、排版和发布。高效生成适用于各类媒体的定制内容,加速品牌传播,提升内容营销效果。
专业的AI公文写作平台,公文写作神器
AI 材料星,专业的 AI 公文写作辅助平台,为体制内工作人员提供高效的公文写作解决方案。拥有海量公文文库、9 大核心 AI 功能,支持 30 + 文稿类型生成,助力快速完成领导讲话、工作总结、述职报告等材料,提升办公效率,是体制打工人的得力写作神器。
最新AI工具、AI资讯
独家AI资源、AI项目落地
微信扫一扫关注公众号