Repolode
pion

pion/webrtc

A pure Go implementation of the WebRTC API for building real-time audio, video and data peer-to-peer connections.

Stars
16,851
Forks
1,912
Open issues
107
Last commit
9 hours ago

What is it?

Pion WebRTC is a Go library that implements the WebRTC API, letting Go programs open peer-to-peer connections that carry audio, video and arbitrary data channels. It covers the PeerConnection API, including renegotiation, DataChannels, and both Plan-B and Unified Plan SDP, along with a full ICE agent, STUN, and TURN over UDP, TCP, DTLS and TLS.

The library is written entirely in Go without Cgo, so it can be cross-compiled for Windows, macOS, Linux, FreeBSD, iOS, Android, WebAssembly and several other architectures. Media support includes direct RTP/RTCP access, packetizers for Opus, PCM, H264, VP8 and VP9, and IVF, Ogg and Matroska readers and writers. Features such as simulcast, SVC, NACK, congestion control feedback and bandwidth estimation are also provided.

The project is MIT licensed and is designed for developers who need WebRTC on the server side or in embedded devices, not only in browsers.

Key features

  • 01Full PeerConnection API with DataChannels, renegotiation and Unified Plan support
  • 02Full ICE agent with STUN and TURN over UDP, TCP, DTLS and TLS
  • 03Pure Go with no Cgo, building for Windows, macOS, Linux, iOS, Android and WASM
  • 04Direct RTP/RTCP access plus Opus, H264, VP8 and VP9 packetizers
  • 05IVF, Ogg and Matroska support for sending and saving media
  • 06Simulcast, SVC, NACK and bandwidth estimation

Use cases

  • Streaming a webcam from an embedded device to a browser
  • Sending video files to multiple browser clients in real time
  • Building server-side WebRTC media processing or conferencing applications
  • Transferring data securely between two servers over WebRTC data channels

Quick start

  1. 1

    Enable Go modules by setting the environment variable

    export GO111MODULE=on
  2. 2

    Import the library in your Go project, specifying the /v4 path

  3. 3

    Browse the example applications for common uses

Things to know

  • Go Modules are mandatory, and the import path must include /v4 for the current release.
  • Version 4 includes breaking changes, so v3 users must check the tags for the older release.
  • The getUserMedia implementation requires Cgo.

Topics

FAQ

What is webrtc?
A pure Go implementation of the WebRTC API for building real-time audio, video and data peer-to-peer connections. Pion WebRTC is a Go library that implements the WebRTC API, letting Go programs open peer-to-peer connections that carry audio, video and arbitrary data channels. It covers the PeerConnection API, including renegotiation, DataChannels, and both Plan-B and Unified Plan SDP, along with a full ICE agent, STUN, and TURN over UDP, TCP, DTLS and TLS.
Is webrtc free to use? What license does it have?
webrtc is open source under the MIT license. Check the license terms before using it in commercial products.
Is webrtc still maintained?
Actively maintained. The last commit to webrtc was on Oct 21, 2026.
What can I use webrtc for?
Streaming a webcam from an embedded device to a browser Sending video files to multiple browser clients in real time Building server-side WebRTC media processing or conferencing applications Transferring data securely between two servers over WebRTC data channels
How do I install webrtc?
Enable Go modules by setting the environment variable: export GO111MODULE=on Import the library in your Go project, specifying the /v4 path Browse the example applications for common uses
Where can I get webrtc?
The source code and installation instructions are on GitHub: https://github.com/pion/webrtc

Summary generated by AI from the project's README. GitHub stats refresh daily.

Related projects