Amazon S3 Hosting Streaming Video

2019-03-08 10:40发布

问题:

If I make an Amazon s3 MP4 resource publically availible and then throw the Html5 Video tag around the resource's URL will it stream? Is it really that simple. There are a lot of "encoding" api's out there such as pandastream and zencoder and I'm not sure exactly what these companies do. Do they just manage bandwidth allocation(upgrading/downgrading stream quality and delivery rate/cross-platform optimization?) Or do encoding services do more then that.

回答1:

This is Brandon from Zencoder. What you're looking for is probably something like Video JS (videojs.com) for video playback. You can just upload an MP4 to S3 and reference it in a player (or the video tag directly, but that has additional issues). Our service is actually used for transcoding the video itself, not delivery. We actually created Video JS to help our customers (and the web at large) with easy, compatible HTML5 playback. If you have any other questions just ask. Thanks.



回答2:

Answer to first part of your question is, YES it is really that simple. There is a howto about it and a working demo at the end of the article that you can see as a proof of concept.

Hope this helps.



回答3:

Amazon S3 is a really good choice for serving up video content. We've been using it for a couple of years with no issues and the cost has been unbeatable. You should also look at using Amazon CloudFront and configuring your media to use their "streaming distributions". It basically uses your S3 files but copies them to edge locations around the internet and uses RTMP to provide a better playback experience for users and to save you money on bandwidth.

http://aws.amazon.com/cloudfront/



回答4:

I just had the same question as you and was happy to see that uploading an mp4 file to S3, setting "public" permissions on it, and then using this simple HTML worked great without any additional tools. And CloudFront wasn't even necessary.

<video id="clip" controls preload=auto width=640 height=264 data-setup="{}">
    <source src="https://s3.amazonaws.com/xxxxbucketnamexxxxx/xxxxfilenamexxxx.mp4" type='video/mp4'/>        
</video>


回答5:

Amazon S3 in combination with Amazon CloudFront as scalable CDN is pretty streight forward and good to build great video solutions, even Netflix-like systems using adaptive bitrate (ABR) video in HTML5 using the Media Source Extentions with MPEG-DASH or HLS, like done by Netflix or Youtube.

Here you can find a pretty good tutorial on that: http://www.bitcodin.com/blog/2015/02/create-mpeg-dash-hls-content-for-amazon-s3-and-cloudfront/