Red5 Documentation

Server-side Watermark

The following details how to use a Red5 Pro Mixer to create a server-side watermarked stream.

  1. The browser-based publisher uses the Stream Manager API to create a provision for the watermarked stream that will be generated by the Mixer. The provision specifies a GUID, for example live/screen-share1-watermarked, and the variants the Transcoder will create, for example live/screen-share1-watermarked_1, live/screen-share1-watermarked_2 and live/screen-share1-watermarked_3.
  2. The publisher requests an origin node and creates a screen-share stream that is published to it, for example, live/screen-share1.
  3. The publisher uses the Stream Manager API to create a composition. The body of the request will specify:
    • To transcode the composition by setting transcodeComposition to true
    • An event that must match the stream name in the GUID (screen-share1-watermarked)
    • A single Mixer object in the mixers array where:
    • mixingPage will be the URL of your page that adds the watermark (more details in the next section)
    • path that must match the context in the GUID (live)
    • streamName that must match the name of the highest variant specified in the transcoding provision (screen-share1-watermarked_1)
    • destinationMixerName must be left empty
    • The desired width, height, bitrate, and framerate for the mixed stream
  4. When the composition is created, the Mixer will be provisioned, it will load the mixingPage specified and stream it out to a Transcoder using the stream name live/screen-share1-watermarked_1.
  5. Viewers will use the Stream Manager to request an Edge to subscribe to a variant of the watermarked stream (live/screen-share1-watermarked_1, live/screen-share1-watermarked_2 or live/screen-share1-watermarked_3).

The Round Trip Authentication process can be used to prevent viewers from subscribing to the original screen share stream by having the authentication server only accept subscribe requests targeting the original streams that are made by a Mixer. In other words, when the Mixer subscribes, it will need to provide the only username, password, and token combination that is accepted by the authentication server to subscribe to the original stream. Any other combination will need to be rejected. In this way, given only Mixers will have those credentials, then no general viewer will be able to subscribe to the original stream.


The Mixer node uses the Chromium Embedded Framework (CEF) to load a webpage and includes a plugin that captures the content of the page and streams it out to a Red5 Pro Transcoder or Origin. The page could be hosted on the Stream Manager nodes or any other publicly reachable server. For simplicity, it is recommended to pass any configuration to the page via URL query parameters. That may include the name of the original stream to subscribe to and the type of watermark to add. Once the page is loaded in the mixer using the Create Composition Stream Manager API, the Mixer will automatically take care of capturing it and publishing it as a stream.