HACKER Q&A
📣 iainctduncan

What is the most economic and scalable way to host videos in 2022?


I'm wondering what the sweet spot is nowadays as I know a couple of startups delivering video content, and at a glance it seems this is costing them more to do than it should through the Paas options they are using. I would have thought this would have improved a lot in the 10-15 years since I last looked at it seriously. I'm hoping some here know how this ought to be done on modern cloud services to enable delivering in-app videos cost effectively to large numbers of viewers. thanks!


  👤 technobabbler Accepted Answer ✓
If you don't need PPV (pay per view) or fancy monetization, you can just put them on Vimeo or even YouTube for very cheap.

Or CloudFlare Stream, maybe: https://www.cloudflare.com/products/cloudflare-stream/

Edit to add: Please, for the love of god, do not self-host your video as a static file. There is a LOT of thought that goes into modern video streaming, such as on-the-fly transcoding to different resolutions & bitrates, pre-caching the next few seconds, seeking support, thumbnails, auto-captions, hardware decoder support... absolutely none of that is trivial to implement, but they make a huge difference in end-user UX. You may design your video on some sort of 5k supermac, but a lot of your viewers will be watching them on cheap Androids. The video providers spend a lot of time optimizing their streams and networks for such use cases. You will not, and your users will suffer for it, if you try to self-host. Please, please don't do this.

Signed, that guy who hates it when you're expected to download a 50 meg MP4 to understand a product.


👤 robcohen
There is no practical way to answer this because there isn't enough information.

At what scale? (Netflix or a small conference with 1000 users streaming?)

Do you have expertise? (Are you a kubernetes/nixos guru with extensive colocation administration experience or do you want Cloudflare Stream ease of use?)

The closest thing to an answer for the MOST economic and scalable way assumes a lot of devops capability: be your own CDN.


👤 fxtentacle
To me it looks like everyone is freeloading off unlisted youtube videos. Can't beat free ;)

Apart from that, ffmpeg can generate all the files you need and nginx can host them, but make sure you have a hosting company with generous traffic allowance. Putting this on S3 is probably a lot more expensive than renting vimeo, which is a dedicated white label video hosting service.


👤 ozten
I don’t know how the cost compares, but a simple solution is a paid Vimeo account and then embers the videos behind a website or app that requires auth. Playback is limited to an allow list of domains.

👤 analyte123
The answer is surely what all of those auto-playing video ads are using. Anybody know?

👤 evv555
peertube

👤 melony
BunnyCDN

👤 moltke
If you just want to share a video dump it in /var/www/html. If it becomes very popular you'll be able to monetize it and pay for a CDN but that kind of popularity usually has to built up to so you shouldn't worry about it if you just want to share something.