RTMP Live Streaming

RTMP (Real-Time Messaging Protocol) lets you forward an ongoing EnableX video session as a single live stream to any CDN or platform that accepts an RTMP ingest — YouTube, Facebook, Vimeo, Twitch, LinkedIn Live, or a private media server.

EnableX composites all participant streams into a single video feed using a configurable streaming view, then pushes that feed over RTMP to the CDN of your choice. The CDN distributes the stream to your audience via its own infrastructure.

RTMP supports the H.264 codec only. Ensure your CDN account is configured for H.264 before enabling streaming.
How It Works

Participants join an EnableX video session from their own devices. EnableX takes the session and renders it through a streaming view — a web application that joins the room silently and presents the session layout you want your audience to see. That rendered view is encoded and pushed as a single RTMP stream to your CDN. The CDN then delivers the stream to viewers on the public URL it provides.

RTMP live streaming flow — participants → EnableX → RTMP CDN → audience
Participants join the EnableX session; EnableX forwards a single composited stream to the RTMP CDN; the CDN delivers it to viewers.
The RTMP streaming view is powered by the Virtual Agent — a shared web-based view that also serves HLS Streaming and Live Recording. See Virtual Agent for details on the default view and how to build a custom one.
Setup

Step 1 — Get Your CDN Streaming Credentials

Before starting RTMP streaming from EnableX, set up a live stream on your chosen CDN platform. Every CDN provides three pieces of information you will need:

Concatenate the RTMP Streaming URL and Streaming Key when passing them to the EnableX API: RTMP_URL/STREAMING_KEY.

Step 2 — Start and Stop Streaming

Use room.startStreaming() from the moderator's session to initiate the RTMP stream. Pass the CDN ingest URL, your streaming key, and optionally a custom streaming view URL.

var streamingConfig = {
  rtmpDetails: {
    rtmpUrl: "RTMP_URL/STREAMING_KEY"
  },
  urlDetails: {
    url: "https://your-domain/streaming-view/?token="
    // Omit urlDetails to use the EnableX default view
  }
};

// Start streaming
room.startStreaming(streamingConfig, function(resp) {
  if (resp.status.resultCode === 0) {
    console.log("Streaming started — you are live.");
  } else {
    console.error(resp.status.error.errorDesc);
  }
});

// Stop streaming
room.stopStreaming(function(resp) {
  console.log("Streaming stopped.");
});

// All participants are notified when streaming starts
room.addEventListener("streaming-started", function(event) {
  console.log("Stream started by:", event.message.startedBy);
});

// All participants are notified when streaming stops
room.addEventListener("streaming-stopped", function(event) {
  console.log("Stream stopped by:", event.message.stoppedBy);
});
Pass the streaming view URL without a token value — use a trailing ?token=. EnableX appends the token at runtime. If you omit urlDetails entirely, EnableX uses its default streaming view.

Step 3 — Monitor the Stream

Once streaming starts from your EnableX application, log in to your CDN account dashboard to monitor the incoming feed. Expect a lag of 10–40 seconds between the live session and the viewer-facing stream — this is normal for RTMP ingest pipelines.

For scheduled streaming events, your CDN may require you to click a separate Go Live button before the stream becomes visible on the public URL. Check your CDN provider's dashboard for this step.

YouTube Live — Setup Walkthrough

The steps below use YouTube Live as an example. The same concepts — obtaining an RTMP ingest URL, a streaming key, and a public viewer URL — apply to any RTMP-compatible CDN.

1. Navigate to YouTube Studio

Log in to YouTube. Click your profile icon in the top-right corner, then select YouTube Studio.

YouTube profile menu — navigate to YouTube Studio

2. Create a Live Stream

In the top-right bar of YouTube Studio, click CREATE, then click Go live.

YouTube Studio — CREATE → Go live

3. Configure the Stream

From the right-side panel, select STREAM. Fill in the stream details — title, description, and category. For a general video conference, People & Blogs is a suitable category.

YouTube stream setup form

4. Obtain Stream URL and Key

After saving the stream configuration, YouTube displays the streaming console. Copy the Stream URL and Stream Key — you will pass these to the EnableX startStreaming() call.

YouTube CDN information — Stream URL and Stream Key

5. Get the Public Viewer URL

Click the Share (arrow) icon in the top-right of the streaming console. A popup displays the public URL for your audience. Copy and distribute this URL before going live.

YouTube share popup — public viewer URL
Custom Streaming View

By default, EnableX uses its built-in streaming view to composite the session before pushing it to the RTMP CDN. If you need a branded layout, a specific participant arrangement, or a completely custom UI, you can build and host your own streaming view and pass its URL to startStreaming().

The custom streaming view is the same web application used by HLS Streaming and Live Recording — it is managed as a shared Virtual Agent for the session. The agent is started by whichever service activates first and runs until the last service ends.

For full details on how the Virtual Agent works and how to build a custom view, see Virtual Agent — Custom Streaming View.

SDK References

RTMP streaming is controlled through the Video SDK. The method names and event signatures differ slightly across platforms — refer to the relevant SDK page for implementation details: