htmlamazon-web-servicesamazon-s3amazon-cloudfront

AWS cloundfront video speed loading


I have s3 bucket and cloundfront connected to it. I use afterglow player to load html5 videos from cloundfront on my website. The file has 60mb in mp4 format. It lags few seconds after few seconds. What should I do ? Im not really specialist in AWS, there are no encoders connected.

Server-side encryption None


Solution

  • Given that you are already using Cloudfront, which is getting the content as close as possible to your users. I'd suggest one of the following:

    1. Create less resolutions of the same video file, which would be quick to load on slow internet connections.
    2. Add those resolutions to the player so users can pick which resolution to stream.

    OR

    1. Create a Dynamic Adaptive Streaming over HTTP (DASH) version of the file, like: "Auto Resolution" in Youtube.com by using Amazon Elastic Transcoder to create such a file and save it on AWS S3.
    2. Point AWS Cloudfront to the Amazon Elastic Transcoder destination S3 Bucket to server that file to your users.
    3. Change afterglow with a HTML5 Video player that supports DASH (e.g. mediaelement.js and others).

      This is a very helpful guide: Step by step on stream DASH on S3