Selfhosted youtube-like media/social-media platform? reddit / selfhosted ---------------------------------------------------------------------- sdekna · 2023-10-25 05:36 I am thinking of building a media-sharing platform... Big part of the platform will be storing/playing media, so wanted to ask if there are any open source solutions any of you can think of that I can use for this, or to kick start me in some direction. Thanks. ---------------------------------------------------------------------- NikStalwart · 2023-10-25 05:48 [PeerTube](https://github.com/Chocobozzz/PeerTube). Also: don't. Bandwidth egress fees for video streaming are eyewatering. ---------------------------------------------------------------------- noodleswind · 2023-10-25 06:53 It exists: [https://github.com/mediacms- io/mediacms](https://github.com/mediacms-io/mediacms) ​ Also, I am building one. Demo available at [https://subatic.com](https://subatic.com) I developed a pipeline to create slow/fast gif, seeking thumbnail and transcode to various resolutions. Also I sorted out u/NikStalwart concern using cloudflare R2. ​ `Math below.` It costs $0.36 to serve a million files, regardless of size. An average of 3 sec hls segment, so I can serve 3 million seconds (833.33 hours) for 0.36$. ​ 1$ = \~ 2316 hours. Average video is 10 minutes give or take. So, 14,000 streams of a a video for 1$ or 72$ for a million streams. ​ and the pricing can be reduced by increasing hls segment post first minute of video since initial buffering needs to be quick. I have done the math for that as well, it all comes down to \~10$ for a million views. ---------------------------------------------------------------------- noodleswind · 2023-10-25 06:56 the above calculation is with hls segments, but if you go the simple route and create mp4 videos, the cost to serve a million views can come down to 0.36$. ---------------------------------------------------------------------- NikStalwart · 2023-10-25 07:20 Are there any TOS considerations for using R2 instead of Cloudflare's Stream platform? ---------------------------------------------------------------------- noodleswind · 2023-10-25 07:21 i went into cloudflare discord servers and asked the same question. they said it’s fine. also, cloudflare stream does a lot more than r2. ---------------------------------------------------------------------- sdekna · 2023-10-25 07:22 what you did here my friend is called epic! 😎 loads of thanks! ---------------------------------------------------------------------- sdekna · 2023-10-25 07:23 this looks interesting! Have you used it before? ---------------------------------------------------------------------- NikStalwart · 2023-10-25 07:28 Not personally, no. But it comes up in most fediverse discussions. ---------------------------------------------------------------------- sdekna · 2023-10-27 02:58 just played around with it... Easy k8s deployment with most of my needs come out of the box... So far so good. Thanks for the suggesstion!