4 ms·
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 ha
by GOATS- 5y ago
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!
- codefined 5y agoMost 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?
- GOATS- 5y agoIf you're connecting to the RTMP server directly, you can get about 1-2s latency. However, due to the additional overhead of the conversion process to HLS, I'm getting about 6-10 seconds of latency. I have considered looking into WebRTC, but it seems a bit more complicated to work with than just running an RTMP server and calling it a day. Both Apple and Twitch have their own implementation of low latency HLS, so it could be worth looking into how feasible it would be to setup something similar. https://developer.apple.com/documentation/http_live_streaming/enabling_low-latency_hls https://developer.apple.com/documentation/http_live_streamin...
- circularfoyers 5y agoLowering hls_fragment[1] to 1s should help out a little with the latency. This is what I've done in the past with a similar project as yours, Open Streaming Platform[2], with good results. Since you mentioned WebRTC for streaming to provide even lower latency, this is what I believe Project Lightspeed has achieved[3]. Might be something you'd be interested in, if you hadn't already seen it. [1] https://wiki.openstreamingplatform.com/Usage/Streaming#osp-nginx-rtmp-default-configuration https://wiki.openstreamingplatform.com/Usage/Streaming#osp-n... [2] https://wiki.openstreamingplatform.com/Usage/Streaming#osp-nginx-rtmp-default-configuration https://wiki.openstreamingplatform.com/Usage/Streaming#osp-n... [3] https://github.com/GRVYDEV/Project-Lightspeed https://github.com/GRVYDEV/Project-Lightspeed
- GOATS- 5y agoI've experimented a bit with lowering the hls_fragment value and the playlist length, and found that fragments smaller than 2 seconds caused too much buffering on the end client for it to be stable - which resulted in higher latency than before. I'm looking into the latency issues and I've started drafting up possible solutions. Low latency MPEG-DASH might be something to experiment with. It won't reach sub-second latency, but it will definitely be better than HLS.
- ctoth 5y agoI 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!
- GOATS- 5y agoNo worries, I named it Overpass as in the beginning the project was meant to be a very simple bridge between a web app and nginx-rtmp. I suppose you can see where I got the name from. :)
- chazu 5y agoThis 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 https://github.com/zorchenhimer/MovieNight
- belltaco 5y agoWhy can't your friend use Discord streaming? Don't think there's copyright takedowns,
- GOATS- 5y agoThe quality isn't good enough. We also wanted an archive of every stream we've done.
- cconger 5y agoCurious if you considered Mux: https://mux.com/live https://mux.com/live or IVS: https://aws.amazon.com/ivs/ https://aws.amazon.com/ivs/ for your project? If so what made them not compelling options?
- GOATS- 5y agoI think the main reason was that I already have a dedicated server, so it made sense to use the already existing infrastructure for cost saving purposes. I've also looked at Cloudflare and BunnyCDN's options. Could be worth thinking about if I ever move away from owning my current server.