Skip to content

Overlay a Logo on a Stream with FFmpeg in Senta

To make a logo for a stream, you can use the Logo adding profile — it’s one of the starter profiles that come pre-installed with Senta, so it’s already there on the Profiles page, nothing to download or set up. Here’s an example of how you can add a logo to a stream:

Next, you need to add this profile to the stream. Set the input and output parameters. And variables: X, Y - offset logo from the top right corner, logo - path to the logo file (see working with files to details).

Specify logo and add it to stream In this example, we get stream from rtsp stream and download a ts-file to the server.

To simplify creating the file path for the stream dump, we selected the folder path through the file browser (in this example, /tmp) and added file.ts at the end in the test field.

As a result, the final path will be: /tmp/file.ts (You can download it in files section)

Finally, you can see the result in VLC.

The Logo adding command is:

Terminal window
ffmpeg -i ${i} ${logo} -filter_complex "[1][0]scale2ref=oh*mdar:ih*0.2[logo][video];[video][logo]overlay=(main_w-overlay_w)-${x}:${y}" -y ${o}

scale2ref scales the logo to 20% of the video height and keeps its aspect ratio. overlay places it with the x and y offsets counted from the top-right corner. The variables logo (path to the image), x and y are empty by default, so fill in all three.

Click the log link in the stream’s row in the Streams table: the log of the current session shows ffmpeg’s output and progress lines (Stream logs). Then open the result in VLC: the logo is in the top-right corner, shifted by the x and y values.

  • The output has no format. The command has no -f, so ffmpeg takes the format from the extension of ${o} (for example file.ts). For a network address such as udp://... add -f mpegts to the command.
  • A wrong logo path or an empty x or y. Pick the logo through the file browser, see Working with Files.
  • Expecting another corner. The logo is anchored to the top-right; a different position means changing the overlay formula.