Skip to main content

WebRTC

Quick look-up table

WebRTC
Type of streamingReal time streaming
Development StateIn active development
Expected Latency< 1sec
Connection typeUDP
Container typeRTP
WhereModern browsers
Default PortNone
Modern codecsH264, VP9, Opus
Difficulty of readBeginner
Notes

What do I need to know about WebRTC?

WebRTC stands for Web Real-Time Communications. It is an open communication method with free public specification (meaning anyone can implement it without needing to pay anything to find out how) that supports video, audio and generic data. Almost every online conferencing tool or video chat has been build on this. One of the biggest benefits is that it is accepted and supported by all modern browsers, which means it gets rid of the usual handicap true streaming protocols suffer, the need for a custom player.

When would you use WebRTC?

When subsecond delivery is a must and network conditions are acceptable.

We've all been in online conferences that work mostly well. Why would WebRTC be any different for video streaming? Without going into technical details: the building blocks are there for 90%, but the last 10% was up whomever implements it. This means that everyone had a WebRTC solution that would only work for their specific way of WebRTC.

However a solution came in the form of WHIP (WebRTC HTTP Ingress Protocol) & WHEP (WebRTC HTTP Ingress Protocol). This is the first standardization of WebRTC that seems to be getting a good amount of support as multiple applications including MistServer support this version of WebRTC.

The schme for using WHIP/WHEP with MistServer is as follows:

https://HOSTNAME:PORT/webrtc/STREAMNAME

Whether you're sending or receiving is chosen by whether you're using WHIP (ingress/input) or WHEP (egress/output). HOSTNAME The server to connect towards PORT The HTTP(S) port to connect towards STREAMNAME The streamname to connect towards

Some things you should know about WebRTC

  • A STUN/TURN configuration is needed to handle WebRTC correctly. MistServer can generate this on the fly, but it does slow things down.
  • Bframes tend to generate stutters or weird video behaviour for a lot of WebRTC implementations. It's best to turn these off on your encoder if you plan to use WebRTC.
  • While WebRTC does not require SSL (https), we've noticed that a lot of features or even playback can be locked by the browser if SSL is not used. We recommend using SSL for this reason.

Advantages of WebRTC

  • UDP: low latency transport
  • Supported in all modern browsers
  • Easier use since WHIP/WHEP

Disadvantages of WebRTC

  • Bad connection always means bad playback
  • Hard to fine-tune to perfection
  • Need a back up protocol if conditions are unfavorable

How do you get started with WebRTC?

Want to fine-tune WebRTC to be your perfect solution? Be sure to contact us and learn how we can help.