WebRTC playback (WHEP)¶
For minimal-latency playback Sapsan serves streams over WebRTC via the standard WHEP protocol.
Configuration¶
WebRTC needs a UDP port on the server:
listeners:
webrtc:
- port: 5005
Playback URL¶
The stream's WHEP endpoint:
http://server/streaming/whep/<stream>
Any WHEP-compatible player works.
Requirements and behavior¶
- The stream must have an H264 video track; Opus audio is optional. A stream with another video codec is not served over WHEP (re-encode with the transcoder). Streams with G.711 audio also go through the transcoder to Opus.
- The server answers PLI/NACK (a fresh keyframe on player request) and paces packet output instead of flooding the client.
- WebRTC uses the fixed UDP port set from
listeners.webrtc— easy to open on a firewall; the server's external address is detected automatically.
Note
TODO: an HTML player example, limitations (no MBR playback, simulcast, TWCC yet).