Nvbufsurface with new streammux

frames = pyds.get_nvds_buf_surface(gst_buffer, frame_meta.batch_id)

RuntimeError: get_nvds_buf_Surface: Currently we only support RGBA/RGB color Format

This is why we use the nvvideoconvert, and capfilter

If you tell any other way in which I can convert to a RGBA format, without using nvideoconvert, and capsfilter.
We cannot call get_nvds_buf_surface before the nvvideoconvert as it needs RGBA input format.

even there are two different resolutions in a batch, nvideoconvert will convert the resolutions to the same resolution based on the caps. In your case, you can convert the source to RGB before nvstremamux. Please refer to the following cmd.

gst-launch-1.0  filesrc location=/opt/nvidia/deepstream/deepstream/samples/streams/sample_720p.mp4 ! qtdemux  ! h264parse ! nvv4l2decoder !  nvvideoconvert !  'video/x-raw(memory:NVMM),format=RGBA'  ! mux.sink_0 nvstreammux name=mux batch-size=2  ! fakesink name=fake filesrc location=/opt/nvidia/deepstream/deepstream/samples/streams/sample_1080p_h264.mp4 ! qtdemux ! h264parse ! nvv4l2decoder ! nvvideoconvert !  'video/x-raw(memory:NVMM),format=RGBA'  !  mux.sink_1

@fanzh Please debug this and let us know are you able to reproduce the issue?

If we perform the conversion before the streammux, then it will still convert to a single resolution, that was the suggestion in the topic, why are we revolving around the same thing.
We need to be able to extract different frames with their individual resolution in python, using get_nvds_buf_surface.

Please refer to my last comment, especially the command-line. coverting color format will not change the resolution. You may add probe function to check the resolution.

you are contradicting!!

Please refer to my last two comments, especially the command-line. If inputting two different resolutions, the command-line only converts the color format before nvstreammux, does not convert the resolution. hence after nvstreammux, there are two different resolutions in the batch. This pipeline is for your case(1. does not want to change each resolution after nvsteammux. 2. get_nvds_buf_Surface issue above).

Generally, we suggestes this " Work Around" in heterogeneous-batching, namely add nvvideoconvert + capsfiler before each new-nvstreammux. Here is the detailed pipeline in the link.

gst-launch-1.0 \
uridecodebin ! nvvideoconvert ! "video/x-raw(memory:NVMM), width=1920, height=1080, format=NV12" ! m.sink_0 \
uridecodebin ! nvvideoconvert ! "video/x-raw(memory:NVMM), width=1920, height=1080, format=NV12" ! m.sink_1 \
nvstreammux name=m batch-size=2 ! fakesink async=0

@fanzh , Are you trying to reproduce issue with this python sample app which has get_nvds_buf_surface()?

@s.Jagannath @rishika.rao
No, Please refer to my last three comments. I have shared the reason, resolution and sample pipeline cmd. Is this still an DeepStream issue to support? Thanks!

@fanzh the issue is resolved, thank you.

really appreciate it.