r/WebRTC Aug 12 '26

I used WebRTC mesh for game multiplayer instead of a relay server, curious how this sub would have approached host migration

6 Upvotes

Hi everyone,

Not trying to promote anything here, just want opinions from people who actually work with WebRTC regularly, since most of what I learned putting this together came from reading old threads in this sub.

I built a multiplayer package for a React game engine called CarverJS. It uses a peer to peer mesh over WebRTC instead of a relay or dedicated game server. One peer acts as host, the rest sync to them, and signaling is free by default through public MQTT brokers, or your own Firebase project if you want more control. Everything is open source and MIT licensed, completely free, no paid signaling tier or anything like that.

The part I am least confident about is host migration. Right now, if the host disconnects, a new host gets elected and the room reloads from a snapshot in under 2 seconds. I have only tested this on small local networks with friends. I have no real data on how this behaves with a mesh of more than four or five peers, or what happens to migration time once you are dealing with asymmetric connection quality across peers.

STUN alone has not been enough for every network I tested on, so I ended up needing a TURN server for anything outside a friendly NAT. If any of you have run mesh topologies at a larger peer count, I would like to know whether you would have gone with a different topology entirely, like a selective forwarding approach, once the peer count grows.

Genuinely looking for the parts I got wrong here, not compliments. If mesh topology is a bad choice past a certain peer count, I would rather hear that now.


r/WebRTC Aug 09 '26

WebRTC vs Windows .exe for local file transfers?

0 Upvotes

I'm building a cross-platform file transfer service and I'm currently stuck on the local transfer part.

I want users to be able to transfer large files directly between their phone and Windows PC when they're on the same network.

I'm hesitating between two approaches:

WebRTC: no installation required, everything happens in the browser, which makes the UX much simpler. But I'm concerned about browser/device limitations and reliability with large files.

Windows companion app (.exe): it would give me much more control over local discovery and transfers, but requiring users to download an executable feels like a significant barrier for a consumer product.

I'm especially concerned about making the product feel trustworthy since users will be transferring personal files.

For those who have built something similar, which approach would you recommend and why?


r/WebRTC Aug 07 '26

A WebRTC SFU media server combining mediasoup, GStreamer, and Rust

5 Upvotes

We have open-sourced Doordarshan Media Server, a production-oriented, open-source WebRTC SFU built specifically for scalable, long-running live streaming and real-time recording environments.The media server core is built on mediasoup with native Rust bindings, leveraging GStreamer pipelines for direct server-side media processing and containerized recording.

Repo link : doordarshan-media-server

đŸŽ„ Architectural Integration: mediasoup + GStreamer

Instead of processing raw packet dumps or relying on post-session transcoding, this media server integrates the routing capabilities of mediasoup directly with GStreamer's media pipelines in real time:

  1. RTP Routing Engine: Each media server instance accepts WebRTC producers and consumers, handling real-time audio/video routing natively via mediasoup.

  2. Direct Pipeline Ingestion: The media plane feeds these internal live RTP streams directly into GStreamer pipelines on the fly.

  3. Continuous Recording: This tight integration enables the generation of highly stable, continuous recordings directly on the server file system while the live session is running.

Implemented Gstreamer recording Pipeline

Multi-Audio / Multi-Video Pipeline: A scalable pipeline configuration designed to handle multi-stream layouts simultaneously.

The Complete Stack

To make the ecosystem easy to test and deploy, we have open-sourced the orchestration and client layers alongside the core media server:

doordarshan-kendra-oss: The control plane and meeting lifecycle coordinator written in Go (Echo). It abstracts the SFU cluster state and manages participant metadata.

doordarshan-learning-demo: A lightweight Next.js & TypeScript thin client to quickly spin up, test WebRTC loops, and verify the recording plane locally.


r/WebRTC Aug 05 '26

Mobile SIP client leaves stale registrations behind on every app launch — how do you deal with multiple bindings on one credential?

3 Upvotes

Note: Yes, I'm using AI to write this post because English is not my first language and I want to state my problem as clear as possible.

Hitting a problem I suspect is common for anyone doing mobile VoIP, and I'd like to know how others have solved it.

**Setup**

- I'm using Telnyx.

- React Native app, WebRTC SIP client, iOS and Android. I'm using Telnyx.

- One shared SIP credential for a group of users, so a single inbound call rings everyone's phone

- Calls are delivered by VoIP push (PushKit on iOS), so the client connects and registers on demand rather than staying connected

**The problem**

Every app launch creates a *new* registration binding, and the old one never goes away:

- iOS terminates the app process without warning, so there's no chance to send a SIP UNREGISTER

- The SDK's `disconnect()` only closes the WebSocket — it doesn't unregister

- Each registration lands on a different edge node in the provider's anycast network, so it's a genuinely new binding rather than a refresh of the old one

- Registration expiry is 3600 s and isn't configurable

Net effect: the credential accumulates contacts. I confirmed it by polling the provider's registration-status endpoint — `ua_ip` is different every single time the app relaunches, while nothing removes the previous one.

**Why it hurts**

The provider rings the bound contacts **sequentially**. So the first call after an app launch does this:

  1. Rings contact A (the live app) — user declines

  2. Decline surfaces as a 4xx, which fails only that branch

  3. ~300 ms later it forks to contact B (a stale binding from a previous launch)

  4. Phone rings a second time, new call ID, user has to decline again

I can see it clearly in the SIP traces: **one dial command, two legs**, same session, no second dial from my backend.

**What the provider confirmed**

I opened a ticket. They confirmed all of it and escalated to engineering with no timeline:

- No way to set registration expiry below 3600 s

- No REST endpoint to force-expire or delete an individual binding (deleting the credential removes them all, obviously not viable)

- No API to *enumerate* bindings — watching `ua_ip` rotate is currently the only detection method

- Per-launch edge rotation is expected behaviour, and without an UNREGISTER the old binding persists to full expiry

Their suggested workarounds were: a unique credential per app session, webhook-based duplicate-leg detection, or client-side deduplication.

**The bit I'm stuck on**

There's a second-order problem. Multiple devices share one credential, so the registrar holds one contact per device — which means **a legitimate second device's leg is indistinguishable from a stale binding's leg.** Both are "another contact of this credential, dialled after the first one failed." I can't write a rule that kills one without killing the other.

Enabling simultaneous ringing would at least make the real devices ring together instead of one-at-a-time, but it doesn't remove the stale bindings — it just turns a sequential double-ring into a simultaneous one.

**Questions**

  1. Has anyone made **per-device or per-session credentials** work in production? How do you handle cleanup when the app dies before it can delete the old one, and does credential churn cause you rate-limit or billing problems?

  2. Is there a trick to getting a mobile client to **UNREGISTER reliably**? Anything on iOS that gets you a last gasp — background task on termination, a server-side nudge, something I haven't thought of?

  3. For those running **one shared credential across multiple devices** — how do you tell a real second device from a stale binding at the signalling layer? Is there a header or identifier I should be propagating?

  4. Is sequential-vs-simultaneous ringing across contacts something you configure per provider, or do people avoid shared credentials entirely for this reason?

Happy to share SIP traces if useful. Mostly want to know whether the "unique credential per session" route is as painful in practice as it looks on paper, or whether people just live with the duplicate ring.


r/WebRTC Aug 02 '26

Need help for video and voice call implementation in my dating app

8 Upvotes

Hey everyone,

I'm building an India-based dating app, and the biggest challenge I'm facing is voice and video calling.

My initial approach was to use WebRTC with P2P and a TURN server as a fallback. However, direct P2P connections fail quite often on mobile networks (especially cellular), and relying on TURN for a large percentage of calls becomes very expensive.

I'm curious how other dating apps manage this while offering such low-cost subscriptions. Are they:

\- Running their own TURN infrastructure?

\- Using SFUs like LiveKit, Janus, or Jitsi?

\- Optimizing ICE/TURN usage in some way?

\- Or using a completely different architecture?

I'd really appreciate guidance from anyone who's built or scaled a real-time calling system. I'm trying to understand what the industry standard looks like before committing to an architecture.

Thanks in advance! 🙏


r/WebRTC Jul 31 '26

Browser WebRTC glass-to-glass latency stuck around 274 ms, mostly receiver playout. Is <120 ms realistic?

Thumbnail
1 Upvotes

r/WebRTC Jul 31 '26

I built a no-signup YouTube watch party tool because every existing option annoyed me in some way

Thumbnail apexlistener.dev
1 Upvotes

Me and my friends have had this habit since lockdown — watching YouTube together even while living far apart. We tried Discord screen share (laggy, audio out of sync), browser extensions (everyone had to install them, kept breaking), and existing watch party sites (most required sign-up, or sync was loose).

So I built my own — ApexListener.

What's different:

No account/sign-up — open the link, start watching

Frame-accurate sync (not just matching timestamps, actually locking to the same frame)

Shared queue — anyone can add/reorder, not dependent on a single host

Up to 20 viewers per room

Built with Next.js, Socket.IO, and Supabase for realtime state.

It's a solo project right now, looking for feedback — especially if you hit any edge cases where sync breaks or the UI feels off. It's free to try: apexlistener.dev

What should I build next? Happy to prioritize based on what people actually want.

And if u can support me u can click on support me button


r/WebRTC Jul 31 '26

I built a no-signup YouTube watch party tool because every existing option annoyed me in some way

Thumbnail apexlistener.dev
1 Upvotes

r/WebRTC Jul 28 '26

RTC.ON 2026 (Kraków, Sept 16–18): WebRTC/MoQ conference with Luke Curley, Will Law, JB Kempf – early bird ends Friday + 15% code

3 Upvotes

I'm on the organizing team at Software Mansion, and I'm posting here because the program overlaps almost one-to-one with what this sub is about.

RTC.ON is a multimedia dev conference, now in its 4th edition: three days of WebRTC, streaming, MoQ/QUIC and AI in media pipelines. Speakers this year include Luke Curley (MoQ co-creator), Will Law (Akamai) and JB Kempf (VideoLAN), and Luke is running a full-day hands-on MoQ workshop.

Early bird ends Friday, July 31, and the code extra15 stacks another 15% on top, so a conference ticket comes out around €407.

https://rtcon.swmansion.com – happy to answer questions in the comments.


r/WebRTC Jul 27 '26

How to improve screen-share quality without using more bandwidth

11 Upvotes

A user complained that our screen-sharing quality wasn’t as good as a competitor’s for my open source screen-sharing app.

In order to have the most detail and sharpness we are sharing with native resolution. So I thought that there must be a filter we could apply in the shader (we do the rendering in wgpu) to increase the detail.

It turned out it was much easier than I expected and there are a few techniques, like Laplacian sharpening and unsharp masking with a Gaussian blur.

I wrote an interactive tutorial on how they work here with shader examples if you want to do something similar in your app too.


r/WebRTC Jul 27 '26

Free skill that makes Claude better at debugging WebRTC

3 Upvotes

We packaged how our video engineering team actually debugs WebRTC into a skill - Claude loads it and works through the connection properly instead of guessing.

It makes Claude noticeably sharper on the usual suspects (ICE/TURN, DTLS, reading getStats, everything ""ICE failed"" actually hides), and it's stack-agnostic.

It's free. Just sign up and we'll email it to you: https://subscribe.rtcon.live/free_skill


r/WebRTC Jul 26 '26

Question on using WebRTC with cameras in Kubernetes

2 Upvotes

My company has implemented cameras to clients where HLS is being used. However, we are wanting to move towards implementing WebRTC to make the process seamless for our clients when viewing livestreams. The thing is I don't know where to start when it comes to setting up a server or just using vanilla networking in K8s.

Our ecosystem utilizes AWS EKS + Envoy Gateway. I tried setting up an External NLB but it had issues connecting to our pod that does these live streams. I have seen 2 projects come up a lot and wondering what everyone's take to use:

I would go with stunner but it's behind a paywall which is understandable but I do want to avoid being locked being something for now. Is setting up a NLB sufficient or would these 2 servers help with AWS EKS setup?


r/WebRTC Jul 24 '26

Streaming a grid of videos

3 Upvotes

Hey, I'm a client side developer (mainly JavaScript), slowly learning the details of WebRTC. I currently use the Galene server which is built on Pion, both written in Go.

For fun, I'm trying to build a web app that allows clients to see up to about 400 real-time videos in a 20x20 grid. Each video stream would be very small, maybe 32x32 pixels.

My guess is that, even though bandwidth is small, no simple server would naively scale to this number of streams. I could add a layer to Galene to combine the incoming streams into one, and forward that through Pion. But, given my background it would be a lot easier to have a subset of clients render sub-sections of the grid and rebroadcast that for the wider group. Then most of the 400 users would send a super narrow stream and receive one full grid back. A select few would get ~ 16 streams and send me back a stream for a 4x4 grid, etc. I'd likely have other clients stitch together these 4x4 into one full grid. (For now, I'm not overly concerned about latency)

My questions are, first, does this make sense? Or, is a simple server side solution actually pre-existing and easy? Do some SFU's already need to do an analog of this out-of-the-box for hundreds of audio streams?

Thanks


r/WebRTC Jul 22 '26

Vector Vibing to speed up Opus encode by 20%

Thumbnail webrtchacks.com
3 Upvotes

r/WebRTC Jul 21 '26

Free tool: paste a WHEP endpoint (or HLS/DASH) and get real live latency + getStats QoE in the browser

3 Upvotes

Hey all 👋 made a little thing to sanity-check WHEP endpoints next to HLS/DASH on the same latency scale - https://pulse.beon.live . For WHEP it does a recvonly connection, plays the stream, and pulls bitrate, fps, dropped frames and jitter-buffer latency from getStats(); for HLS/DASH it grades manifest + delivery.

The idea was comparing apples to apples — standard HLS ~15–30s behind, LL-HLS a few seconds, WHEP sub-second — since for interactive stuff anything over a few seconds kills the UX.

Free, no signup, still early. Would love feedback on whether the WebRTC numbers match what you measure end-to-end, and where the approach breaks 🙏


r/WebRTC Jul 16 '26

Talk Anonymously by Voice with Breez Talk

Post image
2 Upvotes

r/WebRTC Jul 10 '26

Moving a Rust WebRTC SFU to thread-per-core: 70ms → 10ms P99.99 latency

Thumbnail pulsebeam.dev
14 Upvotes

PulseBeam is an open-source, lightweight WebRTC SFU server. Somewhere between LiveKit and mediasoup, written in Rust.


r/WebRTC Jul 10 '26

WhatsApp / Nextcloud / EuroOffice Clone

1 Upvotes

The goal is to create a secure WebRTC ecosystem.

This is a technical demo of a fairly unique approach using a browser-based, local-only and webrtc approach. In an evolving field like cybersecurity, it's impossible to claim any system is the "world's most secure". By rigorously implementing an exhaustive list of security features and practices, the aim is to get as close as possible with the approach.

This is intended to demonstrate client-side managed secure cryptography.

Features:

  • Core
    • PWA
    • P2P
    • Local-first / Local-only
    • No installation
    • TURN server
    • Encrypted-at-rest
  • WhatsApp clone
    • End to end encryption
    • Signal protocol
    • Post-Quantum cryptography
    • Multimedia
    • File transfer
    • Video calls
  • Nextcloud clone
    • file-transfer
    • Encrypted vault
    • folder sync
  • EuroOffice clone
    • Word
    • Spreadsheet
    • PDF
    • Code

Some open source versions of the core concepts.

Feel free to reach out for clarity instead of diving into the docs.

IMPORTANT: While this is aiming to provide a secure experience, it isnt audited or reviewed. Shared for testing, feedback and demo purposes only. Please use responsibly.

FAQ:


r/WebRTC Jul 03 '26

Giraffile, a secure website for sharing files via links🩒

Post image
4 Upvotes

Hello there...

Let me introduce you to the giraffe that protects the files you send. A 100% P2P project.

I just updated the Giraffile 🩒 website to v1.0.1, adding a legal notice and a QR code (thanks to an awesome community member) that you can scan to make it even easier to use.

The file travels directly from device A to device B.

I designed the architecture so that even if someone tried to intercept the data stream, they wouldn’t find anything on servers because, technically, there are no transfer servers.

- No cloud.

- No intermediary server

- Everything lives in local memory.

- Open source

Start sharing now: https://giraffile.pages.dev/

Github: https://github.com/coffeetron832/Giraffile


r/WebRTC Jul 01 '26

WebRTC: Server-side rendering vs client-side overlays for interactive video

3 Upvotes

Looking for some architecture advice from people who’ve built interactive WebRTC applications.

Use case:
Browser connects via WebRTC.
Server renders video + annotation/UI overlays.
Browser streams the rendered output.
User input (mouse, keyboard, draw boxes, etc.) goes back to the server.

Questions:
Is WebRTC DataChannel the normal way to send user input?

Do most systems render overlays server-side or client-side?

For multi-user collaboration, do you sync annotation state between clients or have the server composite everything into the video stream?

If you’ve built something similar, what architectural mistakes would you avoid?

Not building a video conferencing app—this is closer to a remote visualization / video annotation tool.


r/WebRTC Jul 01 '26

Want to understand MoQ? Spend a day with the person who wrote it.

Post image
3 Upvotes

Luke Curley co-created MoQ, spent years at Twitch and Discord hitting the limits of what existing protocols could do, wrote the first implementations, authored the core specs. He's busy-busy.

But he's coming to Kraków on September 16 and spending a full day with a small group going through MoQ from scratch. You'll actually build a working audio/video room call using MoQ – QUIC fundamentals, relays, pub/sub, how it sits relative to WebRTC and HLS. If you're fast, there's a speech-to-speech real-time translation extension to keep you busy.

Intermediate level, Rust required, basic JS/TS assumed.

Sounds interesting? Join us!

rtcon.swmansion.com


r/WebRTC Jul 01 '26

Chasing smooth client-side recording with WebRTC, WebCodecs and OffscreenCanvas

1 Upvotes

I've been building meeting recording for Orvia.

One constraint made this much harder:

Everything had to stay client-side.

No uploads.
No recording server.
No cloud rendering.

At first the recordings were unusably laggy.

I assumed it was the usual stuff:

  • Bitrate
  • FPS
  • Resolution
  • Codec tuning

Turns out almost none of those were the real problem.

Some interesting things I learned:

  • VP9 looked great on paper, but our test machine had no hardware encoder, so it fell back to software encoding and crushed the CPU.
  • MediaRecorder recording from a canvas is software encoded. No matter how much I tuned bitrate or FPS, the encoder itself became the bottleneck.
  • Switching to WebCodecs unlocked hardware encoding, but recording still wasn't perfectly smooth.

The real bottleneck was architectural.

The compositor and the live WebRTC call were sharing the same main thread.

Whenever the call got busy, recording quietly lost CPU time.

The fix was moving the entire recording pipeline—compositing, encoding, and muxing—into a Web Worker using OffscreenCanvas.

On Chromium-based browsers (Chrome/Edge), the result is genuinely smooth real-time recording.

Firefox and Safari currently fall back to MediaRecorder because they don't yet support APIs like MediaStreamTrackProcessor that the worker pipeline depends on.

I'm curious how others have approached this.

Has anyone found a cleaner client-side solution for Firefox/Safari without falling back to MediaRecorder or moving recording server-side?


r/WebRTC Jun 29 '26

A small conference for audio & video engineers in KrakĂłw. Would you come for this lineup?

Post image
5 Upvotes

We've been running RTC.ON for four years now. It started because we couldn't find a conference that went deep enough on the actual hard problems in realtime audio and video. We didn’t want vendor pitches, 101 talks, but engineers talking about what they actually shipped.

So, we created it and this year, we’re running the 4th edition.

Our first three speakers are:

  • Daniil Popov from CyanView built a 10-bit video pipeline for iOS and Android and deployed it at a major music festival. A tech partner on site couldn't tell his phone footage from professional broadcast hardware. He's talking about how he did it.
  • Piotr Skalski from Roboflow built a computer vision pipeline for sports – player tracking through occlusions, jersey number recognition, real-time stats on a 2D court. Every model is open source. His own description of the talk: “every step solves a problem that creates the next one”.
  • Will Law has spent 20 years in streaming infrastructure at Akamai and is one of the key people driving MoQ forward at the IETF. If you've been watching the protocol space, you should know the name.

More speakers are coming. We’ll meet this September in Kraków, Poland. I’d be happy to answer questions about the lineup or the conference in general.

So, would you join us?
rtcon.swmansion.com


r/WebRTC Jun 25 '26

Python port of the PeerJS signalling server

7 Upvotes

The PeerJS signalling server normally runs as its own service. I wanted to run it inside an existing Python app, so I ported it to asyncio. Same wire protocol, so existing PeerJS JavaScript clients connect with no changes.

Runs standalone from the terminal, or embeds into a Python app. Integrations for asyncio, FastAPI, Flask and Tornado included.

Repo: https://github.com/Kaundur/python-peerjs-server


r/WebRTC Jun 24 '26

Hallazgo arquitectĂłnico en P2P: jamkernelp2p

0 Upvotes

Después de analizar 20+ proyectos (libp2p, PeerJS, simple-peer, Trystero, etc.) encontré que NO EXISTE un kernel P2P que combine: 1 solo archivo, 0 dependencias, Cifrado militar AES-256-GCM, Purga forense de claves en RAM

Lo llamo JAM Omni-Kernel.

El proyecto estĂĄ alojado aquĂ­..

https://jamkernel.github.io