News for hackers. Stuff that matters.
Re:Owncast is a self-hosted live video and web chat server by lelag on Monday June 20, 2022 @10:39AM (#31810887)
The idea to self-host your own livestream is a great idea in theory but is unlikely to be economical in practice due to bandwidth cost.

Even if you do manage to set everything properly on your own, with a CDN and all, it will become quickly expensive for a moderately popular streamer and the cost with scale up linearity with popularity (hence with your revenue).

Assuming the following:

- you are using AWS and CloudFront as CDN

- your have 300 viewer on average

- your viewer average bandwidth is 3 Mbits

- you just stream a healthy 30 hours per week (pretty low for a popular Twitch streamer)

CDN Bandwidth cost alone would hit 1000 USD per week. To put it another way, every viewer cost you 3 USD per week. Even with a generous community, that's not going to work out financial for most streamers.

Self-hosting would only work for very small community allowing you to stay in the free tier of a cloud provider but that won't take you far.

There is a reason Twitch is almost a monopoly and all powerful: it does not make economic sense to be elsewhere unfortunately.

Re:Owncast is a self-hosted live video and web chat server by Sebguer on Monday June 20, 2022 @02:13PM (#31813634)
> Twitch is almost a monopoly

Calling it Twitch, rather than Amazon, makes it sound better. But really, it's Amazon that's the monopoly - and they're able to use their bandwidth pricing power to prevent anyone else (aside from other mega-scale cloud providers) from getting anywhere close.

Re:Owncast is a self-hosted live video and web chat server by nsriv on Monday June 20, 2022 @04:17PM (#31815290)
This is a great point that I wish was made more often.
Re:Owncast is a self-hosted live video and web chat server by jonathantf2 on Monday June 20, 2022 @12:00PM (#31811908)
Why would you be hosting this on AWS? Host it on a normal cloud provider that doesn't rip off it's customers with bandwidth fees and you'll find it's quite affordable.
Re:Owncast is a self-hosted live video and web chat server by eropple on Monday June 20, 2022 @02:53PM (#31814130)
Cloudfront isn't a great option here, but CDN transit fees are still pretty high for this sort of scenario unless you have significant economies of scale.
Re:Owncast is a self-hosted live video and web chat server by southerntofu on Tuesday June 21, 2022 @05:40AM (#31822084)
As some other people have pointed out in the thread, P2P delivery is a great use-case for live video distribution. I'm not convinced the discovery latency and overhead from p2p is worth it to distribute simple HTML pages, but for video it's just perfect.

I've heard of single instances of peertube running on a small VPS scaling to hundreds of livestream viewers. The ability to scale "instantly" by leaving a web browser to seed is a plus. I'm not sure how cross-instance redundancy/seeding works with livestreams though.

Re:Owncast is a self-hosted live video and web chat server by eropple on Tuesday June 21, 2022 @09:59AM (#31824035)
P2P is notionally interesting and I can see some edge cases for it but consistency of edge delivery are considerable and out of the publisher’s control, while the latency problems (which, you-don’t-need-that dismissals aside, are actually what people building stuff in this space care about) seem nearly irreparable by design.

A browser isn’t an option using current technologies; WebRTC doesn’t really scale like this. RTMP/SRT/WebRTC for ingest, HLS or equivalent for consumption. That’s what it’s all built around and expecting other people to donate transit to you isn’t a reliable model for folks who have other options, I think. And most people do have other options.

Re:Owncast is a self-hosted live video and web chat server by lrae on Monday June 20, 2022 @11:08AM (#31811255)
While I agree that it's not cheap, no idea why one would choose Cloudfront for live video which is pretty down there in the choices of a CDN for live video.

With Bunny you'd be at what, not even a $100.

Re:Owncast is a self-hosted live video and web chat server by fragmede on Monday June 20, 2022 @12:52PM (#31812584)
> unlikely to be economical in practice

> your have 300 viewer on average

> a healthy 30 hours per week

I get that live-streaming on twitch is a whole thing, but many streamers would be really happy to get 30, or even 3 viewers, and don't stream anywhere near 30 hours a week. If you have a good home connection with a decent, no-cap upload, there's no need to pay a cloud provider either.

Re:Owncast is a self-hosted live video and web chat server by paulmd on Monday June 20, 2022 @02:00PM (#31813445)
> If you have a good home connection with a decent, no-cap upload, there's no need to pay a cloud provider either.

serving viewers directly from your home IP means they know your home IP, and there's definitely already trends both to fuck with streamers generally, and specifically in games to DDOS people and get them dropped from the game.

Usually the mechanism for leaking IP data is voice chat (since that's often implemented via P2P because game companies are cheap) but you're talking about making your home IP available to everyone who connects to your stream.

"Your computer is broadcasting an IP!" advertisements aside... there are scenarios where that's a problem, specific IPs can certainly be DDOSed off the internet and that means a streamer won't be able to stream anymore.

Re:Owncast is a self-hosted live video and web chat server by chrismorgan on Wednesday June 22, 2022 @03:55AM (#31833172)
> since that's often implemented via P2P because game companies are cheap

You implement it peer-to-peer for lower latency, not because you’re cheap.

Re:Owncast is a self-hosted live video and web chat server by idiotsecant on Monday June 20, 2022 @01:08PM (#31812776)
I think the benefits that twitch provide go beyond just bandwidth. There might be enough bandwidth on a good home connection but onboarding users, building a community, getting sales to advertisers to support the service, etc are all core function that would be quite difficult for a sole provider to handle.
Re:Owncast is a self-hosted live video and web chat server by crtasm on Monday June 20, 2022 @11:13AM (#31811327)
Other than preventing some viewers seeing a delayed feed, why do I need a CDN at all? This can run off a single server with a 1Gbps uplink... can't it?

In any case there's plenty of people/organisations who run less regular streams and don't need to serve this many viewers.

Re:Owncast is a self-hosted live video and web chat server by vorpalhex on Monday June 20, 2022 @12:47PM (#31812526)
Latency and scaling, yeah. Depending on stream setting and encoding you might saturate hardware before bandwidth.
Re:Owncast is a self-hosted live video and web chat server by xiconfjs on Monday June 20, 2022 @11:07AM (#31811243)
therefore renting a dedicated server from a provider with 100TB traffic included is still useful - there are many of them [1] around ~70€/month

[1] https://www.google.com/search?q=100+tb+trafic+server

Re:Owncast is a self-hosted live video and web chat server by candiodari on Monday June 20, 2022 @11:41AM (#31811656)
Something like Hetzner will also work for 30 euro/month and certainly won't run out of bandwidth. Plus this isn't a great amount of traffic, getting a decent VPS should work fine.
Re:Owncast is a self-hosted live video and web chat server by hdjjhhvvhga on Monday June 20, 2022 @12:40PM (#31812430)
I think the times of €30/month are over, Hetzner is now a €40/month provider (unless you take some hardware from the auction - I did and it was mostly fine, but with much lower specs than their regular offering).
Re:Owncast is a self-hosted live video and web chat server by ryukafalz on Monday June 20, 2022 @11:04AM (#31811202)
How about peer-to-peer delivery like with PeerTube? It introduces a 30s-1m delay, which may not be acceptable for some streamers, but in exchange the users watching also participate in distribution.
Re:Owncast is a self-hosted live video and web chat server by Karrot_Kream on Monday June 20, 2022 @02:07PM (#31813538)
A lot of the fun from live streaming is directly interacting with the streamer in chat. 30s-1m variable (I presume this is HLS torrenting?) latency would dash all the fun.
Re:Owncast is a self-hosted live video and web chat server by codemonkey-zeta on Monday June 20, 2022 @11:13AM (#31811326)
On the other hand, it may be a feature for some streamers:

"Our service includes built-in stream-sniper protection by default!"

Re:Owncast is a self-hosted live video and web chat server by vorpalhex on Monday June 20, 2022 @12:48PM (#31812543)
I think a cheap streaming solution using bittorrent would be awesome. You would still need a beefy seed host but otherwise I'd love to something like that exist.

For a lot of cases, 60s of latency is fine.

Re:Owncast is a self-hosted live video and web chat server by idiotsecant on Monday June 20, 2022 @01:10PM (#31812807)
For streaming I think a big part of the experience is 'chat' all seeing what each other are commenting on the thing that is happening right now, and the streamer's interaction with chat. Throw in a 30-60s delay that is variable depending on user and you destroy that element.
Re:Owncast is a self-hosted live video and web chat server by vorpalhex on Monday June 20, 2022 @03:50PM (#31814886)
It just depends. Obviously "Twitch plays X" sort of content where there is a lot of audience participation isn't great with that much delay, but there are a lot of streamers where chat is more reactive than suggestive and a delay there just doesn't matter much.

You may want to add in an artificial delay to chat though so it's synchronized to the video.

Re:Owncast is a self-hosted live video and web chat server by ryukafalz on Monday June 20, 2022 @02:18PM (#31813688)
This does exist, by the way: https://joinpeertube.org/
Re:Owncast is a self-hosted live video and web chat server by melony on Monday June 20, 2022 @11:02AM (#31811174)
Your math is off by an order of magnitude. That pricing is for web apps. For streaming, look towards Bunny CDN and similar for wholesale pricing.
Re:Owncast is a self-hosted live video and web chat server by bryans on Monday June 20, 2022 @05:34PM (#31816318)
What you're describing isn't very realistic, since nobody would willingly choose the most expensive option(s) for transfer -- and CDNs aren't even particularly useful for live video, as the minimal latency increase of using a single location is easily counteracted with larger buffers, all of which is already baked in to the protocols.

Here's some counterpoint math including revenue, using even higher bitrates across a couple cheap load-balanced 4Gbps VPSs. For simplicity, I'll use a single average stream.

Transfer: 300 avg. viewers * 6 hours * 5mbps = 4TB @ $0.01/GB = $40

Revenue: 5,000 total views * 0.01 conversion * ($5 avg. contribution - processing) = $228

That's a $188 margin self-hosted versus approximately $120 via Twitch mechanisms. Presuming 5 streams per week, Twitch is taking a $17,000/year commission. Twitch does provide some other functionality and very minimal discovery, but if you already have a dedicated audience, then self-hosting absolutely makes sense for any sized streamer, especially considering that you're not limited to streaming to only one platform.

Re:Owncast is a self-hosted live video and web chat server by bityard on Monday June 20, 2022 @11:22AM (#31811433)
> you just stream a healthy 30 hours per week

Unless streaming is somehow your job, I fail to see how that is even remotely healthy.

Re:Owncast is a self-hosted live video and web chat server by fragmede on Monday June 20, 2022 @12:47PM (#31812524)
"somehow"... Twitch pays about $3.50 per 1,000 views to full-time streamers, starting somewhere around 500 regular viewers. Top end streamers make $5k/mo streaming 40 hrs a week. It's not SF senior dev money, but high-school me would think it's pretty cool to be making money "just" playing video games. (Instead I'm posting on HN for free.)
Re:Owncast is a self-hosted live video and web chat server by comex on Monday June 20, 2022 @09:30PM (#31818670)
Re:Owncast is a self-hosted live video and web chat server by looperhacks on Monday June 20, 2022 @11:44AM (#31811696)
For many popular streamers it is indeed their job
Re:Owncast is a self-hosted live video and web chat server by AviationAtom on Monday June 20, 2022 @10:41PM (#31819200)
My last company wanted to self-host their own conferencing platform, bandwidth was one of the many reasons I told them it would be a horrible idea. Economies of scale are capable of solving many "simple" problems, and gain many benefits, due to their sheer size.
Re:Owncast is a self-hosted live video and web chat server by LinuxBender on Monday June 20, 2022 @10:52AM (#31811050)
That could be true, especially if one live streams 24/7. It might be a nifty proof of concept if they set up a live demo without a CDN on a bog-standard VPS provider like Linode, DigitalOcean, Vultr, etc... Does anyone here have this running in one of the VPS providers?
Re:Owncast is a self-hosted live video and web chat server by crtasm on Monday June 20, 2022 @12:22PM (#31812179)
Here's an instance running on Linode: https://live.retrostrange.com/

List of instances: https://directory.owncast.online/

Re:Owncast is a self-hosted live video and web chat server by LinuxBender on Monday June 20, 2022 @12:44PM (#31812487)
Nice! What is the highest number of viewers you have ever seen on a stream at once?
Re:Owncast is a self-hosted live video and web chat server by crtasm on Monday June 20, 2022 @04:56PM (#31815839)
I just found it in the list, wonder the same.
Re:Owncast is a self-hosted live video and web chat server by philnelson on Tuesday June 21, 2022 @12:04AM (#31819705)
Phil here, I run the RetroStrange TV channel. We’ve seen hundreds but not sustained over time. Average currently 2-15 viewers at a time. I’d love a stress test.
Re:Owncast is a self-hosted live video and web chat server by vel0city on Monday June 20, 2022 @11:10AM (#31811286)
Running the numbers for 300 streamers at ~3Mbps each for ~30 hours a week works out to 12,150,000MB. That value * 4 for about monthly bandwidth usage. For a s-4vcpu-8gb instance on DO, that's ~$436 monthly overage on a $40 monthly cost droplet. Not too insane, but you're really stressing out that single droplet. You'd probably want to balance that across a few different instances across the country instead of it all being on a single droplet, in which case you're essentially rolling your own probably crappier CDN and trading CDN costs for your time managing it all.
Re:Owncast is a self-hosted live video and web chat server by LinuxBender on Monday June 20, 2022 @11:23AM (#31811451)
Agreed that was my thought process as well. One could spin up a few dozen instances, start the live stream and then nuke the instances. That should scale to however many viewers one has. I guess that begs the question does this application have the instrumentation or hooks that would make it super simple to scale up nodes on demand? Like an API to query number of viewers and their bandwidth settings to calculate required capacity.
Re:Owncast is a self-hosted live video and web chat server by thakoppno on Monday June 20, 2022 @01:37PM (#31813139)
For ~300 streamers, wouldn’t a single symmetrical fiber 1gbps line, like a residential AT&T install, basically cover it?

The TOS prohibits it but I always figured it’d be fine so long as one didn’t get too popular. I guess I’m wondering to what extent increased residential bandwith keeps CDN bandwidth cost in check.

Re:Owncast is a self-hosted live video and web chat server by paulmd on Monday June 20, 2022 @02:03PM (#31813487)
Streamers won't want to serve directly from their home IP because it makes them a DDOS target.
Re:Owncast is a self-hosted live video and web chat server by thakoppno on Monday June 20, 2022 @02:19PM (#31813707)
Ddos prevention never crossed my mind, good point. I don’t spend much time in the gaming community. Who would be the most likely attacker, a competitor in the game trying to get an advantage? If so, thats kinda fascinating in a way. It’s almost like a cyberwar scenario where the battlefield is virtual and physical.
Re:Owncast is a self-hosted live video and web chat server by paulmd on Monday June 20, 2022 @02:21PM (#31813733)
it's both, competitors in the game (or just trolls) have attacked random in-game players using IPs leaked from things like VOIP chat in games (which is often implemented P2P rather than running through the server) and people also specifically go after streamers to harass them.

https://www.eurogamer.net/dead-by-daylight-streamers-are-bei...

Re:Owncast is a self-hosted live video and web chat server by Karrot_Kream on Monday June 20, 2022 @02:10PM (#31813580)
Other than the DoS attempts the sibling mentioned, the symmetric Gigabit on a home connection varies depending on congestion, and NAT mapping could change changing your IP causing the whole Livestream session to renegotiate.
Re:Owncast is a self-hosted live video and web chat server by throwaway81523 on Monday June 20, 2022 @04:08PM (#31815162)
I've livestreamed with ffmpeg and Icecast fanned out to a layer of cheap VPS and that worked ok. Yes there was enough lag to be annoying but not anything like 40 seconds.
Re:Owncast is a self-hosted live video and web chat server by mig39 on Monday June 20, 2022 @11:00AM (#31811150)
Also interested to know this. How many people watching can a cheap VPS like Linode handle?
Re:Owncast is a self-hosted live video and web chat server by jszymborski on Monday June 20, 2022 @11:04AM (#31811204)
It'd likely involve a huge amount of latency, but any chance you can get a livestream working with torrent.js in the way PeerTube does? Maybe using HLS or something? Would certainly address some of the bandwidth concerns.
Re:Owncast is a self-hosted live video and web chat server by 2Gkashmiri on Monday June 20, 2022 @11:27PM (#31819517)
There are hosts that give you unlimited /32tb bandwidth monthly. That's quite generous
Re:Owncast is a self-hosted live video and web chat server by oever on Monday June 20, 2022 @11:26AM (#31811483)
Livecasters with a large audience could fund development of multicast support for Owncast.
Re:Owncast is a self-hosted live video and web chat server by foxhop on Monday June 20, 2022 @05:11PM (#31815988)
This seems really cool, I like that it seems to be compatible with the existing twitch APIs in regards to webhooks for automation, not that I've ever used those cabibilities yet on twitch but knowing that the workflows could be written once & work both on twitch & owncast which means migrations are possible for even popular steam channels.

I have half a mind to rig up an old phone to stream my garden & chickens 24/7 to an owncast server as a test.

Re:Owncast is a self-hosted live video and web chat server by throwaway81523 on Monday June 20, 2022 @04:09PM (#31815182)
Can someone explain what makes this different from Jitsi, Nextcloud Chat, and other stuff of that sort? I get that this is a useful software category but it would be good to have a guide to what is what.
Re:Owncast is a self-hosted live video and web chat server by sbarre on Monday June 20, 2022 @04:52PM (#31815788)
I think the goal here is to have an out of the box "self-hosted Twitch" experience.

Spin up their Docker container, connect it to a storage provider, and you're good to go.

Jitsi and Nextcloud are video conferencing solutions if I'm not mistaken, this is livestreaming.. A bit of a different model, where only the broadcaster is sending out video, and everyone else is just watching and maybe using the (text-based) chat room.

Re:Owncast is a self-hosted live video and web chat server by remram on Monday June 20, 2022 @08:51PM (#31818357)
Having a comparison of video chat platforms makes sense (Zoom, Jitsi, Nextcloud Chat), having a comparison of live-streaming platforms makes sense (Twitch, PeerTube, OwnCast). However those are really completely different.
Re:Owncast is a self-hosted live video and web chat server by pmontra on Monday June 20, 2022 @11:07AM (#31811236)
Is this project affiliated or owned by Facebook / Meta? In the HTML source:

  <meta property="article:publisher" content="https://www.facebook.com/"
Maybe a copy and paste leftover. I noticed it when I pasted the link in Telegram and the preview displayed the Facebook URL.
Re:Owncast is a self-hosted live video and web chat server by jjice on Monday June 20, 2022 @11:22AM (#31811434)
My guess would be that the default is to take a config car that's your Facebook link and append it to the end of that URL. But that's just a complete shot in the dark.
Re:Owncast is a self-hosted live video and web chat server by remram on Monday June 20, 2022 @08:54PM (#31818386)
Apparently this has been fixed: https://github.com/owncast/owncast.github.io/commit/17223f35... I think the idea was to attribute the page to the author's Facebook profile in Facebook's graph.

Maybe they saw your comment?

Re:Owncast is a self-hosted live video and web chat server by AviationAtom on Monday June 20, 2022 @10:46PM (#31819245)
Any idea what the latency is like on this? The FAQ says it shouldn't be used for real-time, but Twitch in fact hits pretty close to real-time, otherwise Twitch streamers interacting with people in their chat would be impractical.
Re:Owncast is a self-hosted live video and web chat server by password4321 on Monday June 20, 2022 @04:56PM (#31815842)
I'd like to know what can be supported multiplexing through a Scaleway Stardust instance, ”up to 100Mbps" unmetered for €2/month.
Re:Owncast is a self-hosted live video and web chat server by chrismorgan on Wednesday June 22, 2022 @03:57AM (#31833183)
Depends on your bit rate. At 1Mbps, 100 connections is the hard upper limit. At 5Mbps, 20.