r/WebRTC • • Jan 04 '21

Project Lightspeed: A self-contained, sub-second, open source live stream platform

Welcome to Project Lightspeed. This is a project that allows anyone to easily deploy their own sub-second latency live-streaming server. In its current state you can stream from OBS and watch that stream back from any desktop browser.

This has been a super fun project which has taught me more than any other project I have done. It uses Rust, Go and React and can be deployed fairly easily on a very lightweight server. For example, I have been doing my test streams on a $5 Digital Ocean droplet and the CPU usage is at around 20%. Granted not a lot of people are watching however it is more lightweight than a solution such as Janus.

The point of this project is twofold. First I wanted to learn more about WebRTC and real-time communication in general. Second, I wanted to provide a platform where people can setup their own little live-stream environment. Maybe you just want a place where you and some friends can hang out or you are sick of the main-stream platforms.

Anyhow as of writing this post it is v0.1.0 and considered an MVP release. In the coming months I (and hopefully some of you :)) will be adding more features and trying to flesh this out into as much of a full featured platform as possible. Feel free to take a look at the repo and let me know what you all think :)

https://github.com/GRVYDEV/Project-Lightspeed

16 Upvotes

10 comments sorted by

2

u/berrioko Jan 04 '21

I can take a peek at ingest. I've been working on the beginnings of a rust SFU over xmas and I've learned a lot about config and logging in rust. I see you'd like to take some command line args or env args / config file for some hardcoded parameters like IP. Seems like something I could PR.

1

u/Grav3y57 Jan 04 '21

I really want the ingest to be able to relay the rtp packets on the loopback interface but I was getting awful packetloss when I implemented that

1

u/berrioko Jan 04 '21

Started a convo about config on the IP config todo.

Was docker involved at any point in the packet loss scenario?

1

u/Grav3y57 Jan 04 '21

No it was not

0

u/sumdudeinhisundrware Jan 04 '21

I'm sure what you've done is pretty awesome but the fact that you chose to implement the client side with React is VERY limiting. Not everyone uses it or has any ability to use it. Some organizations outright ban its use due to its connections with Facebook and out of date impressions about its terms of use. I highly suggest removing your dependency on React.

*also for established projects using Node but not using React, incorporating a library that uses React is incredibly hard and is basically a non-starter.

4

u/Grav3y57 Jan 04 '21

At the end of the day the react side is super simple and framework agnostic so I’ll probably just move to Vue or Svelte in the short term

6

u/rektide Jan 04 '21

Do not worry about this dude. Any framework is a choice. There's very few good ways to build portable, generally useful javascript. This dude is being a classic internet complainer/hater. Ignore them. Switching to Vue or Svelte is not going to be any less limiting.

The only real escape is using something like /r/webcomponents. I did some playing around with Github's new Catalyst framework over the holidays, quite enjoyed it. But you'd be one of the only people on the planet using it. Stick with whatever works for you.

2

u/Grav3y57 Jan 04 '21

I’m not married to react here. I originally wanted to use elixir but ditched it for now since it would be a bit more complicated to deploy

3

u/xqst Jan 04 '21

I worked on another WebRTC project and I built the client from scratch. Anyway in a webRTC project you really have to get your hands dirty and rewriting the client is the least concern. I'm a Vue person myself but the fact that he chose React is a logical one, given it's the most popular frontend platform.

1

u/[deleted] Jan 04 '21

wtf are you talking about. React is the most popular, widely supported framework on the market. If bundle size is a limiting factor, sure, use something more lightweight.