explaingit

pion/webrtc

16,451GoAudience · developerComplexity · 4/5LicenseSetup · hard

TLDR

Pion WebRTC is a pure Go implementation of the browser WebRTC API for sending audio, video, and data directly between two devices in real time, no C bindings, runs anywhere Go runs including embedded devices.

Mindmap

mindmap
  root((pion webrtc))
    What it does
      Peer-to-peer audio
      Peer-to-peer video
      Data channels
    Underlying protocols
      ICE for connectivity
      DTLS for security
      SRTP for media
    Platforms
      Linux and macOS
      Windows
      iOS and Android
      WebAssembly
    Use Cases
      Video conferencing
      Robot streaming
      P2P file transfer
    Tech Stack
      Pure Go
      No C bindings
Click or tap to explore — scroll the page freely

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

Things people build with this

USE CASE 1

Build a Go server that receives a live webcam stream from a browser and records or processes it server-side.

USE CASE 2

Create a peer-to-peer data channel between two Go servers to move data without a message broker.

USE CASE 3

Add real-time video conferencing capabilities to a Go backend without a separate media server.

USE CASE 4

Stream live camera footage from a robot to a browser for low-latency remote control.

Tech stack

GoDTLSSRTPICESTUNTURN

Getting it running

Difficulty · hard Time to first run · 1h+

Requires understanding the WebRTC signaling flow, exchanging SDP offers and answers, before any end-to-end example will work.

MIT, use freely for any purpose including commercial with no conditions beyond keeping the copyright notice.

In plain English

Pion WebRTC is a pure Go implementation of the WebRTC API, the open standard browsers use for sending audio, video, and arbitrary data directly between two devices in real time. WebRTC is what powers things like video calls and live screen sharing in the browser, this library lets you do the same thing from a Go program on a server, an embedded device, or anywhere else Go runs. The way it works is by providing a Go version of the same building blocks the browser exposes, peer connections, data channels, and media tracks, along with the underlying machinery that gets two peers talking to each other through firewalls and NATs (ICE, STUN, TURN), and the secure transports that protect the traffic in flight (DTLS for data, SRTP for media). Because the project is written in pure Go with no C bindings required, it runs across a wide range of operating systems and CPU architectures, including Windows, macOS, Linux, FreeBSD, iOS, Android and even WebAssembly in the browser. You would reach for it if you want to send a webcam stream from a device to a browser without an extra server, build a video conferencing backend, securely move data peer-to-peer between two servers without a message broker, remotely control a robot while streaming its cameras, or record and process media server-side. It is MIT-licensed, currently on a v4 release, and the maintainers run an active Discord for help. The full README is longer than what was provided.

Copy-paste prompts

Prompt 1
Write a Go program using pion/webrtc that accepts a browser webcam stream over WebRTC and saves the video to a file.
Prompt 2
Show me a minimal pion/webrtc peer-to-peer data channel example where two Go programs exchange text messages without a server in the middle.
Prompt 3
How do I configure a TURN server with pion/webrtc to help peers behind strict NATs connect to each other?
Prompt 4
Create a pion/webrtc signaling server in Go using WebSockets that brokers SDP offer and answer exchange between two peers.
Prompt 5
How do I compile a pion/webrtc application to WebAssembly so a browser can open a peer-to-peer data channel using Go code?
Open on GitHub → Explain another repo

← pion on gitmyhub — every repo by this author, as a profile.

Verify against the repo before relying on details.