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.
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.
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:
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 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.
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.
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.
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)
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.
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.
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)
> 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
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.
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
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.
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!
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?
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?
55 comments
[ 4.4 ms ] story [ 105 ms ] threadYou 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.
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.
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.
Thanks for sharing.
You can also get per-hour Wowza AMI EC2 instances, so scale to those when you peak, and fallback to self-hosted for lulls.
https://www.keycdn.com/pricing
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.
I'll definitely keep this in my pocket as we move towards our own live streaming platform. Thanks for sharing!
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.
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.
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
https://landscape.cncf.io/grouping=landscape&landscape=certi...
[Disclosure: I run the Certified Kubernetes program.]
https://github.com/awakening-church/live-infrastructure
Might be useful for others!
https://datastudio.google.com/reporting/1sSM6zloqJ4eGOywLD4n...
> 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.
However, if it gets kids to docker compose, well that's a net positive.
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
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.
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
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?