从S3存储桶流式传输视频 [英] Streaming videos from S3 bucket

查看:503
本文介绍了从S3存储桶流式传输视频的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用Node.js服务器进行视频流传输.我已将Amazon S3存储桶用作视频存储.当nodejs在Amazon EC2实例中运行时.为了响应客户端的请求流式传输特定的视频文件,需要先将文件从S3存储桶下载到EC2实例(nodejs服务器),这是一个耗时的过程,客户端必须在第一个客户端之前等待几秒钟.视频片段从nodejs发送到客户端.我正在寻找一种删除下载时间间隔的方法. 我的问题是:

I am working on video streaming with nodejs server. I have used Amazon S3 bucket as video storage. While nodejs is running in an Amazon EC2 instance. In order to stream a specific video file in response to a client's request, the file needs to be downloaded from S3 bucket to EC2 instance (nodejs server) first, which is a time consuming process and client has to wait for several seconds before the first video segment is sent from nodejs to client. I am looking for a way to remove the downloading time interval. My questions are :

1#是否可以直接从S3存储桶中流式传输?

1# Is there a way to directly stream from S3 bucket?

2#S3存储是否允许获取存储文件的小块而不是下载整个文件?

2# Does S3 storage allows to get small chunks of stored file instead of downloading the whole file?

注意:视频流应该由iOS视频播放器使用. 我是视频流和S3存储的新手.

Note : Video stream is supposed to be used by iOS video players. I am a newbie to video streaming and S3 storage.

在这种情况下,建议我最好的解决方案.

Kindly suggest me the best possible solution in this scenario.

推荐答案

您需要使用以下AWS服务以标准方式从S3存储桶中实现点播视频流.

You need to use the following AWS services to achieve on-demand video streaming from S3 bucket in a standard way.

1)Amazon Elastic Transcoder

Amazon Elastic Transcoder是云中的媒体转码.它旨在为开发人员和企业提供一种高度可扩展,易于使用且具有成本效益的方式,以将媒体文件从其源格式转换(或转码")为可在智能手机,平板电脑和PC等设备上播放的版本./p>

Amazon Elastic Transcoder is media transcoding in the cloud. It is designed to be a highly scalable, easy to use and a cost effective way for developers and businesses to convert (or "transcode") media files from their source format into versions that will playback on devices like smartphones, tablets and PCs.

将视频文件转换为HLS格式(支持最广泛的视频 流协议)

Convert your video files to HLS format (the most widely supported streaming protocol)

2)Amazon CloudFront –内容交付网络(CDN)

Amazon CloudFront是一项全球内容交付网络(CDN)服务,可加速您的网站,API,视频内容或其他Web资产的交付.它与其他Amazon Web Services产品集成在一起,为开发人员和企业提供了一种简便的方法来加速向最终用户提供的内容,而没有最低使用承诺.

Amazon CloudFront is a global content delivery network (CDN) service that accelerates delivery of your websites, APIs, video content or other web assets. It integrates with other Amazon Web Services products to give developers and businesses an easy way to accelerate content to end users with no minimum usage commitments.

CloudFront来准备文件并将其交付给播放器

CloudFront to prepare and deliver files to their player

相关链接:-

using-amazon-cloudfront-for-video流

设置视频流的步骤

这篇关于从S3存储桶流式传输视频的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆