ExploreTrendingAnalytics
Nostr Archives
ExploreTrendingAnalytics
Matt Lorentz22d ago
While I put the finishing touches on Horcrux I'm starting to contribute to Flotilla, and one of my goals is to get Discord-style voice channels added before their age-verification policies go into effect. If you are a user of Discord voice channels, what's one thing you would change about them? I've always been interested in Discord voice channels because they are a rare combination of ephemeral, porous, serendipitous social space on the internet. Most of our internet communication happens in low-bandwidth, structured spaces where the contents are saved permanently. So in that sense Discord voice channels share more in common with IRL spaces than something like microblogging. If you're a user of voice channels or otherwise would like to give input on them, I'd love to interview you. And if you'd like to be an early tester or to collaborate on the implementation please reply here or send me a DM!
💬 26 replies

Replies (26)

verbiricha22d ago
cc @TheGrinder
0000 sats
TheGrinder22d ago
Great, thanks for the tag!
0000 sats
verbiricha22d ago
cc @TheGrinder
0000 sats
Repeatedly nuked profile22d ago
I'd advise against it, it's all about latency, discord voice is 90% for gaming, a world where 75ms latency is okay but 150ms is unacceptable. There's non gaming discussions, but a lot of them are just getting ready for a session, or post-session, you still need the session. Unless you put a big disclaimer do not attempt to use this for abcd, in conditions 1234, etc. I'd stay far away. Their voice chats, like those of Kick or Twitch, have over the years become just so insanely complex and latency optimised at every possible point.
0000 sats
Sam22d ago
Nice. I really hope to see flotilla go somewhere. We looked at webrtc for voice initially.
0000 sats
TheGrinder22d ago
Sign me up. I had my discord server since 2018 and once those discord changes comes into effect we'll shut it down. Interested in testing with the gang. We host long voice sessions when we're gaming and I'm sure @S!ayer (and everyone I couldn't tag LOL) would be happy to test and provide feedback too. Thing is, I just moved and my ISP screwed up the switch. So I probably won't be much use until later this week.
0000 sats
Ingwie Phoenix (aka. birb)22d ago
I never got the time to implement it myself, so this one is a rough concept and a freebie. Two things: WebRTC ICE candidates and LiveKit. Public channels: ICE messages are sent to the advertised server, probably a TURN-enabled one, to negotiate connection details. Any other member joining, receives those too. Since we are on Nostr, send them as tags in an apropriate event. A public channel _is_ public, after all. You can actually borrow part of the implementation from SimpleX Chat, they do this for direct calls - just implement it as a hub-and-spokes where you have a central (as picked per community, perhaps part of the metadata) server. These events can be sent over Nostr to reuse an existing connection and keep data in a similiar flow. LiveKit is a server you can host that can handle a lot of these things for you. Basically all Discord alternatives use that to realize voice channels - and for good reason. You can later extend that for video too. Private calls can be handled via encrypted private messages and giftwrapped events. In fact, once two clients find themselves having exchanged connection details, you can switch to a direct p2p nostr event stream and keep any further negotiation off the wire, if you will, and only between the two. So, since LiveKit can handle WebRTC ICE stuff and provide the hosting solution, you only _really_ need to implement the bells and whistles for the transport and negotiation and hand off the details to LiveKit itself. I looked at Floatilla but my strfry relay wouldn't work with it and I found no public relays to test it with... so I gave up on it fast. And this is kinda important; make sure it works for people trying things out for the first time. Friction means they'll drop it fast. I tried to selfhost Nerimity, ran into build-time issues for the containers, and yeeted it basically immediately. However, I did leave a ticket, since the project is AGPLv2. Good luck. After having read how WebRTC works, I genuenly have respect for big platforms using it. Its actually kinda scary. xD
Matt Lorentz22d ago
@verbiricha have you thought about this for chachi?
0000 sats
Matt Lorentz22d ago
@verbiricha have you thought about this for chachi?
0000 sats
Matt Lorentz22d ago
@Kieran @Derek Ross do you think it makes sense to use the nostrnests.com architecture with livekit and NIP-53 for this? If you were building nostrnests today would you use the same tech?
0000 sats
Matt Lorentz22d ago
@Kieran @Derek Ross do you think it makes sense to use the nostrnests.com architecture with livekit and NIP-53 for this? If you were building nostrnests today would you use the same tech?
0000 sats
S!ayer21d ago
God don't make discord. Make ventrilo or TeamSpeak.
0000 sats
TheGrinder22d ago
Great, thanks for the tag!
0000 sats
TheGrinder22d ago
Yeah it will be a challenge to compete. In particular in gaming latency in voice defeats the purpose of having voice Comms in the first place. You also need push-to-talk, voice activation for people with good mics, noise cancellation and - ideally - the ability to set the region for the voice server. EU gamers on discord are unlikely to set a US voice server for Comms and vice versa. For my community we've decided to go with a nip-29 relay for chat, images, videos etc and until good voice solutions evolve around nostr we'll probably setup a TeamSpeak or Ventrilio Server. But will definitely test Flotilla as well.
0000 sats
Matt Lorentz22d ago
Hm, yeah I'm not thinking of gamers specifically. But reading about Discord's tech makes it clear that it's very difficult to do well. I self-host a teamspeak server for my gaming friends and it works well enough. It would be nice to have better chat integrated in (like Discord) but other than that we are pretty happy with it.
0000 sats
Matt Lorentz22d ago
Sweet, I will definitely ping you when I have something to test!
0000 sats
TheGrinder21d ago
Looking forward to it!
0000 sats
0000 sats
Matt Lorentz22d ago
Thanks! Another vote for LiveKit. Seems like that's the way to go. I haven't tried to self-host flotilla yet but I plan to. Hopefully I can smooth out the docs for that. If you want to give the app part another try I'll DM you an invite to the "meta" server.
0000 sats
Derek Ross22d ago
i would perhaps look into MOQ.
0000 sats
Kieran22d ago
MOQ is currently designed for broadcast, you wouldnt be able to reuse the relays etc from moq-lite or the other IETF drafts, livekit is an SFU
0000 sats
Derek Ross22d ago
hey i didn't say it would be good, i just said i would look into it because it's new and bleeding edge :P
0000 sats
TheGrinder21d ago
Why not WebRTC with Opus + NIP-29? I debated the idea with my agent and here's the summary. Care to hear your thoughts on this. For a NIP-29 group chat app, the cleanest “voice chat” implementation is: 1) Transport: WebRTC (real-time, NAT traversal, battle-tested) Why: you get P2P audio with congestion control, jitter buffers, echo cancellation, device access, and NAT traversal (ICE/STUN/TURN) out of the box. Codec: Opus (use this unless you have a very specific reason not to). It’s effectively the WebRTC audio codec and is designed for low-latency interactive audio like VoIP / in-game chat. https://developer.mozilla.org/en-US/docs/Web/Media/Guides… 2) Signalling: use Nostr for session setup (offers/answers/ICE candidates) Nostr is great as the signalling plane (exchange SDP + ICE candidates), while WebRTC carries the media. A common approach: When a user taps “Join voice” in a NIP-29 room, you publish encrypted signalling messages (offer/answer/candidates) to the other participant(s) (or to a coordinator) via Nostr. There’s already discussion/precedent for doing WebRTC signalling over Nostr DMs. https://github.com/nostr-protocol/nips/issues/771 3) Topology decision (this is the real product choice) A) Small groups (2–6 people): Mesh P2P Everyone connects to everyone (N×(N−1) streams). Pros: simplest infra (no media server), very “sovereign”. Cons: scales poorly; uplink dies fast as people join. B) Anything beyond small groups: SFU (Selective Forwarding Unit) Each client sends one upstream audio stream to the SFU; SFU forwards to others. Pros: scales to larger rooms; better UX on mobile/weak uplinks. Cons: you run infra (but it can be self-hosted; still fits the Nostr ethos if you keep it modular). If you want “Discord-like” rooms, you want an SFU. 4) Practical codec settings (sane defaults) With Opus in WebRTC you typically ship: 48 kHz Opus, variable bitrate, 20 ms frames (WebRTC defaults are usually fine) Enable DTX (silence suppression) for bandwidth savings in speech rooms For “music mode” rooms, allow toggling off aggressive noise suppression/AGC (WebRTC defaults are voice-optimised) 5) Encryption & identity WebRTC media is encrypted (DTLS-SRTP). Nostr keys can authenticate who is allowed into the voice room (tie it to NIP-29 membership/moderation rules). NIP-29 is explicitly about relay-managed closed groups. https://github.com/nostr-protocol/nips/blob/master/29.md TL;DR implementation pick WebRTC + Opus for audio Nostr for signalling (offers/answers/candidates), encrypted Mesh for tiny rooms, SFU for real rooms
Derek Ross22d ago
i would perhaps look into MOQ.
0000 sats
Kieran22d ago
MOQ is currently designed for broadcast, you wouldnt be able to reuse the relays etc from moq-lite or the other IETF drafts, livekit is an SFU
0000 sats
Derek Ross22d ago
hey i didn't say it would be good, i just said i would look into it because it's new and bleeding edge :P
0000 sats
TheGrinder21d ago
Why not WebRTC with Opus + NIP-29? I debated the idea with my agent and here's the summary. Care to hear your thoughts on this. For a NIP-29 group chat app, the cleanest “voice chat” implementation is: 1) Transport: WebRTC (real-time, NAT traversal, battle-tested) Why: you get P2P audio with congestion control, jitter buffers, echo cancellation, device access, and NAT traversal (ICE/STUN/TURN) out of the box. Codec: Opus (use this unless you have a very specific reason not to). It’s effectively the WebRTC audio codec and is designed for low-latency interactive audio like VoIP / in-game chat. https://developer.mozilla.org/en-US/docs/Web/Media/Guides… 2) Signalling: use Nostr for session setup (offers/answers/ICE candidates) Nostr is great as the signalling plane (exchange SDP + ICE candidates), while WebRTC carries the media. A common approach: When a user taps “Join voice” in a NIP-29 room, you publish encrypted signalling messages (offer/answer/candidates) to the other participant(s) (or to a coordinator) via Nostr. There’s already discussion/precedent for doing WebRTC signalling over Nostr DMs. https://github.com/nostr-protocol/nips/issues/771 3) Topology decision (this is the real product choice) A) Small groups (2–6 people): Mesh P2P Everyone connects to everyone (N×(N−1) streams). Pros: simplest infra (no media server), very “sovereign”. Cons: scales poorly; uplink dies fast as people join. B) Anything beyond small groups: SFU (Selective Forwarding Unit) Each client sends one upstream audio stream to the SFU; SFU forwards to others. Pros: scales to larger rooms; better UX on mobile/weak uplinks. Cons: you run infra (but it can be self-hosted; still fits the Nostr ethos if you keep it modular). If you want “Discord-like” rooms, you want an SFU. 4) Practical codec settings (sane defaults) With Opus in WebRTC you typically ship: 48 kHz Opus, variable bitrate, 20 ms frames (WebRTC defaults are usually fine) Enable DTX (silence suppression) for bandwidth savings in speech rooms For “music mode” rooms, allow toggling off aggressive noise suppression/AGC (WebRTC defaults are voice-optimised) 5) Encryption & identity WebRTC media is encrypted (DTLS-SRTP). Nostr keys can authenticate who is allowed into the voice room (tie it to NIP-29 membership/moderation rules). NIP-29 is explicitly about relay-managed closed groups. https://github.com/nostr-protocol/nips/blob/master/29.md TL;DR implementation pick WebRTC + Opus for audio Nostr for signalling (offers/answers/candidates), encrypted Mesh for tiny rooms, SFU for real rooms
TheGrinder21d ago
I'd like to see a nostr native app with voice good as TeamSpeak's. Opus is probably the most suited for WebRTC I'm surprised to see that this was a topic in '23 already. https://github.com/nostr-protocol/nips/issues/771
0000 sats
cloud fodder22d ago
the gaming normies brought to my attention that discord is available for example on nintendo fukin switch.. so.. yah we have a lot of ground to make up
0000 sats
Matt Lorentz22d ago
Thanks! The more I understand how Nostr Nests work the more I think I'll do the same or very similar.
0000 sats
0000 sats
Matt Lorentz15d ago
LiveKit is basically a set of open source code to do exactly this! That's the direction we are heading, there is a PR going here: https://github.com/nostr-protocol/nips/pull/2238
0000 sats
TheGrinder15d ago
Reading into that conversation now. Thanks for sharing. "Can we just publish a kind defining the existence of an AV space in the group? Yes, but then who owns that space? The person who published the event. Now we have multiple owners creating rooms inside the same group. It's a complete nightmare." I've already pinned down solutions for this and it's a good case for taking an SFU approach in the product design over Mesh p2P rooms. However, SFU requires infrastructure.
0000 sats
Matt Lorentz22d ago
Thanks! The more I understand how Nostr Nests work the more I think I'll do the same or very similar.
0000 sats
0000 sats
Matt Lorentz15d ago
LiveKit is basically a set of open source code to do exactly this! That's the direction we are heading, there is a PR going here: https://github.com/nostr-protocol/nips/pull/2238
0000 sats
TheGrinder15d ago
Reading into that conversation now. Thanks for sharing. "Can we just publish a kind defining the existence of an AV space in the group? Yes, but then who owns that space? The person who published the event. Now we have multiple owners creating rooms inside the same group. It's a complete nightmare." I've already pinned down solutions for this and it's a good case for taking an SFU approach in the product design over Mesh p2P rooms. However, SFU requires infrastructure.
0000 sats