By using AWS re:Post, you agree to the AWS re:Post Terms of Use

Hosting videos in S3 bucket

0

Hi, we host our videos in the S3 bucket. But we experience that load-time of the videos on our website is quite slow. What can we do to make load-time muck faster?

asked 11 days ago30 views
4 Answers
1

Hi,

This tutorial described exactly what you should be doing:

https://docs.aws.amazon.com/AmazonS3/latest/userguide/tutorial-s3-cloudfront-route53-video-streaming.html

Follow all steps to accelerate your video streaming

Best

Didier

profile pictureAWS
EXPERT
answered 10 days ago
profile picture
EXPERT
reviewed 10 days ago
0

Hi Paul, If you are streaming your videos directly from the S3 bucket you should consider adding a CDN in front of the S3 bucket. This change will allow you to cache the content closer to the viewers leading to faster load times. See the following documentation: https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/on-demand-streaming-video.html

Consider encoding your video assets to allow for HLS adaptive bitrate, see the following workshop on how to use AWS Elemental MediaConvert to automate video encoding and stream video assets thru CloudFront: https://studio.us-east-1.prod.workshops.aws/preview/cb172534-d59d-41d1-a9b3-371039593c63/builds/4e0d9dd0-5a45-4d09-81ae-c2ec9496e06d/en-US

AWS
answered 11 days ago
profile picture
EXPERT
reviewed 10 days ago
0

To improve the load time of videos hosted in your S3 bucket, there are several strategies you can implement:

  1. Use Amazon CloudFront: Implement a Content Delivery Network (CDN) like Amazon CloudFront to cache and distribute your videos globally. This can significantly reduce latency by serving content from edge locations closer to your audience.

  2. Optimize video encoding: Ensure your videos are properly encoded and compressed for web delivery. Use modern video codecs like H.264 and optimize settings for streaming playback. Consider implementing adaptive bitrate streaming techniques like HLS (HTTP Live Streaming) or DASH (Dynamic Adaptive Streaming over HTTP) to provide different quality levels based on the viewer's internet connection.

  3. Enable S3 Transfer Acceleration: This feature can help accelerate content transfer to S3 by using optimized network paths and edge locations, potentially improving the speed of video delivery to your audience.

  4. Implement file chunking: Break large video files into smaller chunks and use adaptive bitrate streaming. This allows users to start watching videos more quickly and adjust quality based on their internet connection speed.

  5. Check S3 bucket region: Ensure that your S3 bucket is in the same AWS region as the majority of your audience to minimize latency and improve data transfer speeds.

  6. Enable byte-range requests: This allows viewers to request specific portions of a video file, which can improve the responsiveness of video playback, especially for seeking within the video.

  7. Consider using AWS Amplify Hosting: While primarily for static websites, Amplify Hosting can provide a more streamlined deployment process and automatically set up a CDN, which could benefit your video hosting setup.

By implementing these optimizations, you should see a significant improvement in the load time of your videos hosted on S3.
Sources
Videos are lagging and too slow to load | AWS re:Post
Tutorial: Hosting on-demand streaming video with Amazon S3, Amazon CloudFront, and Amazon Route 53 - Amazon Simple Storage Service
Simplify and enhance Amazon S3 static website hosting with AWS Amplify Hosting | AWS News Blog

profile picture
answered 11 days ago
profile picture
EXPERT
reviewed 10 days ago
0

Really great advice Gary! Thanks, all the best Paul

answered 10 days ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions