About WebRTC workflows in Wowza Streaming Engine

This article describes the supported WebRTC functionality and workflows in Wowza Streaming Engine.

About WebRTC


Web Real-Time Communication (WebRTC) is an open standard, with an open-source reference implementation, for transmitting audio, video, and data in real time between web browsers and native applications. WebRTC prefers direct peer-to-peer connections and falls back to relayed connections through a TURN server when a direct path can't be established.

Encryption is mandatory: media is secured with DTLS-SRTP, and signaling must travel over HTTPS or WSS.

When ingesting WebRTC source content, Wowza Streaming Engine retrieves Session Description Protocol (SDP) information over a WebSocket connection with the client, or over HTTP when publishing with WebRTC-HTTP Ingestion Protocol (WHIP) or playing back with WebRTC-HTTP Egress Protocol (WHEP).

You can ingest and play WebRTC streams in current versions of all major desktop and mobile browsers. See browser support for WebRTC APIs for version-specific details.

Supported codecs

Video Audio

  • HVEC (H.265)
  • H.264
  • VP8
  • VP9
  • Opus (recommended)
  • Pulse Code Modulation (PCM) types PCMU and PCMA
 

WebRTC limitations

  • Wowza Streaming Engine only supports audio and video streaming via WebRTC. Support for a data channel, commonly used for text-based chat in WebRTC, hasn't been implemented.

WebRTC workflows in Wowza Streaming Engine


WebRTC ingest and egress

The simplest WebRTC implementation in WSE is pass-through ingest and egress. WSE also supports conversion to other protocols, including WHIP, WHEP and Trickle ICE. (Note: WebRTC outputs consume significant bandwidth.)

One-to-few and few-to-few WebRTC broadcasts

You can ingest one or a few WebRTC streams and deliver them to a few viewers via WebRTC. As the number of connections grows, however, your performance may suffer.

Wowza Streaming Engine also supports ingesting source streams over RTSP, SRT, and RTMP and then outputting them for playback over WebRTC.

One-to-many WebRTC broadcasts

For one-to-many WebRTC streams, we recommend the WSE transcoder feature, which allows you to transcode audio and video into any standard output format. After transcoding you can deliver a stream to HLS or MPEG-DASH. This allows you to scale your solution with significantly less bandwidth than direct WebRTC delivery.

To scale your delivery to viewers, you can also use the Stream Targets feature to send the stream to content delivery networks (CDNs) and services such as Wowza Video.

Notes:
  • To send a WebRTC stream from WSE to a Wowza CDN endpoint, transcode it to RTMP or HLS.
  • When using ABR with MPEG-TS HLS transcode both the audio and video codecs.

Learn more

Port configuration


When configuring Wowza Streaming Engine to ingest or play streams with WebRTC, you must ensure that certain ports are accessible for client connections. 

Note: If you have endpoint security enabled, deep packet inspection (DPI) may cause WebRTC streams to stutter. To prevent this, configure your platform to bypass DPI for ports 443 (signaling), 6970–9999 (media), and 1935 (fallback).
Port Protocol Description
443 TCP WSE uses WSS for peer-to-peer connections. You can use the default port of 443 or modify
[install-dir]/conf/VHost.xml if needed.
6970 to 9999 UDP Default range. Configure starting port using the DatagramStartingPort parameter in [install-dir]/conf/Server.xml.
1935 TCP Configure the host post in [install-dir]/conf/VHost.xml. Set the IceCandidateIpAddresses property in [install-dir]/conf/[application-name]/Application.xml.
554 TCP Not supported for TCP ICE candidates.

See Troubleshoot network errors for information about troubleshooting port configurations.

More resources