November 16th, 2024

Delivering 15TB of 4K video with Cloudflare R2 for $2.18

The company delivers 4K video content for $2.18 monthly using Cloudflare R2, serving over 15 terabytes of video and employing adaptive bitrate streaming for smooth playback and efficient file management.

Read original articleLink Icon
Delivering 15TB of 4K video with Cloudflare R2 for $2.18

the company successfully delivers 4K video content using Cloudflare R2 at a minimal cost of $2.18 per month. They serve over 15 terabytes of video monthly, with plans to increase bandwidth due to new course offerings. The decision to use Cloudflare R2 was driven by the need for a reliable, developer-friendly, and affordable video hosting solution. Unlike traditional video hosting services that charge high fees based on bandwidth and storage, Cloudflare R2 offers free egress bandwidth, making it a cost-effective choice. The company employs adaptive bitrate streaming using HTTP Live Streaming (HLS) to ensure smooth playback across varying internet speeds. They utilize FFmpeg for video encoding and rclone for uploading to Cloudflare R2, allowing for efficient management of video files. The integration of HLS.js ensures compatibility across different browsers, enhancing user experience. Overall, this approach allows the company to maintain high video quality while keeping costs low.

- The company delivers 4K video content for $2.18/month using Cloudflare R2.

- They serve over 15 terabytes of video monthly and plan to increase bandwidth.

- Cloudflare R2 offers free egress bandwidth, making it more affordable than traditional video hosting services.

- Adaptive bitrate streaming via HLS is used to ensure smooth playback for users with varying internet speeds.

- FFmpeg and rclone are utilized for video encoding and file management, respectively.

Link Icon 8 comments
By @pjfin123 - 2 months
Cloudflare R2 has been huge for my open source project Argos Translate. Two years ago I was getting swamped with $250/mo+ bandwidth bills for a project with minimal revenue. Now I distribute 10TB+ per month of model weights for $0. I'm still on the free plan
By @mappu - 2 months
Depending on your content, switching from `-preset veryfast` to `veryslow` could let you drop the bitrate by as much as 20-30% at the same visual quality. Your users will thank you for it,
By @jauntywundrkind - 2 months
$2.18 / 0.015$/GB*mo comes to 143 GB months of store data.

This would ignore the upload costs and any API costs.

By @langsoul-com - 2 months
This price is solely to deliver 15tb of video.

Don't get confused like other commenter.

By @john-baker-11 - 2 months
Good read. I thought you were talking about cloudflare stream which charges similar to other comparisons you drew in the blog.

This works because you dont have complexity of real time encoding, muxing. It quickly becomes a complex infra to manage if we do that ourselves.

I am curious what CDN are you using and what are rough configs?

By @ndiddy - 2 months
The article title is somewhat misleading. The "15 terabyte" figure refers to the amount of bandwidth used, not the amount of video being stored (it's closer to 145 GB).
By @peter_d_sherman - 2 months
By @Tiberium - 2 months
Can anyone explain how this is possible when most other providers charge huge costs for egress? Is Cloudflare operating at a loss here?