Hacker News new | comments | show | ask | jobs | submit login
Show HN: Strimpack – roll your own livestreaming portal, chat, subs, and forum (github.com)
249 points by j4pe 4 months ago | hide | past | web | favorite | 53 comments



> And because the livestreaming platforms [obviously referring to Twitch] take an egregious chunk of the money people tip streamers, even after they've ground their way to "partnered" status.

> The application has lots of external dependencies. In particular, you need: > Twitch - a Twitch account with an application registered on their developer console.

I'd be really interested to see what happened if a popular streamer used a platform like this to completely bypass how Twitch supports itself, while still using Twitch's bandwidth / services / etc. Presumably Twitch would ignore it until it became a problem, and then change their TOS to disallow it.


Back when Twitch was Justin.tv, we put in a lot of effort to make sure we only sent video to a copy of our player that was successfully showing our ad placements. I imagine that similar protections are still in place, but it's been almost a decade since I worked there.


There exist open source clients which can play Twitch livestreams, so I’m not sure how much effort is being concentrated there anymore: https://github.com/streamlink/streamlink


I use adblockers and I've never seen ads on Twitch


Not so much work anymore. It seemed there was a decent push when the html5 client was released, but nowadays you can just use streamlink or many other programs that are similar. I just sub to streamers that I want to support.


We've seen this story play out before, exactly as how you describe.

However, if it gets kids to docker compose, well that's a net positive.


I don't understand though, most streamers get their donations via third-party platforms already (streamlabs etc). Are they bypassing as well? As a matter of fact, Twitch just recently added a native ways to accept donations (bits).


Bits are a way of donating where Twitch gets a cut.

They can’t get rid of 3rd party donations because they’ve been there forever, but they can continue to incentivise every other kind of revenue except them.

Anecdotally 3rd party donations have dropped a lot over the last couple of years in relation to other forms


How convenient - I just finished a rough mockup for a site that matches this perfectly. (Livestream / live podcasts for color commentary / announcing during live sports)

https://datastudio.google.com/reporting/1sSM6zloqJ4eGOywLD4n...


Setting up a live streaming site is easy, we did whitelabel sites for Camarades.com a long time ago. The hard part is - just like with chatroulette clones - to keep it clean (if that's your objective). If you don't keep a very good eye out you'll be running a fetish porn site in an eyeblink, and possibly an illegal one at that.


I understood the objective to be for each streamer to run their own site where only one person or group does the streaming and people just watch and interact. I think keeping the text chat clean is pretty much the same as keeping a forum (like based on discourse) clean. Thoughtful defaults and good tools for moderators should be enough for many cases.

From what I've heard it is bandwidth that costs the most? Like $20 a month gets me a droplet on digital ocean with 4TB transfer, 4GB memory, and 80GB of storage. If you have 25 concurrent viewers each watching 100 hours of Livestream every month and each hour of 1080p60 is 1GB, how much ___ will you need?

25 * 100 * 1GB = about 2.5TB? Does that sound about right?


If you're streaming through twitch, isn't it essentially 1 viewer, since you're just uploading it to their servers?


Bandwidth is only expensive when you're a small consumer, or when you buy at places like AWS.


Love the narrative style!

  setup instructions

  1. Get a server. Not a tiny one.
  ...


Yes, interviewing does suck. Cool project and I hope that it gets you noticed. I love seeing these cool one-off, hyper focused things on github.


Ohh haha. I thought this was a replacement for twitch or similar, but it's just the chat/subs/forum, the most important part, the live streaming, is not part of this project.


If folks would like to serve their own live streaming video, I worked on this Docker image for my church which provides a few HLS streams from an incoming RTMP stream:

https://github.com/awakening-church/awakening-nginx-rtmp/tre...

You can hack on this foundation to create your own solution.

Also, you can use Terraform to easily run this on Azure:

https://github.com/awakening-church/live-infrastructure

Or DigitalOcean:

https://github.com/awakening-church/live-infrastructure/tree...

It's fairly cheap, costs about 25 cents an hour on DigitalOcean. Compare to hundreds of dollars for some other live streaming services.


Oh hey! I know you guys! That's really cool to see stuff the Church is doing online to further technology growth and use. Way to go!

I'll definitely keep this in my pocket as we move towards our own live streaming platform. Thanks for sharing!


Sweet! Thanks. I want to keep this kind of thing going. Are you in the Bay Area?


Wow, this is incredibly useful. I'd love to include an option for a self-hosted stream. I looked into setting up a streaming service as well, but decided to just release it with an iframe for the time being.

Thanks for sharing.


Thanks for the kind words! I’m interested in helping smooth out the edges and making it easier to use, so let me know how I can be helpful. Email in profile.


I feel like that with a geographically broad area you're not going to want to host this yourself and MUCH rather use someone's services for VOD/live streaming. Doing CDN and stuff for video seems like a pain. Additionally for live video.


Huge price difference fixed bandwidth cost vs. CDN.


Nah. $.04/GB is practical.

https://www.keycdn.com/pricing


That's still pretty high if we're just considering raw transit costs. The highest rate I would be comfortable paying for a CDN would be $0.015/GB ($0.03/GB in Asia), that's still way above market rates for most IP transit right now.

Much better deal (and probably way better CDN) than AWS provides, but AWS egress rates are suicidally bad, especially for high bandwidth stuff like video. If you're doing any serious streaming, avoid AWS like the plague unless you like livestreaming yourself filing for bankruptcy.


Vs. something like 0.005/GB for Digital Ocean $5 tier. Practical is very situational, but 10x cheaper is 10x cheaper.


Eh, I have done self-hosted Wowza in the past, which makes sense if you have the bandwidth.

You can also get per-hour Wowza AMI EC2 instances, so scale to those when you peak, and fallback to self-hosted for lulls.


How do you get from camera to the incoming RTMP stream part? That's what I'm unclear on.


Open Broadcaster Software (OBS) is very popular with twitch and other streamers.



What kind of upstream bandwidth does that take?


We need roughly around 4 Mbps for 720p. Our internet connection uplink is a bit slow, so we can’t reliably stream full HD.


I just did a side project at work dealing with live streaming, it's actually fairly simple if you understand ffmpeg. You can stream DASH like this:

    ffmpeg -i [...] -codec:v libx264 -profile:v baseline -pix_fmt yuv420p -codec:a aac -tune zerolatency -f dash -window_size 5 /tmp/live/live.mpd
Check out the ffmpeg-formats man page for a list of options you can use with -f dash. Then serve /tmp via nginx and point the reference client [0] at your mpd file. Tada!

You might want to use the nginx RTMP module, too, if you want to receive an RTMP stream from e.g. obs and wang-bang it into DASH.

[0] http://reference.dashif.org/dash.js/v2.6.8/samples/dash-if-r...

I'll write up a more detailed blog post at some point.


I would definitely read that post. I've had bad times in the past with video codecs.


Does Safari support DASH yet? Or, does Chrome support HLS?


Dash.js polyfills it in for unsupported browsers and it works fine, I suggest just using that and not worrying about it.


Safari doesn't support DASH and probably will not.

Chrome does not support HLS.

DASH isn't plug and play. It's an XML representation describing how to ingest media streams using something like Media Source Extensions.

There are a lot of players out there that will do this heavy lifting for you.


Also chiming in with a project I've put together in Swift

https://www.github.com/krad/morsel https://www.github.com/krad/plainview https://www.github.com/krad/pupil

morsel ingests h264 & aac and produces fragmented mp4 files & playlists. plainview reads the playlists and uses MSE in the browser to play them via the web pupil is a WIP server that reads h264 & aac over TCP and passes that data to morsel, then uploads to any s3 compatible storage (AWS, Minio, etc)

The swift stuff works on Linux, iOS, tvOS, etc

edit:

There's also a WIP project called "kubrick" https://github.com/krad/kubrick

It's a simple POP wrapper around AVFoundation that allows for building media processing pipelines.

There's an example in the project for reading video samples and passing them through a series of Metal shaders to produce fun effects.


https://antmedia.io/ and https://www.red5pro.com/ have open source RMTP + WebRTC servers, as well as hosted solutions. Both are compatible with (versions of) https://obsproject.com/ for live desktop capture, so would be a solid basis for building a Twitch competitor.


That is really interesting. I searched for something like this a couple of weeks ago, but wasn't successful.


To be fair, you're not going to get the viewership without using a platform.

I feel like any streaming implementation should be setup you broadcast to put yourself hosted setup, and to twitch/youtube/facebook/et. al. I haven't done any live stream/podcasts, but I think there is already proxy software that does this.


Looks awesome.

At my company [1], we work with organizations who do livestreaming to enable live Q&A, moderated chats and polls. If anyone's interested in hooking up such interactivity to your own livestreams, drop me a message!

[1] https://www.pigeonholelive.com


I would say if you really wanted to make this easier for streamers to use you could use helm to package up a kubernetes configuration (a bit of work) and then put it into something like google cloud launcher so you could just point and click to set this up.


Not quite point-and-click, but at my church, we just type "terraform apply" every week to set up a live streaming system using:

https://github.com/awakening-church/live-infrastructure

Might be useful for others!


Great to get such a useful tool shared here Bro! I'll shoot you an email for further chat... Stay blessed!!!


I agree, one-click deploy would be the next step. Hadn't seen helm, I was debating between k8s and rancher.

If possible I'd like to avoid an opinionated hosting service like Google Cloud Launcher or AWS ECS, but I recognize that it's probably necessary. The only open source one-click deploy I've seen is a church service[1], but the author of that project accomplished it by with a separate app that provisions the necessary DO droplets via API and presenting the credentials to the user.

1: https://github.com/churchio/onebody


Rancher 2.0 is a Certified Kubernetes implementation:

https://landscape.cncf.io/grouping=landscape&landscape=certi...

[Disclosure: I run the Certified Kubernetes program.]


See cloudron.io. check out the demo.


Really cool but I have a question: Does the site ask users to connect to any third-party domains or run javascript from third parties? If so, what information do they get about users?


This is effectively what I have seen a couple of somewhat popular YouTube shows do to combat the toxicity of the platform. Embed the live video in their page, and provide their own realtime chat to the stream on their own site, complete with merch store/other content/etc.

I think with Twitch it's not really necessary. The community itself is generally, with exceptions, not toxic (being curated by streamers).

The 'who made this and why' seems to indicate some minor antagonism for the platform financials. Their take on bits transactions is definitely abhorrent, but they haven't blocked 3rd party transactions yet. People know they are getting screwed when they buy bits, but they have other options.

I hated bits when they came out, but they fill a bit of a niche role that a streamlabs/paypal donation doesn't. If the end goal is to shift money from viewer to streamer, bits smooths a few obstacles.

Once a bits purchase is made, they can be spent on any streamer instead of repeating the transaction for every person. The actual tip itself is an almost frictionless transaction, just a few keystrokes in the chatbox. This avoids the bounce rates seen when a user has to open a separate browser window, possibly log into paypal, or providing information to a third party site, etc. Most streamers I've discussed this with privately have said that they agree on the rates, but that it's still been a net benefit (sorry, this is just anecdotal). The worry of course is that it's a precursor to complete control of transactions (eg, banning paypal/streamlabs/etc) despite claims this won't occur.

But all of that aside.. I think the project would get a lot more traction if you at least appeared to try to work WITH the platform instead of against it.

There's a lot of value you can add here just to augment the system instead of combating it. Help the streamer build their online profile. Some thoughts:

* Keep the in-line stream, embedded with the Twitch chat if possible.

* Build a CMS system for the streamer to showcase custom content while he or she is offline.

* Add a merch store or integration.

* Embed the streamer's twitter feed.

* Show off their Discord.

* Keep the forum.

* Add a tool to sync up community permissions across various tools (twitch permission, discord, steam groups, etc).

* Show off their YouTube content.

* Add a calendar

* Show when the streamer's friends are online and streaming.

* Make all of this modular so streamers can pick-and-choose

* Optional WYSIWYG style edits (I know, but.. it makes this more accessible to users)

There's a lot more. Some of the above may be bad ideas, and I'm certain some are not for every streamer (and I don't think should just turn on all-of-the-things if they did exist).

I love the idea of giving streamers a way to build further upon their Twitch audience. It could increase engagement and help Twitch. It could also help reduce a streamer's dependency on a single platform, eventually, without outright confronting that platform.


Awesome!


Taking on twitch? I dig it


Taking on twitch by using twitch.. bold move.




Applications are open for YC Winter 2019

Guidelines | FAQ | Support | API | Security | Lists | Bookmarklet | Legal | Apply to YC | Contact

Search: