General Questions
What is Pion WebRTC?
What is Pion WebRTC?
- Pure Go: No Cgo dependencies, easy cross-compilation
- Portable: Works on Windows, macOS, Linux, FreeBSD, iOS, Android, and WebAssembly
- Standards Compliant: Implements W3C WebRTC specifications
- Production Ready: Used by many projects in production
Why use Pion WebRTC instead of other WebRTC libraries?
Why use Pion WebRTC instead of other WebRTC libraries?
- Easy to Build: Simple
go buildcommand, no complex build systems - Cross-Platform: Compile once, run anywhere Go runs
- No Dependencies: Pure Go means no external library dependencies
- Flexible: Direct access to RTP/RTCP for custom media processing
- Well Documented: Extensive examples and API documentation
- Active Community: Regular updates and helpful community support
Is Pion WebRTC production-ready?
Is Pion WebRTC production-ready?
What's the difference between v3 and v4?
What's the difference between v3 and v4?
/v3 to /v4.See the Migration Guide for detailed upgrade instructions.Getting Started
How do I install Pion WebRTC?
How do I install Pion WebRTC?
Where can I find examples?
Where can I find examples?
- Basic Examples: github.com/pion/webrtc/examples
- Advanced Applications: github.com/pion/example-webrtc-applications
- Real Projects: github.com/pion/awesome-pion
Do I need to know WebRTC to use Pion?
Do I need to know WebRTC to use Pion?
- WebRTC for the Curious - Free book about WebRTC
- Extensive code examples with comments
- Active community for questions
- API that matches browser WebRTC (if you know browser WebRTC, you know Pion)
What Go version do I need?
What Go version do I need?
Media Handling
What media codecs are supported?
What media codecs are supported?
- H.264
- VP8
- VP9
- AV1
- Opus
- PCM
How do I send video from a file?
How do I send video from a file?
play-from-disk example as a starting point:- Read video file (IVF, H264, etc.)
- Create a track
- Add track to PeerConnection
- Read and send packets
Can I use FFmpeg with Pion?
Can I use FFmpeg with Pion?
- Use FFmpeg to decode/encode media
- Pipe RTP output from FFmpeg to Pion
- Use Go FFmpeg bindings for processing
How do I save received media to disk?
How do I save received media to disk?
Can I access raw RTP packets?
Can I access raw RTP packets?
Connectivity & NAT Traversal
Do I need a TURN server?
Do I need a TURN server?
- Local Network: No TURN needed
- Same Network/No Firewall: STUN may be sufficient
- Behind NAT/Firewall: TURN server recommended
- Production: Always include TURN servers
How do I use a single port for multiple connections?
How do I use a single port for multiple connections?
Can I use TCP instead of UDP?
Can I use TCP instead of UDP?
What is Trickle ICE and should I use it?
What is Trickle ICE and should I use it?
- Faster connection establishment
- Better user experience
- Recommended for production
Data Channels
How do I send data between peers?
How do I send data between peers?
What's the difference between ordered/unordered and reliable/unreliable?
What's the difference between ordered/unordered and reliable/unreliable?
- Ordered: Messages arrive in the order sent (default: true)
- Unordered: Messages may arrive out of order (lower latency)
- Reliable: Messages guaranteed to arrive (uses retransmission)
- Unreliable: Messages may be lost (lower latency)
How do I handle backpressure in DataChannels?
How do I handle backpressure in DataChannels?
Deployment & Performance
How do I optimize performance?
How do I optimize performance?
- Use interceptors for custom processing
- Pool buffers to reduce GC pressure
- Use Pion’s media libraries (IVF, Ogg readers/writers)
- Monitor memory usage and optimize hot paths
- Use single port configuration in production
- Enable hardware acceleration for supported ciphers
Can I run Pion in Docker?
Can I run Pion in Docker?
- Expose necessary UDP/TCP ports
- Configure ICE servers properly
- Use host networking or proper port mapping
- Consider TURN for NAT traversal
Does Pion support clustering/load balancing?
Does Pion support clustering/load balancing?
- Use TURN servers for media relay
- Implement signaling server with load balancing
- Use service mesh for connection distribution
- See community projects for SFU implementations
How many concurrent connections can Pion handle?
How many concurrent connections can Pion handle?
- Server resources (CPU, memory, bandwidth)
- Media bitrate and complexity
- Whether you’re using SFU/MCU architecture
Debugging & Development
How do I enable debug logging?
How do I enable debug logging?
What tools help debug WebRTC issues?
What tools help debug WebRTC issues?
- chrome://webrtc-internals: Chrome’s built-in WebRTC debugging
- Wireshark: Packet capture and analysis
- Pion’s logging: Enable debug logs
- Stats API: Monitor connection statistics
How do I test WebRTC applications?
How do I test WebRTC applications?
- Unit tests for business logic
- Integration tests with virtual networks (vnet)
- Browser automation with tools like Selenium
- Load testing with benchmarking tools
Platform-Specific
Can I use Pion on mobile devices?
Can I use Pion on mobile devices?
- Compile using
gomobile - Pure Go means no platform-specific build issues
- Used in production mobile apps
Does Pion work with WebAssembly?
Does Pion work with WebAssembly?
Can I use Pion with gRPC or other Go frameworks?
Can I use Pion with gRPC or other Go frameworks?
- Use with any Go web framework (Gin, Echo, Fiber, etc.)
- Integrate with gRPC for signaling
- Combine with other Go libraries
- No special requirements or conflicts