webrtc is a free, open source messaging & event streaming project written in Go and released under MIT. It has 16,785 GitHub stars, 1,887 forks and 125 open issues, and was last pushed 2 hours ago. On this registry it ranks #3 of 13 tracked projects in Messaging & Event Streaming, with 5 head-to-head comparisons available.

What is webrtc?

Pion WebRTC is a pure Go implementation of the WebRTC API, aimed at Go developers who need real-time audio, video, and data channels running inside their own applications rather than inside a browser tab or a C++ codebase.

What it is

Pion WebRTC is a Go library that implements the WebRTC API: the W3C webrtc-pc specification and webrtc-stats, together with the transport machinery beneath them — ICE, DTLS, SRTP, SCTP data channels, and RTP/RTCP media handling. It lives in the Pion ecosystem and is catalogued here under Infrastructure & Operations / Messaging & Event Streaming. The project is written in Go, licensed under MIT, and imported as github.com/pion/webrtc/v4; the current line is v4.0.0, and the earlier v3 releases remain available through the repository's tags for teams that have not migrated.

The concrete problem it solves is the need to terminate a WebRTC session in ordinary Go code. The README's stated usage patterns make this explicit: sending a webcam feed from an embedded device straight to a browser with no additional server, or exchanging data securely between two servers without a pub/sub system in between. Both cases remove a piece of infrastructure that would otherwise sit in the middle — a media server, a signalling relay, or a message broker — and let the two endpoints negotiate and encrypt the connection themselves. Because it is pure Go, it cross-compiles and deploys the way the rest of a Go service does, rather than binding a Go program to a native WebRTC library.

Key capabilities

  • PeerConnection API implementing webrtc-pc and webrtc-stats, with DataChannels, sending and receiving audio and video, renegotiation, and both Plan-B and Unified Plan.
  • Full ICE agent including ICE Restart, Trickle ICE, STUN, TURN over UDP, TCP, DTLS and TLS, and mDNS candidates.
  • DataChannels that can be ordered or unordered, and lossy or lossless.
  • Media API with direct RTP/RTCP access, packetizers for Opus, PCM, H264, VP8 and VP9, and the option to pass a developer-supplied packetizer.
  • Container support for IVF, Ogg, H264 and Matroska for sending and saving media.
  • Simulcast, SVC, NACK, Sender/Receiver Reports and Transport Wide Congestion Control, provided through the pion/interceptor package.
  • SettingEngine for Pion-specific extensions, plus integration with x264, libvpx, GStreamer and ffmpeg.

Who uses it and how

  • Developers building conferencing applications that process audio and video server-side and make decisions from the media stream.
  • Embedded and device projects that stream a camera to a browser without standing up a separate server.
  • Service-to-service deployments that need to move data between two servers securely without a pub/sub broker.
  • Media processing pipelines that record a webcam feed and apply effects server side, using the container formats above to save output.
  • Robotics and teleoperation work that remotely controls a device and streams its cameras in real time.

Getting started

Go Modules are mandatory: set export GO111MODULE=on and import github.com/pion/webrtc/v4 explicitly. Code samples live in the repository's examples/ directory, fuller third-party examples in pion/example-webrtc-applications, and the auto-generated API reference at pkg.go.dev/github.com/pion/webrtc/v4.

How it compares

This registry lists no other pure Go implementation of the WebRTC API, so on that axis Pion WebRTC stands alone. Its nearest companions are the adjacent Pion libraries it depends on or pairs with — pion/mediadevices, pion/rtp, pion/interceptor — which are building blocks rather than substitutes.

When to use it — and when not to

A self-hoster takes on the full WebRTC stack: ICE, STUN and TURN signalling, DTLS, SRTP, and the media pipeline, plus a TURN server wherever NAT traversal demands one. Teams that want a managed hosted service, an SLA-backed support contract, or a non-Go codebase should look elsewhere; the v4.0.0 release also carries breaking changes, so projects still on v3 must plan a migration. The README is light on operational detail — it points to the wiki FAQ, the vendor-neutral book "WebRTC for the Curious", and the Pion Discord for depth — and the repository carries 125 open issues, so expect community-rate support rather than a product team.

project readme (upstream, from github) — read inline


Pion WebRTC

A pure Go implementation of the WebRTC API

Pion WebRTC Sourcegraph Widget join us on Discord Follow us on Bluesky Twitter Widget
GitHub Workflow Status Go Reference Coverage Status Go Report Card License: MIT


New Release

Pion WebRTC v4.0.0 has been released! See the release notes to learn about new features and breaking changes.

If you aren't able to upgrade yet check the tags for the latest v3 release.

We would love your feedback! Please create GitHub issues or Join the Discord to follow development and speak with the maintainers.


Usage

Go Modules are mandatory for using Pion WebRTC. So make sure you set export GO111MODULE=on, and explicitly specify /v4 (or an earlier version) when importing.

example applications contains code samples of common things people build with Pion WebRTC.

example-webrtc-applications contains more full featured examples that use 3rd party libraries.

awesome-pion contains projects that have used Pion, and serve as real world examples of usage.

GoDoc is an auto generated API reference. All our Public APIs are commented.

FAQ has answers to common questions. If you have a question not covered please ask in Discord we are always looking to expand it.

Now go build something awesome! Here are some ideas to get your creative juices flowing:

  • Send a video file to multiple browser in real time for perfectly synchronized movie watching.
  • Send a webcam on an embedded device to your browser with no additional server required!
  • Securely send data between two servers, without using pub/sub.
  • Record your webcam and do special effects server side.
  • Build a conferencing application that processes audio/video and make decisions off of it.
  • Remotely control a robots and stream its cameras in realtime.

Need Help?

Check out WebRTC for the Curious. A book about WebRTC in depth, not just about the APIs. Learn the full details of ICE, SCTP, DTLS, SRTP, and how they work together to make up the WebRTC stack. This is also a great resource if you are trying to debug. Learn the tools of the trade and how to approach WebRTC issues. This book is vendor agnostic and will not have any Pion specific information.

Pion has an active community on Discord. Please ask for help about anything, questions don't have to be Pion specific! Come share your interesting project you are working on. We are here to support you.

One of the maintainers of Pion Sean-Der is available to help. Schedule at siobud.com/meeting He is available to talk about Pion or general WebRTC questions, feel free to reach out about anything!

Features

PeerConnection API
  • Go implementation of webrtc-pc and webrtc-stats
  • DataChannels
  • Send/Receive audio and video
  • Renegotiation
  • Plan-B and Unified Plan
  • SettingEngine for Pion specific extensions
Connectivity
  • Full ICE Agent
  • ICE Restart
  • Trickle ICE
  • STUN
  • TURN (UDP, TCP, DTLS and TLS)
  • mDNS candidates
DataChannels
  • Ordered/Unordered
  • Lossy/Lossless
Media
Security
  • TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256 and TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA for DTLS v1.2
  • SRTP_AEAD_AES_256_GCM and SRTP_AES128_CM_HMAC_SHA1_80 for SRTP
  • Hardware acceleration available for GCM suites
Pure Go
  • No Cgo usage
  • Wide platform support
    • Windows, macOS, Linux, FreeBSD
    • iOS, Android
    • WASM see examples
    • 386, amd64, arm, mips, ppc64
  • Easy to build Numbers generated on Intel(R) Core(TM) i5-2520M CPU @ 2.50GHz
    • Time to build examples/play-from-disk - 0.66s user 0.20s system 306% cpu 0.279 total
    • Time to run entire test suite - 25.60s user 9.40s system 45% cpu 1:16.69 total
  • Tools to measure performance provided

Roadmap

The library is in active development, please refer to the roadmap to track our major milestones. We also maintain a list of Big Ideas these are things we want to build but don't have a clear plan or the resources yet. If you are looking to get involved this is a great place to get started! We would also love to hear your ideas! Even if you can't implement it yourself, it could inspire others.

Sponsoring

Work on Pion's congestion control and bandwidth estimation was funded through the User-Operated Internet fund, a fund established by NLnet made possible by financial support from the PKT Community/The Network Steward and stichting Technology Commons Trust.

Community

Pion has an active community on the Discord.

Follow the Pion Bluesky or Pion Twitter for project updates and important WebRTC news.

We are always looking to support your projects. Please reach out if you have something to build! If you need commercial support or don't want to use public methods you can contact us at [email protected]

Contributing

Check out the contributing wiki to join the group of amazing people making this project possible

License

MIT License - see LICENSE for full text

Frequently asked questions

Is webrtc free to use?

webrtc is open source under the MIT licence. There is no licence fee and no seat count — you can self-host it or, where the project offers one, pay a vendor for a managed version instead.

What does webrtc do?

Pure Go implementation of the WebRTC API

What is webrtc written in?

webrtc is primarily written in Go. Its source is publicly available at https://github.com/pion/webrtc, and it has 16,785 GitHub stars.