Live data from Hacker News

Show HN: Lightspeed – subsecond, open source, self hosted stream from OBS

github.com

121–130 of 141 posts

Re: Show HN: Lightspeed – subsecond, open source, self hosted stream from OBS

#122
post #42
post #2

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 [1] 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 ser…

Awesome! I was looking for something like this when trying to play a local multiplayer game via the Internet in an early lockdown. There are, or were, no good turnkey solutions for this. Twitch and Youtube have 5-10s latency, which is often not good enough. Mixer promised (and presumably delivered) ~1s latency using the FTL protocol you use, but they had a wait list of a couple of days or weeks, and of course now, th…

> Even Steam Play Together, ostensibly built for this purpose, wasn't low latency enough in my limited experience (this really surprised me, so maybe I'm doing it wrong).

I've had good experience with Steam Play Together, mostly playing Unrailed (a hectic game in the style of Overcooked). I definitely forget about the remote connection while playing. We were 1000 km apart, but had quite a good connection (100 Mbit, 15-20 ms ping).

Re: Show HN: Lightspeed – subsecond, open source, self hosted stream from OBS

#123
post #39
post #2

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 [1] 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 ser…

Really cool! You say you use Rust and Go. Why both? I imagine Rust for super performance sensitive stuff and Go for the rest, for faster development?

This was going to be my question too basically.

Hoping to see OP answer this and in particular what I would like to see them comment on is how they divide their codebase between these two languages. Which parts are being implemented in which of those languages and why.

Personally a huge proponent of Rust.

Re: Show HN: Lightspeed – subsecond, open source, self hosted stream from OBS

#124
post #115

This is awesome! I wanted to make something like this too after Mixer shut down and I didn't have good options anymore to stream low latency gameplay to friends. But I was too lazy to do it properly. I ended up with this hack: https://i.imgur.com/jDeMxly.png Redirect the "Record" button of obs to make ffmpeg output to an http endpoint, which is a small server that just forwards any bytes it receives to connected cons…

What do you use for your small server for forwarding bytes?

Re: Show HN: Lightspeed – subsecond, open source, self hosted stream from OBS

#125

Earlier quoted context omitted.

Doesn't matter. Copyright, without the licensing exceptions , won't allow EvilCorp Inc. use your code even if you publish it in the clear on the internet. Also, more relevant to the discussion I was responding to, the GPL license doesn't allow re-licensing without consent (or a pre-arranged copyright assignment - a contributor's agreement). And it's copyright law which enforces this.

Given past experiences, I see large group projects trending towards having CLAs/DCOs where you give up ownership of your code anyway. Most people don't want to work with random contributors who wish to hold a gun to their heads in perpetuity.

DCOs don't give copyright ownership to anyone else or even any more rights to anyone else. It is simply a declaration that you have the permission to license the code you wrote under the license you're giving it for.

This article gives a nice description of the differences: https://opensource.com/article/18/3/cla-vs-dco-whats-differe...

Re: Show HN: Lightspeed – subsecond, open source, self hosted stream from OBS

#126

Earlier quoted context omitted.

I've played local multiplayer games over parsec ( https://parsec.app/ ), it works great and is pretty much turnkey

Parsec looks great, but I'd be grateful for metrics (bc who knows what "low-latency" really means).

In home streaming with Parsec for me with a MoCA/Ethernet connection typically has 1-2ms of network latency. Over wifi in-home is more, closer to 20-30ms with a mediocre laptop wifi card. Playing online with my brother who lives 35 miles away using an Ethernet connection I typically see 15-25ms latency, not much worse than a 'meh' bluetooth controller. It's likely worth noting that my brother and I both have the same cable internet provider, but we also sometimes play with my brother-in-law who lives another 40 miles from me (~60 miles from my brother) and we can all play games like Streets of Rogue together from my brother's PC without issue.

Re: Show HN: Lightspeed – subsecond, open source, self hosted stream from OBS

#127
post #12

Related: a fork of OBS Studio with WebRTC support https://github.com/CoSMoSoftware/OBS-studio-webrtc

For anybody thinking about contributing this, this is sadly as close to not open source as open source gets. I tried to contribute to this, but it's impossible to build without the webrtc binary and the docs are deliberately opaque about going about building your own version of the binary. You are encouraged to pay the (almost sole) contributor of this repo for his build of webrtc. For this reason it's not really surprising that this version is both quite out of sync with the mainline OBS and also has only one or two contributors. Fortunately, for me, most plugins built with the mainline OBS do work with this.

I get that the maintainer has put a lot of work into this and wants to try and monetize some part which is hard when OBS is GPL, but depending on a binary which is nigh-on impossible to build and then charging for it on your website just feels a bit of a shitty way to do it.

Re: Show HN: Lightspeed – subsecond, open source, self hosted stream from OBS

#128
post #2

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 [1] 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 ser…

The ingress components is interesting to me. It takes the OBS stream, via the FTL protocol, & converts it into something for WebRTC to use, yes? What drove you to use FTL protocol for ingestion? Did you consider alternatives like RTMP, which I believe OBS also supports?

I hand't heard of FTL before. Apparently it was a protocol used in Microsoft's now-defunct game-streaming service, Mixer. I found some discussion of the various streaming protocols here[1], which included some description of FTL.

I guess it comes down to latency. That would still have left SRT on the table, yes?

Great project. Such a key area of connectivity for us all. So glad you did this. Thanks.

[1] https://restream.io/blog/streaming-protocols/

Re: Show HN: Lightspeed – subsecond, open source, self hosted stream from OBS

#129
post #39
post #2

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 [1] 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 ser…

Really cool! You say you use Rust and Go. Why both? I imagine Rust for super performance sensitive stuff and Go for the rest, for faster development?

I think it was a matter of what libraries were available where. Namely, Lightspeed-webrtc uses the extremely popular & robust Go library Pion[1] for webrtc. It's a little over 500 lines.

The Rust Lightspeed-ingest[2] server is also ~500 lines of code, and primarily handshakes the FTL protocol used to communicate with OBS.

There is a Pion port to rust[3] that is in progress. I am not sure the state of this work. Pion is used quite extensively by many many projects; I'm not sure if the rust webrtc-rs port has any notable users yet. As I began by saying, I expect the trustability & extensiveness of Pion is what lead to lightspeed-webrtc being written in Go.

[1] https://pion.ly/

[2] https://github.com/GRVYDEV/Lightspeed-ingest

[3] https://github.com/webrtc-rs/webrtc

Re: Show HN: Lightspeed – subsecond, open source, self hosted stream from OBS

#130
post #48
post #42

Earlier quoted context omitted.

Awesome! I was looking for something like this when trying to play a local multiplayer game via the Internet in an early lockdown. There are, or were, no good turnkey solutions for this. Twitch and Youtube have 5-10s latency, which is often not good enough. Mixer promised (and presumably delivered) ~1s latency using the FTL protocol you use, but they had a wait list of a couple of days or weeks, and of course now, th…

Why do you need such low latency for live streaming? For the majority of cases 10s latency does not really matter.

I'll bite. I play D&D remotely with my friends. I need to be able to have low latency voice and video communication, but I also need control over the audio codec and bit rate. Zoom and other video conferencing solutions use codecs optimized for voice, which makes music and sound effects sound like a Himalayan AM radio broadcast. Twitch and Youtube give me control over the video and audio quality, but the latency is 5+ seconds even on low latency mode. I tried running voice over zoom and video and music over youtube, but then drawing on the map is 5+ seconds out of sync with me saying "look here".
Post reply on HN