MOQ Beta | Now Open For Enterprises / Learn More

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.

MIXER WEBPAGE

The BrewMixer supports image overlays, allowing you to add a watermark to your stream using an ImageSourceNode in the render tree.
Steps:

  • Upload your image — PNG format with 8-bit transparency is supported — also supports JPEG or GIF.
  • Create a Mixer — Use the Stream Manager 2.0 API to create a mixer instance.
  • Update the renderTree — Include an ImageSourceNode that references your uploaded image to apply it as an overlay.
  • For full API details, refer to the Mixer Image Operations documentation