可能使用亚马逊S3 / CloudFront的使用HTML5播放流视频? [英] Possible to stream videos using Amazon S3/CloudFront with HTML5 player?

查看:987
本文介绍了可能使用亚马逊S3 / CloudFront的使用HTML5播放流视频?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想使用HTML5视频播放器和流视频。这可能与S3 / CloudFront的?我理解亚马逊使用RTMP流媒体协议和HTML5的视频标记不支持RTMP。有没有什么办法来流视频与HTML5播放器?

I want to use an HTML5 video player and stream videos. Is this possible with S3/CloudFront? I understand Amazon uses the RTMP streaming protocol and HTML5's video tag does not support RTMP. Is there any way to stream videos with HTML5 players?

推荐答案

许多事情@Wayne Koorts发布提供了基础,一个很好的答案。它似乎脱节是,你可以通过渐进式下载流的视频。这适用于任何HTML5兼容的视频文件,如他说明。

Much of what @Wayne Koorts posted provides the basis for a good answer. The disconnect it seems is that you can "stream" video via progressive download. This works with any html5 compatible video file, as he illustrated.

为了让在MP4文件的渐进式下载最好的性能,你需要MOOV原子元数据出现在文件的开头。投保,你的MP4文件有这个属性是该qtfaststart程序附带的ffmpeg的原因之一。

In order to get the best performance in a progressive download of mp4 files, you need the moov atom meta data to appear at the beginning of the file. Insuring that your mp4 files have this property is one of the reasons that the qtfaststart program is included with ffmpeg.

当然,渐进式下载并不是一个流媒体服务器。流媒体服务器被设计为支持多种不同的功能,包括:

Of course, progressive download is not a "streaming media server". Streaming media servers were designed to support a number of different features including:

  • 安全和DRM
  • 在自适应流媒体/交织(支持多比特率交织成一个特定的文件)
  • 寻找

看来这里pssed的特别关注EX $ P $是寻求功能。碰巧的是,这是支持精细的HTML5和S3 / CloudFront的。

It seems the particular concern expressed here is the seeking feature. As it happens this is supported fine in html5 and by s3/cloudfront.

什么是混淆是视频文件CloudFront的有几个选项。一种选择是有文件被许可的Adobe FMS服务器的网络提供。这是关于使用RTMP的混乱进场。然而,这仅仅是一种选择。文件可以分布在标准的下载的形式来CloudFront的,他们将有寻求财产因字节范围和支持什么是俗称的伪流的执行。

What is confusing is that cloudfront of video files has several options. One option is to have the files delivered by their network of licensed Adobe FMS servers. This is where the confusion about the use of RTMP comes into play. However, that is only an option. Files can be distributed to cloudfront in standard "download" form and they will have the seeking property due to the implementation of byte ranges and support for what is popularly known as pseudo streaming.

似乎有很多混淆的术语伪流,但在HTML5的情况下,它只是HTTP服务器支持1.1规范的要求。当求,客户端发送一个字节范围请求,服务器负责提供这部分文件。

There seems to be a lot of confusion about the term "Pseudo streaming" but in the case of html5, it's simply the requirement that the HTTP server supports the 1.1 specification. When seeking, the client sends a byte range request and the server is responsible for delivering that portion of the file.

在换句话说......随着HTML5播放器不寻求与CloudFront的服务器的工作,因为他们是HTTP 1.1兼容。

In other words... seeking with the html5 player does work with the cloudfront servers because they are HTTP 1.1 compatible.

至于一些的其他功能的流服务器提供,有各种各样的已实施H264流动的MPEG-DASH的或元件作为替代使用RTMP和FMS兼容服务器竞争的服务器。许多基于Flash的播放器都支持这些功能,这和超越简单的追求。该JWPlayer和Flowplayer是支持一些功能或所有玩家2的例子,但是HTML5的视频播放器有任何这些功能的支持。你可以学到更多在看<一href="http://h264.$c$c-shop.com/trac#H264StreamingModuleIntroductionversion2">http://h264.$c$c-shop.com/trac#H264StreamingModuleIntroductionversion2

As for some of the other functions that streaming servers provide, there are a variety of competitive servers that have implemented "H264 streaming" or elements of MPEG-DASH as an alternative to the use of RTMP and FMS compatible servers. A number of flash based players support these functions, which go above and beyond simple seeking. The JWPlayer and Flowplayer are 2 examples of players that support some or all of the features, however HTML5's video player has no support for any of these features. You can learn more looking at http://h264.code-shop.com/trac#H264StreamingModuleIntroductionversion2

如果这还不够混乱你,苹果实现了自己的HTTP实时流的协议,有时也被称为M3U8,他们在iOS和QuickTime的支持。我提到这一点,因为频繁的人希望的方式来支持多种不同的设备。

If that's not enough confusion for you, Apple implemented their own "HTTP Live Streaming" protocol, sometimes known as m3u8, which they support in ios and quicktime. I mention this because frequently people want a way to support a variety of different devices.

我希望这有助于澄清事情有点。

I hope this helped clarify things a bit.

这篇关于可能使用亚马逊S3 / CloudFront的使用HTML5播放流视频?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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