Gdkpixbufoverlay on nvcompositor

Where do I add the gdkpixbufoverlay to overlay a png on my video stream. I tried this but I got the following errors:

gst-launch-1.0 nvcompositor name=comp                 
sink_0::xpos=0 sink_0::ypos=0 sink_0::width=2560 sink_0::height=720 sink_0::zorder=1 sink_0::alpha=1                 
sink_1::xpos=0 sink_1::ypos=0 sink_1::width=200 sink_1::height=200 sink_1::zorder=2 sink_1::alpha=0.1                 
! 'video/x-raw(memory:NVMM),format=RGBA' ! gdkpixbufoverlay location=location/to/overlay-top.png offset-x=30 ! nv3dsink                 
rtspsrc location=rtsp://127.0.0.1:8554/test latency=0 ! rtph265depay ! h265parse ! nvv4l2decoder ! nvvidconv ! 'video/x-raw(memory:NVMM),format=RGBA' ! comp.sink_0                        
videotestsrc ! videoconvert ! video/x-raw,format=RGBA ! nvvidconv ! 'video/x-raw(memory:NVMM),format=RGBA,width=200,height=200' ! comp.sink_1
WARNING: erroneous pipeline: could not link comp to gdkpixbufoverlay0, gdkpixbufoverlay0 can't handle caps video/x-raw(memory:NVMM), format=(string)RGBA

Hi,
NVMM buffer is supported in our plugins. The gdkpixbufoverlay does not support the buffer type. Please convert NVMM buffer to CPU buffer through nvvidconv plugin:

... ! 'video/x-raw(memory:NVMM),format=RGBA' ! nvvidconv ! video/x-raw,format=RGBA ! gdkpixbufoverlay

Thanks that worked. It does make the display framerate slower however, is there a way to do this without the extra conversion?

Hi,

No, it requires to copy NVMM buffer to CPU buffer when using gdkpixbufoverlay. You may execute sudo nvpmodel -m 2 and sudo jetson_clocks to run CPU cores at max clock.

For optimal solution, we suggest use nv3dsink or nvoverlaysink to render NVMM buffer directly.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.