
How to make a self-hosted video livestream - ddevault
https://drewdevault.com/2018/08/26/Self-hosted-livestreaming.html
======
eropple
As I do some middlingly professional-ish video livestreaming--I run a
three/four camera show most Fridays for the Boston fighting game scene, we're
newish to streaming but it's one of the biggest locals in the country--it was
natural to look into the costs of self-hosted streaming. They're pretty
prohibitive. Data is either expensive (AWS) or bandwidth-constrained
(DigitalOcean etc.). Running from local is likewise not a reasonable option,
either because of bottlenecked uploads (yo, Comcast) or just because it's
simply unsafe to rely on something like a consumer connection, even if it's
FiOS, to upload a show.

I don't have a good solution to this, unfortunately. The biggest benefit to
Twitch is that it becomes possible for fifty or five hundred people to find
you; the algorithm can be your friend if you're lucky or good. The second-
biggest benefit to Twitch is that if fifty or five hundred people come by,
your stream is not going to melt.

~~~
Rjevski
Has anyone considered hosts like OVH/SoYouStart? They have unmetered bandwidth
and are quite affordable, and can be even cheaper on Kimsufi if you're willing
to compromise on the SLA.

Here are servers for around 40$/month with 250Mbps with unmetered traffic:
[https://www.soyoustart.com/en/essential-
servers/](https://www.soyoustart.com/en/essential-servers/)

Kimsufi is even cheaper with 100Mbps unmetered starting at around 5$:
[http://www.kimsufi.com/en/servers.xml](http://www.kimsufi.com/en/servers.xml)

~~~
eropple
Of course; it'd be pretty shortsighted not to, yeah?

Setting aside OVH/SoYouStart's generally kinda crap support (and maybe it's
just that I do devops professionally but even for my own stuff I expect _some_
support, not emoji shrugs and a lack of English), "unmetered bandwidth"
doesn't come with a wide enough pipe. 250Mbps is 40 users at 6Mbps/user,
assuming nearly perfect bandwidth usage. One of my weekly streams hits 20-25
without us having advertised yet; these are alpha tests/pre-production
streams. We should hit 50-60 when we go for-realsies live, if not more.

The next step, then, is to build your own star topology to stream to users.
And your own load balancing. All to, uh, not make money on it and to, uh, not
have as good of an experience either for the viewer or for the creator as you
do when using Twitch or Mixer or YouTube (I don't care how ~~fierce~~ your
Twitter game is, a Twitch notification is gonna get you further than the hot
tweets).

Companies are willing to burn a lot of money and make you the beneficiary. So,
right now, I do, and I tend to think even HN types are best off doing
likewise.

------
ofrzeta
I am not so sure about using DASH. It's becoming a royalty source for the MPEG
LA: [http://www.streamingmedia.com/Articles/Editorial/Featured-
Ar...](http://www.streamingmedia.com/Articles/Editorial/Featured-Articles/The-
Changing-State-of-MPEG-DASH-Royalties-How-Bad-Will-it-Get-115883.aspx)

FWIW we are using HLS for live streaming with a fallback of RTMP to Flash for
super legacy browsers.

~~~
Sir_Cmpwn
You have a good point here. I would question the wisdom of falling back to
Flash, though. Native support of both dash AND hls in web browsers is
terrible.

[https://caniuse.com/#feat=mpeg-dash](https://caniuse.com/#feat=mpeg-dash)

[https://caniuse.com/#feat=http-live-
streaming](https://caniuse.com/#feat=http-live-streaming)

HLS can be done in much the same fashion as described in my article with
[https://github.com/video-dev/hls.js/tree/master](https://github.com/video-
dev/hls.js/tree/master) I might do a follow-up with the necessary changes.

~~~
CyberDildonics
Why not use html5 video? I actually don't have a good idea of the ven diagram
surrounding the layers or overlap in functionality. Is there a reason DASH is
necessary?

~~~
Sir_Cmpwn
This does leverage html5 video, but without some help html5 video doesn't
support live streaming. The browser expects all videos to be finite. This
works by stringing together a series of finite videos indefinitely. DASH can
also be used to offer different streams at various bitrates.

~~~
AboutTheWhisles
That makes sense. Is it really so complex that there needs to be a licensed
technology?

~~~
Sir_Cmpwn
Not in my opinion, no, but the MPEG group is notorious for abusing their
patents.

