r/WebRTC • • Dec 31 '25

I built a CLI tool to transfer files via WebRTC Data Channels. Single binary (APE), no dependencies.

41 Upvotes

I built this CLI tool because I needed a way to transfer large files from containers to my dev host efficiently. Relying on relay servers often resulted in poor speeds, so I wanted to leverage WebRTC Data Channels for direct P2P transfer.

It's built with Python and aiortc, yet packed as an APE (Actually Portable Executable), so you can just curl the binary and run it directly on almost any OS or CPU architecture (x86_64/ARM64). No installation, no dependencies, and no compilation required.

It uses WebRTC for P2P transfer (with automatic relay fallback). The GIF shows me sending ffl from Windows to Termux, and then immediately using it to send photos back.

Since it generates a standard HTTPS link, you can essentially use it to share files with anyone who has a browser, not just your own PC. (if using browser, sure it transfers using WebRTC if possible)

Hope you find it useful!

GitHub: https://github.com/nuwainfo/ffl
Try it out:

# 1. Download & Make executable
curl -fL https://github.com/nuwainfo/ffl/releases/latest/download/ffl.com -o ffl.com 
chmod +x ffl.com

# 2. Run it directly!
./ffl.com [file or folder]

r/WebRTC • • Mar 02 '21

Real-time AI Video Upscaling with WebRTC

35 Upvotes

Hey everyone!

I'm working on a Javascript library which uses AI to upscale video in real-time in the browser. I think AI Upscaling could be helping in improving the quality / reliability WebRTC video calls, and have been playing around with WebRTC (demo).

We're new to WebRTC though, and would love to get feedback! Does video quality ever come up as a concern in WebRTC calls? What about call reliability?

Either way, we've just released our library for anyone who interested in playing around with AI Video Upscaling(docs, libraries, quickstart).


r/WebRTC • • Jun 14 '25

New way to make WebRTC Connection without TURN Servers

34 Upvotes

Hey WebRTC community! I've developed what I believe is a new approach to solve the symmetric NAT problem that doesn't require TURN servers. Before I get too excited, I need your help validating whether this is actually new or if I've missed existing work.

The Problem We All Know: Symmetric NATs assign different port mappings for each destination, making traditional STUN-based discovery useless. Current solutions either:

  • Use expensive TURN relays (costs money and latency)

  • Try birthday paradox attacks (Tailscale's approach - up to 20+ seconds, often fails)

My Approach - "ICE Packet Sniffing": Instead of guessing ports, I let the client reveal the working port through normal ICE behavior:

  1. Client initiates ICE connectivity check with only local candidates

  2. Server inspects the incoming STUN packet to extract the real public IP:port the NAT opened

  3. Server correlates the packet back to the right client using the ICE ufrag

  4. Server creates a working ICE candidate using the discovered port and sends it back

  5. Instant connection - no guessing, no delays, works with any NAT type

Key Innovation: The ufrag acts as a session identifier, letting me map each STUN packet back to the correct WebSocket connection.

Results So Far:

  • 8 devices connected simultaneously for 45+ minutes

  • Works with symmetric NATs that break traditional approaches

  • No TURN servers needed

Questions for the Community:

  1. Has anyone seen this packet-sniffing + ufrag correlation approach before?

  2. Are there obvious flaws I'm missing?

  3. How does this compare to other symmetric NAT solutions you've used?

I've documented everything with code in my repo. Would love your feedback on whether this is genuinely useful or if there are better existing solutions I should know about.

Repo: https://github.com/samyak112/monoport


r/WebRTC • • Feb 12 '22

OpenRelay Project: Free Reliable WebRTC TURN Server

27 Upvotes

Open Relay Project (https://openrelayproject.org) is a reliable, production ready WebRTC TURN+STUN Server that is completely free.

It runs on port 80 and 443, and also support TCP to bypass most corporate firewalls.

Also supports dynamic routing to the nearest server.

Update: There is a free 20GB per month cap on bandwidth, that renews every month.


r/WebRTC • • Mar 01 '23

Introduction to web audio API

25 Upvotes

Hey everyone, we have written a blog on web audio API. We tried to cover the basics of web audio transmission and the concepts around it with respect to webRTC. We would love to know what you think and if you have any feedback.

Link to the Article - https://dyte.io/blog/web-audio-api/

Cheers!


r/WebRTC • • May 18 '22

How we built Zoom's end-to-end optimizations for WebRTC

Thumbnail
blog.livekit.io
24 Upvotes

r/WebRTC • • Jan 25 '22

Audio/video calling APIs like Agora are too expensive for B2C software

23 Upvotes

Hey everyone!

Some college friends and I spent the last couple of years building hyperbeam.com and found that audio/video calling APIs like Agora/Daily/Twilio are outrageously pricey for products with tons of users e.g. much of B2C software.

About a year ago we decided to add video calling to Hyperbeam, but even with “volume discounts” from Agora/Daily/Twilio we still needed to pay >$50k a month based on our expected audio/video call volume (~150k monthly active users). So we threw together a simple​​ full-mesh P2P chat which we use to this day, although it’s far from ideal.

At this point, we’re seriously considering just building our own audio/video calling API tailored for B2C, and giving it to companies that face the same issue for a fraction of what Agora charges. I threw together this Webflow landing page in a day to gauge interest.

I’d love to know if any of you have found an affordable solution for audio/video calling, or if you decided to build everything in-house. If we did build this out, would any of you be interested?

Thanks!


r/WebRTC • • Mar 17 '26

Self-hosted WebRTC + HLS streaming server in one Docker container [OC]

Thumbnail
github.com
22 Upvotes

I wanted a quick way to test WebRTC streams and figured this community might also find it useful.

docker-webrtc-server is a single container that handles the whole ingest-to-playback pipeline:

  • RTMP in (OBS, FFmpeg, anything) -> WebRTC out (sub-second latency)

  • WHIP in (browser direct publish) -> HLS out (~4-6s latency)

  • Both directions work simultaneously

  • Built-in web player at :8080

  • Auto-detects public IP on AWS, Azure, GCP

  • ~160MB image, ~20MB RAM idle

Zero to streaming server locally in less than 60 seconds

Happy to answer questions. I do live streaming for airshows professionally and this is very useful when I need something quick to test with.


r/WebRTC • • Mar 20 '23

Understanding RTP and RTCP

22 Upvotes

Hi folks, I've written a blog on RTP and RTCP; I believe it is a good entry point for anyone interested in learning about these protocols that enable real-time communication.
You can read through here: https://dyte.io/blog/webrtc-rtp-and-rtcp/
Please do share your feedback. I hope this proves to be helpful!


r/WebRTC • • Apr 24 '21

How to build a simple SFU server?

22 Upvotes

i know there are a lot of free and opensource SFU servers out there, but the main reason I want to build a simple one is just to understand how it works, this is just out of curiousity as an engineer :) I am wondering how this fit together with webrtc since by design, webrtc are peer to peer, does each peer/users establish a peer to peer connection with an SFU server? how do the server route connections of all users? etc.

is there any resource,books, courses, that describes the technical details how to do this?

i just want satisfy my curiousity as an engineer (thats my nature. i even built my own game engine haha), and i dont want to start with reading the open sourced project like janus as they are already convulated and have lots of source code already involvedd with a ton of functionalities

(maybe if i can find a simple SFU project to study will do)


r/WebRTC • • Jan 24 '26

Air-gapped WebRTC: How I compressed the signaling handshake from 2.5KB to 60 bytes for QR codes

20 Upvotes

Hi everyone,

I've been working on a project to establish serverless, air-gapped WebRTC connections (using only screens and cameras). The biggest blocker has always been the size of the SDP.

A standard Offer/Answer is ~2.5KB JSON. Putting that into a QR code requires Version 40 (high density), which is nearly impossible to scan quickly on mobile devices.

I managed to strip the handshake down to ~60 bytes by designing a custom binary protocol (QWBP) that reconstructs a valid SDP on the receiving end.

The Implementation Details:

  1. Eliminating ICE Credentials: The biggest saving came from realizing I didn't have to transmit the ice-ufrag or ice-pwd. I implemented a mechanism to derive these credentials deterministically from the certificate's DTLS fingerprint using HKDF.

  2. Binary Packing vs. JSON:

    • IP addresses are packed into raw bytes (4 bytes for IPv4, 16 for IPv6) instead of strings.

    • Ports are 2-byte unsigned integers.

    • Candidate types (host/srflx) are bit-flags.

  3. The "Compression Paradox": I initially tried running the payload through DEFLATE/Zlib, but found that for payloads under 100 bytes with high entropy (random IPs/Hashes), the compression headers actually increased the total size. I stuck to a raw C-struct style layout.

The result is a low-density QR code that scans instantly, bootstrapping a DataChannel without a signaling server.

I wrote a full technical breakdown of the byte layout and the RFC logic here if you're interested in the specifics: https://magarcia.io/air-gapped-webrtc-breaking-the-qr-limit


r/WebRTC • • Apr 06 '21

We have an open-source streaming server

20 Upvotes

Hello!

We are developing the project of an open-source streaming server with WebRTC (https://github.com/AirenSoft/OvenMediaEngine); we hope you guys take a look at this because we believe in the power of the open-source community.

Also, if you interest in our server, we will notify you of any updates about OvenMediaEngine at Reddit's WebRTC.

Thank you!


r/WebRTC • • Aug 26 '20

WebRTC for the Curious - Go beyond the APIs

Thumbnail webrtcforthecurious.com
20 Upvotes

r/WebRTC • • May 17 '25

I built a full WebRTC implementation in PHP – Feedback welcome!

18 Upvotes

Hey everyone!

I’ve been working on a full-featured WebRTC implementation in PHP, covering everything from ICE and DTLS to RTP, SCTP, and signaling. The goal was to bring native WebRTC capabilities to PHP projects without relying on external media servers.

You can check it out here: https://github.com/PHP-WebRTC

It’s fully open-source, actively maintained, and aimed at developers who want low-level control of WebRTC in server-side PHP. I’d love to hear your thoughts, suggestions, or bug reports.

Happy to answer any questions or collaborate if anyone’s interested in contributing!


r/WebRTC • • Jun 10 '23

OBS Merges WebRTC Support

Thumbnail
github.com
18 Upvotes

r/WebRTC • • Feb 12 '26

TURN Security Threats: A Hacker's View

Thumbnail
enablesecurity.com
17 Upvotes

r/WebRTC • • Sep 23 '25

How OpenAI does WebRTC in the new gpt-realtime

Thumbnail
webrtchacks.com
17 Upvotes

r/WebRTC • • Jan 04 '21

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

16 Upvotes

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


r/WebRTC • • Feb 20 '25

Looking for cost-effective alternatives to my current TURN server setup

15 Upvotes

Currently, I'm using Coturn to set up and manage a TURN server for WebRTC applications, but the costs have been adding up, especially with my monthly usage of around 53TB of data. I’ve been exploring other options to reduce these costs and I’m considering the following:

  1. Cloudflare TURN – They offer a TURN service integrated with their global infrastructure, which seems convenient and may help with scalability. However, I’m not sure if it's cost-effective for my usage.

  2. XIRSYS TURN – This service provides TURN servers optimized for WebRTC, with pricing based on data usage. I’m looking into it, but I’d like to get a clearer picture of long-term costs.

That said, I'm wondering if anyone has experience with alternative TURN server solutions, especially in the context of high data usage like mine. Are there other services or strategies (like hosting my own TURN server on cloud platforms) that could help reduce costs without sacrificing reliability or performance?

Additionally, I'm considering whether hosting Coturn on OCI (Oracle Cloud Infrastructure) might be more cost-effective, but I’m unsure about the operational and financial aspects of this approach.

Any insights, recommendations, or experiences would be greatly appreciated!

Thanks in advance!


r/WebRTC • • Apr 15 '23

Twitch.tv now supports WebRTC Ingestion (via WHIP)

15 Upvotes

You can use it today with these values. If you have any feedback/questions I would love to hear.

You can stream from your browser or from other tools like OBS. You can get a build of OBS that supports WebRTC here. https://github.com/obsproject/obs-studio/pull/7926. This doesn't use all the features of WebRTC yet, but it will continue getting better and better.


r/WebRTC • • Aug 26 '21

An Introduction to WebRTC Simulcast - demystifying one of the coolest features of WebRTC

Thumbnail
blog.livekit.io
15 Upvotes

r/WebRTC • • Jul 10 '21

Help me understanding TURN server WebRTC estimated costs

15 Upvotes

I'm working on a project that will depend heavily on WebRTC communication and I'm trying to estimate associated costs. For now, I just want to estimate the cost of the TURN relay for a simple p2p video call of one hour between 2 users at a bitrate of 1Mbps, i.e., 3.6GB for one hour.

So, if for example, I use Twilio I expect about $0.4/GB. For the example above this means $1.44? It seems quite high for a simple one-hour call.

If I choose to install my one TURN server in an Amazon AWS EC2 instance, I expect a transfer rate of about $0.1/GB, resulting in $0.36 for the call. Even so, it seems to me quite high.

Am I doing the math currently? How do free services such as jitsi can support this type of cost? I know that most of the calls don't need a TURN server, but I have read that is only the case of 70-80% of calls.

Finally, I also don't get how AWS Kinesis WebRTC pricing differs so much. They inform that TURN cost is about $0.12/1000 per minute, i.e., $0.0072 for one hour...


r/WebRTC • • Aug 24 '20

Open Source browser-based lecturing platform powered by WebRTC! Inspired by Corona!

15 Upvotes

As a student, during this pandemic, I wanted a simple way to have online lectures that felt like in-person ones so I created liteboard.io! A lecturing platform powered by WebRTC and Janus with state-of-the-art drawing tools for anyone who wants to host their own lectures!

I'm completing my second year of college next term and I would love to get some feedback on the project! Here's the Github link: https://github.com/jeverd/lecture-experience


r/WebRTC • • Apr 10 '20

🚀 I made a WebRTC video call site to connect with my friends during the pandemic!

Thumbnail
zipcall.io
15 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.