Cloudflare Stream + Backblaze vs. GCP for Short Form Video?

3 pointsposted a month ago
by slroger

Item id: 46374754

9 Comments

gethly

a month ago

I would transcode myself. All you need is ffmpeg and a bit of code to manage the input and output files and to call ffmpeg. You can scale as needed. One VPS can do a lot of work. I am doing it myself.

Then you'll need storage(wasabi, backblaze, idrive) and CDN. Bunny CDN or Beluga CDN are, i think, one of the cheapest. Or you can build your own(I did), in case the CDN would pull too much data from origin and cause you increased costs as wasabi gives you only 1:1 egress with stored data and backblaze gives you 3:1. By that I mean that the CDN might always get the file from origin instead of sharing the file among its own nodes. So the origin would experience increased egress.

You can also rent a beefy storage VPS instead. For example, 2x 500 GB NVMe SSDs + 4x 22 TB Enterprise HDDs + 50 TB Bandwidth@2x 1Gbps costs 159€/month.

There are various ways how to do it and in the end it is up to you to pick what works for you the best. Mostly how much work you want to do yourself, how good are your programming skills and how much money you are willing to spend going forward.

slroger

a month ago

I was transcoding myself when running it on the homeserver, but the convenience of Cloudflare stream doing the transcoding is tempting. Will definitely look into this, thank you. Hadnt heard about Bunny CDN till this week. Actually I am moving from a homeserver to my own rackmount in a datacolo in about 2 months so may take this route.

charlesding2024

a month ago

I've been using Cloudflare's ecosystem heavily for my video tools and can share some thoughts:

For your use case (40s clips, 10-50K plays/day), Cloudflare Stream's per-minute pricing model could be significantly cheaper than GCP, especially as you scale. Their ABR quality is quite good for 1080p/720p - I haven't noticed quality issues in practice.

One consideration: Cloudflare Stream has a 30s minimum charge per video, so for 40s clips you're paying for 60s. This might eat into the cost savings vs GCP.

Backblaze B2 + Cloudflare has free egress which is huge, but make sure you're using the Bandwidth Alliance properly to avoid surprise charges.

Have you considered keeping source files in B2 and only using Cloudflare Stream for delivery? That hybrid approach might give you more flexibility.

slroger

a month ago

I see, yes I am planning to keep the raw video files in B2.

So about the 30 second minimum charge, my current scenario is users can record and upload videos of any length between 5-60 seconds max if they are recording from the app's camera. On average I have found its 40 second videos. But if uploading from their gallery max is videos of 3minute length or lower.

Thank you for the reply as well. Glad the quality of cloudflare stream is good

charlesding2024

a month ago

Makes sense. Just a heads-up on the hybrid approach: storing raw files in B2 while also ingesting to Stream means you're paying for storage twice.

Also, for the mobile app, definitely look into Direct Creator Uploads. You can generate a signed URL on your backend and let the phone upload straight to Cloudflare. It saves a ton of headache handling bandwidth on your own servers.

Merry Christmas!

slroger

a month ago

thank you for this, will definitely look into the Director Creator Uploads. For storing raw files dont know if I have an alternative if Cloudflare stream isnt keeping the raw file. Merry Christmas to you too!!

christophilus

a month ago

I’ve used Netcup to run an ffmpeg transcoding fleet, stored in Wasabi, served via BunnyCDN. It worked great, and I had total control of everything. You might also check out Bunny’s video services which didn’t exist when I built out my solution.

Risse

a month ago

What's the software stack you have been using for the transcoding fleet? Is there any ready made open source solution?

slroger

a month ago

Thank you, first time I'm hearing about Bunny CDN will do some more research on them.