Caching of Large MP4 Files for Playback

0

Hi All,

We are trying to cache large (~320MB) MP4 files that get requested from an S3 bucket. We have already set the Cache-Control to public, "max-age=31536000".

All JPG's that we set the cache to this are acting fine with this setting, but each time the MP4 is requested, the browser will request the download again, and buffer/download as the play head progresses in the timeline.

Is there something that I am missing that will make the video files play from local browser Cache, and not re-download the MP4 file each time?

These are my response headers:

"

Accept-Ranges: bytes

Cache-Control: public, max-age=31536000

Content-Length: 279422208

Content-Range: bytes 0-279422207/279422208

Content-Type: video/mp4

Date: Fri, 20 May 2022 19:36:27 GMT

ETag: "8179e6aa4fe*********************75724604407-17"

Last-Modified: Fri, 20 May 2022 19:28:03 GMT

Server: AmazonS3

x-amz-id-2: sdfsdfsdfsdfsdfsdfsdfsdfsdfsdf=

x-amz-request-id: sdfsdfsdfsdfsdfsdfsdfsdf

x-amz-server-side-encryption: AES256

x-amz-version-id: sdfsdfsdfsdfsdfsdfsdfsdf

"

Thank you in advance.

질문됨 2년 전843회 조회
1개 답변
0

I'm not sure browsers will cache mp4s, probably browser dependent. MP4s are "progressive" meaning the entire file has to download before playback begins. Typically you would package your mp4 into HLS/DASH/CMAF and stream the video segments or bit ranges. Browsers support HLS and/or DASH natively. Look into Elemental Media Packager + CloudFront CDN with your media stored on an S3 bucket.

답변함 2년 전

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인

관련 콘텐츠