UI Overlay on Gstreamer

Hi,

Could someone recommend the best solution to render dynamic overlays in video in gstreamer.

Hi,
There is no existing sample. A possible solution is to access the NvBufSurface and use cairo APIs to put UI to the NvBufSurface. You can convert the surface to RGBA through nvvidconv plugin, and implement the UI code in the plugin.

Source code of nvvidconv is in

Jetson Linux Release 36.5.2 | NVIDIA Developer
Driver Package (BSP) Sources

Sample of using cairo APIs:
Tx2-4g r32.3.1 nvivafilter performance - #16 by DaneLLL

Cairo utilizes CPU to draw the UI right?

Is there some hardware accelerator options for rendering the UI?

Further, I could not find any proper documentation for Cairo APIs

FYI: I am using Jetson Orin Nano with Jetpack 6.2.1

Hi,

For your questions,

  1. Yes.
  2. No. If you want, you could write CUDA code to implement it by yourself.

And I implemented a sample patch for your scenario based on our existing pipeline.
You could refer to the attached Cairo overlay sample. We tested it on an AGX Orin Developer Kit running Jetson Linux r39.2.1.
cario_sample_patch.tar.xz (2.8 KB)

Thanks.