How can I realize to composite over 16 frames into a frames with nvcompositor

I want to composite 24 frames into a large frame. First I used this command:

gst-launch-1.0 -ev nvcompositor name=comp \
	sink_0::xpos=0 sink_0::ypos=0 sink_0::width=320 sink_0::height=270 \
	sink_1::xpos=0 sink_1::ypos=270 sink_1::width=320 sink_1::height=270 \
	sink_2::xpos=0 sink_2::ypos=540 sink_2::width=320 sink_2::height=270 \
	sink_3::xpos=0 sink_3::ypos=810 sink_3::width=320 sink_3::height=270 \
	...
	sink_20::xpos=1600 sink_20::ypos=0 sink_20::width=320 sink_20::height=270 \
	sink_21::xpos=1600 sink_21::ypos=270 sink_21::width=320 sink_21::height=270 \
	sink_22::xpos=1600 sink_22::ypos=540 sink_22::width=320 sink_22::height=270 \
	sink_23::xpos=1600 sink_23::ypos=810 sink_23::width=320 sink_23::height=270 \
	! 'video/x-raw(memory:NVMM),format=RGBA' ! nvvidconv ! video/x-raw ! xvimagesink sync=true \
	...
	v4l2src device=/dev/video23 ! 'video/x-raw, format=(string)UYVY, width=(int)1280, height=(int)800' ! \
	nvvidconv ! 'video/x-raw(memory:NVMM), format=(string)RGBA' ! comp.sink_23

and I got the error:

/GstPipeline:pipeline0/GstNvCompositor:comp.GstAggregatorPad:src: caps = video/x-raw(memory:NVMM), format=(string)RGBA, width=(int)1600, height=(int)1080, framerate=(fraction)30/1, chroma-site=(string)NULL, colorimetry=(string)sRGB
/GstPipeline:pipeline0/GstCapsFilter:capsfilter0.GstPad:sink: caps = video/x-raw(memory:NVMM), format=(string)RGBA, width=(int)1600, height=(int)1080, framerate=(fraction)30/1, chroma-site=(string)NULL, colorimetry=(string)sRGB
input_buffers count must not greater than MAX_COMPOSITE_FRAME
nvbuffer_composite Failed
Got EOS from element "pipeline0".

Then I found this topic:

from this topic, I know MAX_COMPOSITE_FRAME has hardware limitations.
However, I tried to split 24 to 12/12 frames and I found I could enable 12 frames into a large frame with 2 processes to realize to enable 24 frames at the same time.

Could anyone explain why it can be realized by 2 processes if there is a hardware limitation? What is the hardware limitation of the compositor? Is it possible to realize composite 24 frames into a large frame?

Hi,
It is limitation of hardware converter. It has MAX_COMPOSITE_FRAME=16. So we can only set up 16 frames in one execution. For > 16 frames, would need to divide into two executions.

Thanks! I can realize to composite 24 frames by using multiple compositors to implement 12/12 frames into another larger frame of compositor.

1 Like

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