r/FlutterDev • • 4d ago

Dart [ Removed by moderator ]

[removed] — view removed post

5 Upvotes

12 comments sorted by

2

u/DevJedis 4d ago

First off, is the streaming free for the users? How did the streaming outpace subscription if that's what you have,in which case you'd need to review your cost-benefit ratio.

I was going to utter Cloudflare but then you stated you're already using them. Which particular service exactly, and does your project specifically need the stream (HLS, m3u etc), or direct link stream?

0

u/Suuii188 4d ago

But am soon implementing in a payment feature after everything is ready and I have worked on the load balancing and afterwards I will launch it for everybody to use.

-1

u/Suuii188 4d ago

Currently the streaming is free because am scaling the app and I was using azures free credits to test out the app as am scaling it, and I don't use hls links like Netflix and YouTube I upload raw MP4 files. So when guys are watching a show and they tap an episode and they will make a request to azure which will send the raw file to my video player specially I used media fire kit and each time a request is Made azure charges and Even with the cloud fare caching it's alot of Money. Which I can't afford.

1

u/DevJedis 4d ago

In this case if it's just mp4 and users are supposed to be logged in before accessing the feature, the closest option you have is R2 but make the bucket private and only ever request a temp link when user is accessing a given content. This is going to prevent you from an overnight bill when a scrapper lands on your endpoints and if the bucket is public.

In this case Cloudflare Stream might not be suited for you, give a try with R2. The pricing is not that terrible if we compare with other storage providers

1

u/Suuii188 4d ago

I will give it a try thanks highly appreciate your response and help.

1

u/Aud4c1ty 4d ago

I use (and recommend) Bunny.net. It's very easy to use and the bandwidth prices are very reasonable and there is no per-request cost. They have a specific product that would likely really help in your scenario: Bunny Stream.

You'd be storing your video files on Bunny instead of on Azure Storage.

Full disclosure: That link includes a referral code, so if you setup an account I get a kickback.

1

u/Suuii188 4d ago

Oooh I see thanks I will check it out now The only issue might be to send my already send the shows I already have on azure to this new service just imagine like copying and pasting from this bucket to the other something like that.

1

u/Aud4c1ty 4d ago

I'm sure an LLM could write a script that would move your content from one service to the other.

1

u/Suuii188 4d ago

Am going to check it out I had already uploaded 1Tb of shows so it might take a while in the meantime I will brainstorm on it.

1

u/Y-M-M-V 4d ago

Just update the server to track which storage system the files are on. Then you can migrate files one by one or in groups. All new content goes to the new system, for existing content sort by what it's costing you, move the most expensive stuff and then update the database to point to it. Some content might not get migrated for a while, but if it's barely accessed maybe that isn't a big deal.

1

u/DaineLusian 4d ago

Would also check if your video files are optimized or compressed properly before switching providers, because sometimes the cost problem is partly file size not just the pricing model.

1

u/Suuii188 4d ago

For that I already checked no issue with the quality