Suggestions

close search

Broadcast

OpenTok broadcast lets you share live OpenTok sessions with many viewers.

The OpenTok platform supports two different types of broadcast:

Both types of broadcast require you to use a routed OpenTok session (a session that uses the OpenTok Media Router).

Comparison of live interactive video broadcasts and live streaming broadcasts

The large interactive video broadcast feature is built on WebRTC, enabling ultra-low latency delivery of content that in turn enables real-time interactions among participants.

HLS uses CDN for delivery and is a traditional broadcast with high latency (15–20 seconds) and no interaction.

RTMP has lower latency (around 5 seconds) than HLS, but it does not lend itself to use-cases that require interactivity.

If your use-case requires interactivity, you should use The large interactive video broadcast feature to serve your real-time audience. Each audience member could potentially publish a stream to the session to interact with other publishers of live streams (such as a host or presenter).

HLS should be used to serve the "burst capacity" — when the audience size exceeds what can be supported in real time in a live streaming interactive broadcast. An HLS viewer will receive the content at a latency of 15–20 seconds, so it does not lend itself directly to interactive use-cases.

Customers could build additional logic in their application to move a viewer from HLS to real-time and vice-versa. In this case, the application may include capabilities to to manage the latency difference between the HLS and real-time viewer.

You can serve HLS content to viewers on clients that do not support WebRTC.

Use RTMP to push content created on OpenTok to social media video platforms, such as Facebook or YouTube Live.

More clients can simultaneously view an HLS or RTMP stream than can view a live interactive video session. For example, you may provide an HLS stream to a client if the OpenTok session has reached the 3,000-connection limit for OpenTok live interactive broadcasts. HLS streams support an unlimited number of viewers. RTMP streams are limited by the number of viewers supported by the RMTP provider.

Sample app

For a sample app that shows how to use both the live interactive video broadcast and live streaming features, see the OpenTok broadcast-sample-app repo on GitHub.