简体   繁体   English

通过 AWS 播放 webm 与 HLS 视频之间的区别

[英]Difference between playing webm vs HLS video over AWS

Im building an webapp which does screen recording, have it stored and played back on demand.我正在构建一个 web 应用程序,它可以进行屏幕录制、存储和按需播放。

The recording is happening as .webm which is being streamed to S3 bucket via a multipart upload.录制以 .webm 的形式发生,该 .webm 通过分段上传流式传输到 S3 存储桶。 I'm using AWS MediaConvert to convert .webm to HLS format for the video on demand.我正在使用 AWS MediaConvert 将 .webm 转换为 HLS 格式的视频点播。 Problem is I need the video immediately available whereas the video conversion can take a few minutes.问题是我需要立即可用的视频,而视频转换可能需要几分钟。

Currently my approach is to provide .webm file for immediate viewing until the conversion happens after which the switch over is done to HLS.目前我的方法是提供 .webm 文件以供立即查看,直到发生转换,然后切换到 HLS。

Is this approach sound?这种方法合理吗? What are the inherent drawbacks of this besides a higher bitrate and bandwidth considerations?除了更高的比特率和带宽考虑之外,这样做的固有缺点是什么?

I don't want to switch to Amazon MediaLive unless it's absolutely essential.除非绝对必要,否则我不想切换到 Amazon MediaLive。

As you initially alluded to, your current approach is a viable option however there are bandwidth and bitrate considerations to keep in mind.正如您最初提到的那样,您当前的方法是一个可行的选择,但是需要牢记带宽和比特率注意事项。 One potential caveat / 'gottcha' as well is that you may have to set the content type and disposition to "video/webm" and "inline" in order for the webm.一个潜在的警告/“gottcha”是您可能必须将内容类型和处置设置为“video/webm”和“inline”才能使用 webm。 file to be playable within the browser.文件可以在浏览器中播放。

Working with object metadata : https://docs.aws.amazon.com/AmazonS3/latest/userguide/UsingMetadata.html使用对象元数据: https ://docs.aws.amazon.com/AmazonS3/latest/userguide/UsingMetadata.html

With that said, based on your use case, you may want to consider implementing an on-the-fly video conversion workflow.话虽如此,根据您的用例,您可能需要考虑实施动态视频转换工作流程。

The example blogpost below details a serverless workflow for on-the-fly video conversion;下面的示例博文详细介绍了用于即时视频转换的无服务器工作流程; From MP4 video source files stored in an Amazon S3 bucket to HTTP Live Streaming (HLS) served through Amazon CloudFront.从存储在 Amazon S3 存储桶中的 MP4 视频源文件到通过 Amazon CloudFront 提供的 HTTP Live Streaming (HLS)。 The workflow uses Lambda@Edge function to invoke an AWS Elemental MediaConvert job.该工作流使用 Lambda@Edge 函数来调用 AWS Elemental MediaConvert 作业。

On-the-fly video conversion with Amazon CloudFront, Lambda@Edge, and AWS Elemental MediaConvert : https://aws.amazon.com/blogs/networking-and-content-delivery/on-the-fly-video-conversion-amazon-cloudfront-lambdaedge-mediaconvert/使用 Amazon CloudFront、Lambda@Edge 和 AWS Elemental MediaConvert 进行动态视频转换: https ://aws.amazon.com/blogs/networking-and-content-delivery/on-the-fly-video-conversion- amazon-cloudfront-lambdaedge-mediaconvert/

Points 5 - 8 are likely of more interest to you:第 5 - 8 点您可能更感兴趣:

  • MediaConvert receives the conversion job request, and attempts to fetch the mp4 video source from the media source S3 bucket. MediaConvert 收到转换作业请求,并尝试从媒体源 S3 存储桶中获取 mp4 视频源。
  • MediaConvert begins to generate an HLS manifest and segments. MediaConvert 开始生成 HLS 清单和分段。 It stores them in the HLS Stream S3 bucket, and continues to update the manifest until the conversion process is complete.它将它们存储在 HLS Stream S3 存储桶中,并继续更新清单,直到转换过程完成。
  • While MediaConvert initiates the conversion job, Lambda@Edge function generates an HLS manifest pointing to an intro video segment, and return it immediately.在 MediaConvert 启动转换作业时,Lambda@Edge 函数会生成一个指向介绍视频片段的 HLS 清单,并立即返回它。
  • CloudFront forwards the intro manifest back to the end user for playback. CloudFront 将介绍清单转发回最终用户进行播放。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 AWS Lightail与CodeStar有什么区别 - What is the difference between AWS lightsail vs codeStar AWS appMesh 与 Amazon ECS 有什么区别? - What is the difference between AWS appMesh Vs Amazon ECS? AWS 服务的区域性与全球性之间有什么区别? - What is the difference between an AWS service being regional vs Global? AWS Elastic Beanstalk env.yml VS.config 之间的区别 - AWS Elastic Beanstalk difference between env.yml VS .config AWS SAVING PLAN 覆盖率报告与利用率报告之间的区别 - Difference Between AWS SAVING PLAN Coverage Report vs Utilization Report 从AWS返回iOS的File vs FileStream之间的区别 - Difference between returning a File vs FileStream from AWS to iOS AWS cloudformation 中的规则与条件有什么区别? - What is the difference between Rules vs Conditions in AWS cloudformation? AWS.Logger.Log4net与AWS.Logger.AspNetCore有什么区别 - What is the difference between AWS.Logger.Log4net vs AWS.Logger.AspNetCore 在AWS DynamoDB中,使用batchGetItem与通过getItem进行迭代有何区别? - Is there any difference advantage in using batchGetItem vs iterating over getItem in AWS DynamoDB? AWS Transcribe>流式转录功能与用于实时流式音频的Kinesis Video Streams(用于音频输入)有什么区别 - What is the difference between AWS Transcribe > Streaming Transcription feature and Kinesis Video Streams(For Audio Input) for live streaming audio
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM