Reputation: 1430
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
Upvotes: 2
Views: 2543
Reputation: 25
The truth is there Will be user's videos as well, So without transcoding on aws it Will be hard.
If you run ffmpeg via a layer in a aws lambda function, then you can do transcoding without ever leaving aws. I hope this helps.
Upvotes: 0
Reputation: 4461
Serving a MP4 file directly from S3 can be a problem, typically a browser will first make a GET request to know the Content-Length and then makes a lot of partial GET range requests (with 206 response) to fetch and play the MP4 file. This is a typical case of serving an MP4 file from S3.
I would suggest use Dash/HLS player, free players are available and you don't need transcoder if you can use ffmpeg.
Upvotes: 0
Reputation: 4207
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:
OR
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
Upvotes: 3