top | item 29572310

Show HN: Overpass – a self-hosted video live streaming app

160 points| GOATS- | 4 years ago |github.com

34 comments

order
[+] GOATS-|4 years ago|reply
Hello HN!

Overpass is an app I made for self-hosted video live streaming. I originally made the tool for a friend of mine's Patreon service, as he wished to have a private streaming service just for his subscribers. Unlisted YouTube streams were taken down for copyright issues when he did DJ sets, which became a hassle after a while. I originally started with barebones nginx-rtmp, but found it to be too tedious to ask people to open VLC or whatever media player they have to watch the stream.

From that point on, I decided to fully commit to making a live streaming service from "scratch". Overpass is my first venture into making a web application with HTML/CSS, as I've primarily been making CLI apps for my own personal use. It doesn't look all that fancy, but it does the job for us.

Overpass uses Oauth2 via Discord for authentication, as most people subscribed to his Patreon already have access to our server. This is why Overpass can also prevent anyone outside a certain Discord server from gaining access to the app.

There is currently no admin panel, and everyone has the same rights, so it is not intended for deployment in a large public community just yet.

It also automatically records and archives every stream!

The app is written in Python with Flask, however, I am planning to port it to FastAPI as I want to try something else.

I hope you guys find it easy enough to play around with, if not, let me know what I can improve upon. Thank you for reading!

[+] chazu|4 years ago|reply
This looks great and I hope to deploy it and kick the tires soon, thanks for sharing.

Currently I've been using movienight[1] for this, but it sounds like your app is much more feature rich.

[1] https://github.com/zorchenhimer/MovieNight

[+] codefined|4 years ago|reply
Most important thing for me is the latency of the streaming solution. Discord seem to do really well here, with <1 second latency times. You done any measurements with your solution to suggest how much latency there is between the server and the client?
[+] belltaco|4 years ago|reply
Why can't your friend use Discord streaming? Don't think there's copyright takedowns,
[+] ctoth|4 years ago|reply
I am sorry for being this guy!!! but when I see overpass and self-hosted I instantly think of hosting my own Openstreetmap server. This project looks very cool, and I know how hard naming things can be!
[+] bryans|4 years ago|reply
This is pretty well done! Coincidentally, I've been working on a very similar project for a friend of mine, for the exact same reasons. Self-hosted live streaming is definitely the way to go (~8% costs versus ~50% Twitch fees), so it's great to see more independent and open source solutions popping up!

I do think it's important to note, however, that self-hosting doesn't legally absolve the streamer from PRO fees for playing covers, and they'll still need to register and pay based on actual revenue. PROs are notoriously aggressive about pursuing that kind of skirting.

[+] avtolik|4 years ago|reply
I wonder how do you calculate 8% costs. Also is it possible to include in the calculation the "discovery" service that twitch provides?
[+] mdrzn|4 years ago|reply
Twitch has 0 costs, and provide you with avenues to earn revenue (ads, bits, subs).

Your self-hosted platform has some costs, and doesn't have any way to directly monetize via ads or similar.

[+] bob1029|4 years ago|reply
This looks badass. I have been thinking about building something just like this for similar reasons.

One thing I was considering was using cloudflare workers and durable objects to build the important part. I.e. the fan out of raw video content from producers to consumers.

I would also consider building an integrated and LDAP/SAML authentication option for the enterprise licensing tier...

[+] GOATS-|4 years ago|reply
Very interesting! Can you tell me about that Cloudflare Workers setup? Would you have some sort of worker process the ingress video?

Very new to the concept of serverless computing, so I would love to learn more.

[+] naikrovek|4 years ago|reply
I need this at work, but with very low latency.

Teams does low latency well enough, but the frame rate is ~3-5 FPS which is abysmal when you're trying to follow someone's mouse cursor to see what they're actually doing.

anyone know of anything?

[+] harlanji|4 years ago|reply
MS acquired Peer5 for Teams recently so I imagine improvement on the horizon.

I built an nginx-rtmp oss project a few years ago and it worked well—simulcasted out to Twitch and YouTube and saw comparable latency (YouTube: 3 2 1 ispooge live is faster). I used a dedicated encoder box, recorded and proxied via my raspi3 and served from home fiber behind CloudFlare CDN with caching to prevent much origin traffic, 2sec HLS chunks were like 1-2Mb at 720p30.

[+] jhunter1016|4 years ago|reply
This is great! Where are the archives stored? Locally on the streamer’s machine or on a remote server?
[+] GOATS-|4 years ago|reply
On the server Overpass is hosted on. I'm considering moving to some sort of object storage when Cloudflare officially releases R2. I'm also looking at deploying my own instance to Fly.io at some point in the future.