8 ms·
Show HN: Owncast – An open-source, self-hosted live streaming server
I wanted to share the status with the Owncast project. If Wordpress is your self-hosted version of Medium, then this is your self-hosted version of Twitch.
I've been little by little chipping away at building an easy to use and super useful live streaming server for individuals. It's still early days, but some recent updates include a dashboard where you can see some basic viewer metrics, configuration settings, and how your hardware is handling all that video crunching. We all know working with video can be intensive on the hardware side, so hopefully this helps people keep tabs on things.
There's a demo server if you're curious what it's like. But if you're a streamer, or even have a little interest in the space, I'd love for you to give it a spin. Feedback is highly appreciated!
If you want to learn more about the project check out the documentation, and of course all the source, issues and additional discussion are over on Github.
Demo:
https://watch.owncast.online https://watch.owncast.online
Github:
https://github.com/owncast/owncast https://github.com/owncast/owncast
Documentation:
https://owncast.online https://owncast.online
- Rinum 6y agoThis is great! No worries about violating other streaming site's rules and getting banned. One thing that's missing is a discovery engine to find Owncast streamers.
- bo0tzz 6y agoThere is actually a directory at https://directory.owncast.online/ https://directory.owncast.online/, although not many people have added their instances to it yet.
- emperor_ 6y agoThis is great! Looking forward to test this :)
- poma88 6y agoInterconnected self-hosted social networks are the future.
- PaulDavisThe1st 6y ago... just like flying cars!
- tmikaeld 6y agoVery nice, I'll certainly try it out for courses with clients. What's the latency like?
- suyash 6y agodon't want to use Zoom?
- fxtentacle 6y agoPerfect :) I was searching for tutorials on how to set up my own OBS streaming proxy just 2 days ago. And Go is so very nice because I can compile all I need into one big monolithic binary. Thank you :)
- jsilence 6y agoWas also considering a stream proxy for OBS and Atem mini pro and thought about the Docker container of this. But you are right, with onw self containes Go binary, what's the point of docker here... Great, have to tinker.
- ninjin 6y agoIndeed, I am certainly watching this space. Another “contender” is Boltstream [1] that was posted only a few weeks back. I am itching to take them all for a spin and kick tires! [1]: https://github.com/benwilber/boltstream https://github.com/benwilber/boltstream [2]: https://news.ycombinator.com/item?id=25328622 https://news.ycombinator.com/item?id=25328622
- jsilence 6y agoHow does this relate to PeerTube?
- op03 6y agoNice docs. I had no idea you could do this locally. Out of the loop on video streaming, but looks like a webserver serving files(video segments - chopped up based on needs). Just curious roughly how many simultaneous clients can a generic desktop serving lets say one low quality stream (360p?) handle?
- bronco21016 6y agoI think your last question highlights that you really wouldn’t run this locally. Probably on a VPS or something with a ton of bandwidth. I’m sure someone else will have better usage benchmarks but bandwidth is likely to be the biggest constraint. Number of streamers is roughly going to be available bandwidth divided by bitrate of stream.
- gabekangas 6y agoOne option is offloading the bandwidth requirements to a S3 provider. You could run your server from home and keep your local outbound requirements low, you'd just be handing off the video to somebody who can handle it. Depending on your scale many S3 providers can be pretty cheap. I know of one person who does this specific setup and it's been working great for him!
- bronco21016 6y agoI noticed that as an option once I started looking closer. That's pretty nice! Just gotta be careful to estimate and monitor costs but depending on the use case it could make a very compelling option.
- mikewarot 6y agoYour best bet is to run this in a VM somewhere in the cloud. Each stream is going to consume bandwidth, and you'll quickly run out if you do this at home. About 10 years ago, I did a live stream to about 200 people, streamed up via a cellphone link (it was new stuff back then), then to a Windows Server instance on Amazon ECS, and out to all the users. It seem you should be able to handle similar numbers these days.
- suyash 6y agoThis is nice, I've tried to build a simple streaming server myself, so couple of questions if you don't mind: 1. What technology are you using for communication of chat text and video ? WebRTC/Web Sockets/ RMTP or something else. 2. Whats the latency like for videos? 3. Does the project has any controls/customization for video player?
- mueslix 6y ago1. Websockets 2. Depends on the size of chunks and amount of files in the HLS playlist. Both are configurable values. Anywhere between 3 and 20 seconds 3. Not yet, but it's planned
- nlh 6y agoVery cool! Sorry for the novice question but I checked the docs and FAQ and didn’t see an answer: Can you explain a bit the dynamics of streaming from your own server? How does bandwidth / broadcast work? Do you need enough upstream bandwidth to support (Stream bitrate * # of clients)? Or is there a broadcast protocol that takes advantage of a CDN? My understanding of the commercial services is that their value isn’t just in providing a server, but it’s the huge amount of bandwidth required to support N simultaneous high bitrate streams. But maybe I have a misunderstanding. Thanks!
- bo0tzz 6y agoA super brief summary of the streaming protocol is that you encode short (3-10 second) clips that are available on a URL, and then clients play these clips in order. For storage of these clips you could use an external storage or CDN - see the docs at https://owncast.online/docs/s3/ https://owncast.online/docs/s3/ for more :) Edit: Of course this means that this > Do you need enough upstream bandwidth to support (Stream bitrate * # of clients)? is indeed the case, but you can offload that to the external storage.
- nlh 6y agoSuper cool - great answer and thank you!
- koreanguy 6y agoffmpeg is able to capture from webcam, desktop, or vod you only need the correct software and public ip , and upload bandwidth to stream properly how would you do this ? install ffmpeg , setup a bash script to capture from webcam or device, install nginx or lighttpd to serve basic html with the HLS video.js player. map your ip or dynamic to your www.myname.com , to make it better you would also add a cheap cdn, such as bunnyCDN.com 5euros per month for 1TB you create a add your domain.com on bunnycdn.com, and create a new subdomain cdn.domain.com which directs to the bunnycdn.com/username they provide you. thats it. the file segments would be offloaded on their servers basically , they provide feature on how long you want to keep the segments on their global servers. the same way all this works, could be done with webtorrent live streaming on webRTC, some adult sites live streaming adult sites have already started to use this method webRTC peer to peer
- boardwaalk 6y agoAs a general comment on how you can do this sort of thing super minimally: You can use ffmpeg on the command line to transcode anything it can read (including streams) to an HLS playlist + segments, and serve those HLS playlist + segments statically using any HTTP server. Then you can write a simple HTML page that uses a video player to play it back in a browser. I used this to create a simple dashboard page for my home security cams (they provide an RTMP stream I can feed right into ffmpeg) after I got sick of the software I had eating too much CPU (I use '-v:copy -a:copy', so no actually re-encoding happens). Obviously, this owncast is cool for probably being easier to setup, definitely better looking, and having more features, like chat. I just wanted convey there's nothing magic to doing your own streaming video. More people should do it instead of feeding into the YouTube/Twitch behemoths and untrustworthy cloud IoT stuff.
- jarbus 6y agoThis is really cool, thanks for pointing this out. Definitely a different use-case but never knew it was this simple to stream video.
- suyash 6y agoFor video streaming I would prefer to use WebRTC over RTMP
- cghendrix 6y agoAs someone who doesn’t know much about the two protocols: how come?
- suyash 6y agoHere is a good answer https://www.quora.com/Which-is-better-for-live-streaming-RTMP-vs-HLS-vs-WebRTC https://www.quora.com/Which-is-better-for-live-streaming-RTM...
- manishsharan 6y agoI guessing it's because Webrtc is near real-time whereas transcoding to HLS would add latency. However the advantage of HLS is that you can offload the serving of the content to a CDN or a Http server and scale horizontally. Whereas serving more webrtc clients would require fatter/bigger webrtc server. Please note I am only basing my opinion base on what I have read on HN.
- suyash 6y agoBTW paid, fully managed offering for such a service is available courtesy of creators behind Twitch itself - AWS-IVS https://aws.amazon.com/ivs/ https://aws.amazon.com/ivs/ demo : https://codepen.io/amazon-ivs/pen/wvMLZLz https://codepen.io/amazon-ivs/pen/wvMLZLz
- slenk 6y agoAWS's offerings for this are NOT cheap
- movedx 6y ago> The total cost of a two-hour event with Standard input at 1080p and delivered to 200 viewers from the US (100 viewers in SD, 50 viewers in HD, and 50 viewers in Full HD) is $34.00. Depends who you are. DrDisrespect could have the cost of a day's streaming covered in 15 minutes of donations. I've got a gigabit link I can play with, so for me it's "free", but for those who just want to stream a few times per month it's potentially a winner.
- ddorian43 6y agoDrDisrespect doesn't have 200 viewers. Multiply the numbers and see all donations going to amazon.
- franga2000 6y agoThis looks really good! I just set up Open Streaming Platform [0], but I wish I had found this sooner, as setting that up was slightly annoying (nothing against the platform - it's been working great, I just don't need its full power and my server is a huge mess). Next time I'm setting up a streaming server, I'll definitely be checking this out! [0] https://openstreamingplatform.com/ https://openstreamingplatform.com/
- gabekangas 6y agoAwesome! Let me know if you have any questions when the time comes.
- 101008 6y agoThis is super nice so congratulations - but I wouldn't it use self-hosted version of Twitch to sell it. I have a few friends who use Twitch and they don't use it beause it is easy to stream, they use it because of all the features related to their suscribers. Email notifications, payments, donations, etc. Sayings this is the self-hosted version of Twitch is like saying a Wordpress with password is a self-hosted version of Patreon.
- suyash 6y agonot to mention the community that already exists on Twitch would take massive effort to re-build elsewhere.
- alfg 6y agohttps://github.com/arut/nginx-rtmp-module https://github.com/arut/nginx-rtmp-module is also great for anyone that wants to setup just a streaming server. However, it doesn't seem to be maintained anymore, but there are some maintained forks. I made a Docker setup a while back to simplify the configuration with basic settings for anyone curious: https://github.com/alfg/docker-nginx-rtmp https://github.com/alfg/docker-nginx-rtmp
- zwlee90 6y agocool stuff.. PS note XSS by manipulating the img URL of an emoji in the input
- cmer 6y agoThis looks great! I’ve been looking for a solution to broadcast about 20 IP cams on the web (behind auth). Could this or it’s backbone be used to do that?
- aghilmort 6y agocongrats, Gabe -- amazing to see Owncast grow these past few months!!! great work by you and the team!