Deepstream-test3 use videomix for mosaic

I use the pipeline of the deepstream-test3,I have added a Gstreamer plugin videomixer before the nvstreammux, my code like this to link the videomixer and nvstreammux, source bin and videomier,
for (i = 0; i < num_sources; i++) {
//pads pour mix et source_bin
GstPad *sinkpad, *srcpad;
gchar pad_name[16] = { };

GstElement *source_bin= NULL;
if (g_str_has_suffix (argv[1], ".yml") || g_str_has_suffix (argv[1], ".yaml")) {
  g_print("Now playing : %s\n",(char*)(src_list)->data);
  source_bin = create_source_bin (i, (char*)(src_list)->data);
} else {
  source_bin = create_source_bin (i, argv[i + 1]);
}
if (!source_bin) {
  g_printerr ("Failed to create source bin. Exiting.\n");
  return -1;
}

gst_bin_add (GST_BIN (pipeline), source_bin);

g_snprintf (pad_name, 15, "sink_%u", i);
//sinkpad = gst_element_get_request_pad (streammux, pad_name);
sinkpad = gst_element_get_request_pad (mix, pad_name);
if (!sinkpad) {
  //g_printerr ("Streammux request sink pad failed. Exiting.\n");
    g_printerr ("mix request sink pad failed. Exiting.\n");
  return -1;
}

srcpad = gst_element_get_static_pad (source_bin, "src");
if (!srcpad) {
  g_printerr ("Failed to get src pad of source bin. Exiting.\n");
  return -1;
}

if (gst_pad_link (srcpad, sinkpad) != GST_PAD_LINK_OK) {
  //g_printerr ("Failed to link source bin to stream muxer. Exiting.\n");
  g_printerr ("Failed to link source bin to mix. Exiting.\n");
  return -1;
}

//g_object_set (G_OBJECT (mix), “pad_name::ypos”, 0, NULL);

gst_object_unref (srcpad);
gst_object_unref (sinkpad);

if (yaml_config) {
  src_list = src_list->next;
}

}
//pads pour mix et nvstreammux
GstPad *sikpad, *sourcepad;
gchar pad_name_sink[16] = “sik_0”;
gchar pad_name_src[16] = “source”;
sikpad = gst_element_get_request_pad (streammux, pad_name_sink);
if (!sikpad) {
g_printerr (“Streammux request sink pad failed. Exiting.\n”);
return -1;
}

sourcepad = gst_element_get_static_pad (mix, pad_name_src);
if (!sourcepad ) {
g_printerr (“mix request src pad failed. Exiting.\n”);
return -1;
}

if (gst_pad_link (sikpad, sourcepad) != GST_PAD_LINK_OK) {
g_printerr (“Failed to link mix to stream muxer. Exiting.\n”);
return -1;
}

gst_object_unref (sikpad);
gst_object_unref (sourcepad);

they are linked avec pads, but the error appear

Decodebin child added: decodebin0
Running…
Decodebin child added: h264parse0
Decodebin child added: capsfilter0
Decodebin child added: nvv4l2decoder0
WARNING from element capsfilter0: not negotiated
Warning: not negotiated
ERROR from element h264parse0: Internal data stream error.
Error details: gstbaseparse.c(3666): gst_base_parse_loop (): /GstPipeline:dstest3-pipeline/GstBin:source-bin-00/GstURIDecodeBin:uri-decode-bin/GstDecodeBin:decodebin0/GstH264Parse:h264parse0:
streaming stopped, reason not-negotiated (-4)
Returned, stopping playback
Deleting pipeline

The videomixer is the open source GStreamer plugin. The nvstreammux is DeepStream plugin with Nvidia hardware acceleration.

Please use “gst-inspect-1.0 nvstreammux” and “gst-inspect-1.0 videomixer” to check the elements’ capabilities. They can not be linked succesfully because the capabilites are different. Please study GStreamer capability negotiation first. Negotiation (gstreamer.freedesktop.org)

Please make sure that you already have basic GStreamer knowlege and coding skills before you start with DeepStream.

The suggestion is to add “nvvideoconvert” Gst-nvvideoconvert — DeepStream 6.2 Release documentation before and after “videomixer” to convert the buffer from “NVMM” GstBuffer to normal GstBuffer and convert normal GstBuffer to “NVMM” GstBuffer. This may make the pipeline to be very slow.

Why can’t the nvmultistreamtiler Gst-nvmultistreamtiler — DeepStream 6.2 Release documentation meet your requirement?

Thank you for your reponse, I ignored the difference in their buffer, so it caused the above error. For mosaic, I think use the videomixer more flexibal more flexible, I can place the video stream according to my needs. Gst Properties of nvmultistreamtiler custom-tile-config does not seem to be supported yet.

I can add nvvideoconvert, But i want to know how to add nvvideoconvert before the videomixer, could you give me some helps?

Please provide complete information as applicable to your setup.

• Hardware Platform (Jetson / GPU)
• DeepStream Version
• JetPack Version (valid for Jetson only)
• TensorRT Version
• NVIDIA GPU Driver Version (valid for GPU only)

I use the container, image version DS6.2-devel
Hardware Platform:GPU Geforce1080
deepStream Version:6.2
TensorRT Version:8.5.2-1+cuda11.8
NVIDIA GPU Driver Version 525.105.17

There is no update from you for a period, assuming this is not an issue anymore. Hence we are closing this topic. If need further support, please open a new one. Thanks

A sample:
gst-launch-1.0 uridecodebin uri=file:///opt/nvidia/deepstream/deepstream/samples/streams/sample_1080p_h264.mp4 ! mux.sink_0 nvstreammux name=mux batch-size=1 width=1920 height=1080 ! nvinfer config-file-path=/opt/nvidia/deepstream/deepstream/samples/configs/deepstream-app/config_infer_primary.txt ! nvmultistreamtiler ! nvvideoconvert ! 'video/x-raw,format=NV12' ! mix.sink_0 videomixer name=mix ! nvvideoconvert ! 'video/x-raw(memory:NVMM),format=RGBA' ! nvdsosd ! fakesink

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