File: README.md
[](https://pion.ly)
Pion WebRTC
A pure Go implementation of the WebRTC API
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
- API with direct RTP/RTCP access
- Opus, PCM, H264, VP8 and VP9 packetizer
- API also allows developer to pass their own packetizer
- IVF, Ogg, H264 and Matroska provided for easy sending and saving
- getUserMedia implementation (Requires Cgo)
- Easy integration with x264, libvpx, GStreamer and ffmpeg.
- Simulcast
- SVC
- NACK
- Sender/Receiver Reports
- Transport Wide Congestion Control Feedback
- Bandwidth Estimation
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
- 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
File: codecov.yml
DO NOT EDIT THIS FILE
It is automatically copied from https://github.com/pion/.goassets repository.
SPDX-FileCopyrightText: 2026 The Pion community
SPDX-License-Identifier: MIT
coverage:
status:
project:
default:
# Allow decreasing 2% of total coverage to avoid noise.
threshold: 2%
patch:
default:
target: 70%
only_pulls: true
ignore:
- "examples/*"
- "examples/**/*"
File: DESIGN.md
Design
WebRTC is a powerful, but complicated technology you can build amazing things with, it comes with a steep learning curve though. Using WebRTC in the browser is easy, but outside the browser is more of a challenge. There are multiple libraries, and they all have varying levels of quality. Most are also difficult to build, and depend on libraries that aren't available in repos or portable.Pion WebRTC aims to solve all that! Built in native Go you should be able to send and receive media and text from anywhere with minimal headache.
These are the design principals that drive Pion WebRTC and hopefully convince you it is worth a try.
Portable
Pion WebRTC is written in Go and extremely portable. Anywhere Golang runs, Pion WebRTC should work as well! Instead of dealing with complicated
cross-compiling of multiple libraries, you now can run anywhere with one go build
Flexible
When possible we leave all decisions to the user. When choice is possible (like what logging library is used) we defer to the developer.
Simple API
If you know how to use WebRTC in your browser, you know how to use Pion WebRTC.
We try our best just to duplicate the Javascript API, so your code can look the same everywhere.
If this is your first time using WebRTC, don't worry! We have multiple examples and GoDoc
Bring your own media
Pion WebRTC doesn't make any assumptions about where your audio, video or text come from. You can use FFmpeg, GStreamer, MLT or just serve a video file.
This library only serves to transport, not create media.
Safe
Golang provides a great foundation to build safe network services.
Especially when running a networked service that is highly concurrent bugs can be devastating.
Readable
If code comes from an RFC we try to make sure everything is commented with a link to the spec.
This makes learning and debugging easier, this WebRTC library was written to also serve as a guide for others.
Tested
Every commit is tested via travis-ci Go provides fantastic facilities for testing, and more will be added as time goes on.
Shared libraries
Every Pion project is built using shared libraries, allowing others to review and reuse our libraries.
Community
The most important part of Pion is the community. This projects only exist because of individual contributions. We aim to be radically open and do everything we can to support those that make Pion possible.