Amazon S3 Hosting Streaming Video

后端 未结 6 984
爱一瞬间的悲伤
爱一瞬间的悲伤 2021-01-30 17:24

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

6条回答
  •  执笔经年
    2021-01-30 17:41

    You can encode the video yourself using a free encoder like https://HandBrake.fr . Or your video editor (I use Camtasia) should have standard encoding options.

    Regarding the video player, you have a few options...

    1) Simplest option: Upload to S3, make the file public, insert entire URL into WordPress, and it will automatically become a video player. But the player will have very basic options (no speed controls, ability to customize player controls, etc), and the URL is public, which means it's open to leeching and hotlinking and piracy.

    2) If you wish to secure the file itself, then upload to S3, make it private, make it accessible only to the root account, and then use a plugin like https://S3MediaVault.com which will create signed URL's in real-time when the page loads, and the link will expire shortly thereafter, based on how many seconds you want it to be active.

    3) And then if you want to protect the page itself, you'll have to use some kind of paywall software. So if you're using WordPress, this would be a WordPress membership plugin, which will protect the page and make one log in first using a username/password before they can access the page. And then the page will load, and signed URL's will be generated for your Video, and they can watch it from that page, or download it (if you let them).

    4) You can also create streaming videos which are a lot harder to download for most regular people, because it is no longer just a .mp4 file - it is a .m3u8 and a bunch of .ts files, which are hard for most people to figure out. And then make those too signed URL's, and the video becomes even more harder to download.

    And if you encode your streaming video using Apple's HLS technology, and set it to adaptive bit rate, then the stream will download as fast as, or as slow as, the viewer's internet connection. This can be good and bad depending on the situation, but that's an option.

提交回复
热议问题