We are hosting videos in AWS S3 in HLS format (lots of .ts files, + playlists .m3u8).
We have configured AWS CloudFront with all Edge locations to serve those files.
We have 2 apps, iOS and Android, with a video player that plays the CloudFront URL. Android app is using Google’s Exoplayer, and iOS app is using AVPlayer. They both present the same issues.
The videos play smoothly from the same region as the source S3 bucket. We had some issues at the start but we fixed them by fixing the bitrate encoding.
However customers from remote countries complained about the buffering: average of 1 minute to initially load the video, then average of 12s of buffering every minute.
So we decided to add AWS CloudFront so that the files would be cached in the Edge locations, making the videos faster to load.
But the customers kept complaining, and we were aware that it would still take a while to load for the first user.
So we set up 2 non-AWS servers in other regions that automatically download the videos, in the aim to get them cached in those 2 regions, as soon as they are published.
But it doesn’t seem to help either.
I am wondering if AWS CloudFront is effective at all for video streaming via direct download, or if we are missing something.
How to make CloudFront work to get rid of video buffering? Or if CloudFront is not the solution (why?), what should we be looking at?
Side note: We set the TTL to 10 years, just in case… and we manage invalidation manually.