4 ms·
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
by KaoruAoiShiho 8y ago
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.
- Sir_Cmpwn 8y agoI 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-reference-player/index.html 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.
- madeofpalk 8y agoDoes Safari support DASH yet? Or, does Chrome support HLS?
- Sir_Cmpwn 8y agoDash.js polyfills it in for unsupported browsers and it works fine, I suggest just using that and not worrying about it.
- melito 8y agoSafari 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.
- j4pe 8y agoI would definitely read that post. I've had bad times in the past with video codecs.
- reid 8y agoIf 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/tree/experimental 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 https://github.com/awakening-church/live-infrastructure Or DigitalOcean: https://github.com/awakening-church/live-infrastructure/tree/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.
- j4pe 8y agoWow, 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.
- reid 8y agoThanks 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.
- BLanen 8y agoI 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.
- toomuchgov 8y agoEh, 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.
- djsumdog 8y agoTo 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.
- melito 8y agoAlso chiming in with a project I've put together in Swift https://www.github.com/krad/morsel https://www.github.com/krad/morsel https://www.github.com/krad/plainview https://www.github.com/krad/plainview https://www.github.com/krad/pupil 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 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.
- btown 8y agohttps://antmedia.io/ https://antmedia.io/ and https://www.red5pro.com/ https://www.red5pro.com/ have open source RMTP + WebRTC servers, as well as hosted solutions. Both are compatible with (versions of) https://obsproject.com/ https://obsproject.com/ for live desktop capture, so would be a solid basis for building a Twitch competitor.
- m3adow 8y agoThat is really interesting. I searched for something like this a couple of weeks ago, but wasn't successful.