Skip to content

Mosaic

Flussonic has a built-in mosaic module. This module allows you to merge several streams into one view (a mosaic) and play it back as if it was a single stream. Mosaics are created with the use of the transcoder.

Merging streams into a mosaic

In the Watcher's web interface you can create client-side mosaic that shows several cameras at once. Learn more in Watcher documentation.

To create a server-side mosaic:

Install the flussonic-transcoder package:

Note. The package flussonic-transcoder is necessary only if you plan to use the CPU to perform transcoding. If you use Nvidia NVENC, no extra packages are needed.

apt-get -y install flussonic-transcoder

Now specify the following in the Flussonic configuration file:

stream cam1 {
  input rtsp://IP-CAMERA-ADDRESS:PORT/camera1;
}
stream cam2 {
  input rtsp://IP-CAMERA-ADDRESS:PORT/camera2;
}
stream cam3 {
  input rtsp://IP-CAMERA-ADDRESS:PORT/camera3;
}
stream cam4 {
  input rtsp://IP-CAMERA-ADDRESS:PORT/camera4;
}
stream mosaic0 {
  input mosaic://cam1,cam2,cam3,cam4?fps=20&preset=ultrafast&bitrate=1024k&size=340x240&mosaic_size=16;
}

After specifying the pseudo-URL mosaic:// you need to type stream names separated by commas.

The option fps=20 specifies frames per second for video. You can use fps=video for binding fps of mosaic to the first camera's stream.

The option size=320x240 reduces the size of each stream in mosaic to the specified width and height.

The option mosaic_size tells how many slots should be in mosaic. Useful for specifying a fixed mosaic size.