Cropped image green colored?

I added the following code to deepstream_app.c

static GstPadProbeReturn
pgie_src_pad_buffer_probe (GstPad * pad, GstPadProbeInfo * info,
    gpointer ctx)
{
  GstBuffer *buf = (GstBuffer *) info->data;
  GstMapInfo inmap = GST_MAP_INFO_INIT;
  if (!gst_buffer_map (buf, &inmap, GST_MAP_READ)) {
    GST_ERROR ("input buffer mapinfo failed");
    return GST_FLOW_ERROR;
  }
  NvBufSurface *ip_surf = (NvBufSurface *) inmap.data;
  gst_buffer_unmap (buf, &inmap);

  NvDsObjectMeta *obj_meta = NULL;
  guint vehicle_count = 0;
  guint person_count = 0;
  gboolean got_enc_img = FALSE;
  // g_print("NULLING NvDsMetaList\n");
  NvDsMetaList *l_frame = NULL;
  NvDsMetaList *l_obj = NULL;
  NvDsBatchMeta *batch_meta = gst_buffer_get_nvds_batch_meta (buf);

  for (l_frame = batch_meta->frame_meta_list; l_frame != NULL;
      l_frame = l_frame->next) {
    NvDsFrameMeta *frame_meta = (NvDsFrameMeta *) (l_frame->data);
    guint num_rects = 0;
    for (l_obj = frame_meta->obj_meta_list; l_obj != NULL; l_obj = l_obj->next) {
      obj_meta = (NvDsObjectMeta *) (l_obj->data);
      if (obj_meta->class_id == 0) {
        person_count++;
        num_rects++;
      }
      /* Conditions that user needs to set to encode the detected objects of
       * interest. Here, by default all the detected objects are encoded.
       * For demonstration, we will encode the first object in the frame */
      if (obj_meta->class_id == 0 && num_rects == 1) {
        NvDsObjEncUsrArgs userData = { 0 };
        /* To be set by user */
        userData.saveImg = save_img;
        userData.attachUsrMeta = attach_user_meta;
        /* Preset */
        userData.objNum = num_rects;
        /*Main Function Call */
        nvds_obj_enc_process (ctx, &userData, ip_surf, obj_meta, frame_meta);
        got_enc_img = TRUE;
      }
    }
  }
  if(got_enc_img){
    nvds_obj_enc_finish (ctx);
  }
  return GST_PAD_PROBE_OK;
}

Then In the create_common_elements , i added the following code.

static gboolean
create_common_elements(NvDsConfig *config, NvDsPipeline *pipeline,
                       GstElement **sink_elem, GstElement **src_elem,
                       bbox_generated_callback bbox_generated_post_analytics_cb)
{
 ....
  if (config->primary_gie_config.enable)
  {
    if (!create_primary_gie_bin(&config->primary_gie_config,
                                &pipeline->common_elements.primary_gie_bin))
    {
      goto done;
    }
    gst_bin_add(GST_BIN(pipeline->pipeline),
                pipeline->common_elements.primary_gie_bin.bin);
    if (*sink_elem)
    {
      NVGSTDS_LINK_ELEMENT(pipeline->common_elements.primary_gie_bin.bin,
                           *sink_elem);
    }
    *sink_elem = pipeline->common_elements.primary_gie_bin.bin;
    if (!*src_elem)
    {
      *src_elem = pipeline->common_elements.primary_gie_bin.bin;
    }
    NVGSTDS_ELEM_ADD_PROBE(pipeline->common_elements.primary_bbox_buffer_probe_id,
                           pipeline->common_elements.primary_gie_bin.bin, "src",
                           gie_primary_processing_done_buf_prob, GST_PAD_PROBE_TYPE_BUFFER,
                           pipeline->common_elements.appCtx);
    if (config->primary_gie_config.enc_objects_images)
    {
      NvDsObjEncCtxHandle obj_ctx_handle = nvds_obj_enc_create_context();
      if (!obj_ctx_handle) {
        g_print ("Unable to create NvDsObjEncCtxHandle context\n");
        return -1;
      }
      NVGSTDS_ELEM_ADD_PROBE(pipeline->common_elements.primary_bbox_buffer_probe_id,
                             pipeline->common_elements.primary_gie_bin.bin, "src",
                             pgie_src_pad_buffer_probe, GST_PAD_PROBE_TYPE_BUFFER,
                             (gpointer)obj_ctx_handle);
    }
  }
 ...
}

after these, This is the bbox_generated_probe_after_analytics in deepstream-test5

static void
bbox_generated_probe_after_analytics(AppCtx *appCtx, GstBuffer *buf,
                                     NvDsBatchMeta *batch_meta, guint index)
{
    ......
    [within for loop of batch_meta]
        ....
       
                /** Generate NvDsEventMsgMeta for every object */
                // if (frame_number < 100 && obj_meta->class_id == PGIE_CLASS_ID_VEHICLE) {
                /* for write files */
                NvDsUserMetaList *usrMetaList = obj_meta->obj_user_meta_list;
                FILE *file;
                char fileNameString[file_name_size];
                const char *osd_string = "OSD";
                int obj_res_width = GST_ROUND_DOWN_2 ((int) obj_meta->rect_params.width);
                int obj_res_height = GST_ROUND_DOWN_2 ((int) obj_meta->rect_params.height);
                snprintf (fileNameString, file_name_size, "%s_%d_%d_%d_%s_%dx%d.jpg",
                     osd_string, frame_number, frame_meta->source_id, num_rects,
                     obj_meta->obj_label, obj_res_width, obj_res_height);
                /***************************************************************************/
                gint check_images = 0;
                if (usrMetaList)
                {
                    
                    while (usrMetaList != NULL)
                    {
                        NvDsUserMeta *usrMetaData = (NvDsUserMeta *)usrMetaList->data;
                        if (usrMetaData->base_meta.meta_type == NVDS_CROP_IMAGE_META)
                        {

                            enc_image = (NvDsObjEncOutParams *)usrMetaData->user_meta_data;
                            check_images++;
                            /* Write to File */

                            file = fopen (fileNameString, "wb");
                            fwrite (enc_image->outBuffer, sizeof (uint8_t),
                                 enc_image->outLen, file);
                            fclose (file);
                            // g_print("NULLING\n");
                            usrMetaList = NULL;
                        }
                        else
                        {
                            usrMetaList = usrMetaList->next;
                        }
                    }
                }
                if (enc_image)
                {
                    // g_print("total enc_image:%d\n",check_images);
                }
                // g_print("total enc_jpg_images:%d\n",check_images);
                NvDsEventMsgMeta *msg_meta = (NvDsEventMsgMeta *)g_malloc0(sizeof(NvDsEventMsgMeta));
                // g_print("confidence:%lf",obj_meta->confidence);
            ......................
}

please ignore the nvdsanalytics part. and I modified the deepstream_config_file_parser.c to add some for configuration file. therefore it has some field that default deepstream-5.0 doesn’t exists such as primary_gie_config.enc_objects_images.
Just wondering what would cause this? Is this means the cropped object encoded failed?

@Fiona.Chen Hi, I have figure out the problem is that my streammux and tiled-display configuration.

Suppose I have a h264 4k camera with setting with Main Profile, with the following setting. how should I suppose to setup the tiled-display and streammux settings? normally the streammux should not set as 4k?

The setting that works.

[tiled-display]
enable=1
rows=1
columns=1
width=3840
height=2160
#width=1920
#height=1080
#width=1280
#height=720
gpu-id=0
nvbuf-memory-type=0

[streammux]
gpu-id=0
##Boolean property to inform muxer that sources are live
live-source=1
batch-size=1
##time out in usec, to wait after the first buffer is available
##to push the batch even if the complete batch is not formed
batched-push-timeout=400
## Set muxer output width and height
#width=3840
#height=2160
width=1920
height=1080
##Enable to maintain aspect ratio wrt source, and allow black borders, works
##along with width, height properties
enable-padding=0
nvbuf-memory-type=0
## If set to TRUE, system timestamp will be attached as ntp timestamp
## If set to FALSE, ntp timestamp from rtspsrc, if available, will be attached
#attach-sys-ts-as-ntp=1

The setting that don’t works.

[tiled-display]
enable=1
rows=1
columns=1
width=3840
height=2160
#width=1920
#height=1080
#width=1280
#height=720
gpu-id=0
nvbuf-memory-type=0

[streammux]
gpu-id=0
##Boolean property to inform muxer that sources are live
live-source=1
batch-size=1
##time out in usec, to wait after the first buffer is available
##to push the batch even if the complete batch is not formed
batched-push-timeout=400
## Set muxer output width and height
width=3840
height=2160
#width=1920
#height=1080
##Enable to maintain aspect ratio wrt source, and allow black borders, works
##along with width, height properties
enable-padding=0
nvbuf-memory-type=0
## If set to TRUE, system timestamp will be attached as ntp timestamp
## If set to FALSE, ntp timestamp from rtspsrc, if available, will be attached
#attach-sys-ts-as-ntp=1

What is your network input dimensions?

My network input dimension is 608x608.

The resolution of 3840x2160 of video may cause inference slow. Can you try with ‘batched-push-timeout=40000’ in [streammux] group, setting “sync=0” in [sink] group, and use “tegrastats” to monitor the GPU loading?

@Fiona.Chen This is the tagratsta when running the app with batched-pushed-timeout=40000.

RAM 4867/7764MB (lfb 136x4MB) SWAP 78/32768MB (cached 10MB) CPU [65%@1420,67%@1420,69%@1420,62%@1420,72%@1420,76%@1420] EMC_FREQ 0% GR3D_FREQ 0% AO@43C GPU@44.5C PMIC@100C AUX@44C CPU@45C thermal@44.45C VDD_IN 11450/7860 VDD_CPU_GPU_CV 5185/2859 VDD_SOC 2327/1686
RAM 4860/7764MB (lfb 136x4MB) SWAP 78/32768MB (cached 10MB) CPU [58%@1420,44%@1420,44%@1420,44%@1420,47%@1420,51%@1420] EMC_FREQ 0% GR3D_FREQ 0% AO@43C GPU@44.5C PMIC@100C AUX@44C CPU@45C thermal@44.45C VDD_IN 10469/7872 VDD_CPU_GPU_CV 4450/2866 VDD_SOC 2245/1689
RAM 4858/7764MB (lfb 136x4MB) SWAP 78/32768MB (cached 10MB) CPU [53%@1420,49%@1420,42%@1420,44%@1420,47%@1420,47%@1420] EMC_FREQ 0% GR3D_FREQ 0% AO@43C GPU@44.5C PMIC@100C AUX@44C CPU@45C thermal@44.45C VDD_IN 10755/7884 VDD_CPU_GPU_CV 4573/2873 VDD_SOC 2286/1691
wRAM 4860/7764MB (lfb 136x4MB) SWAP 78/32768MB (cached 10MB) CPU [47%@1420,42%@1420,43%@1420,39%@1420,42%@1420,43%@1420] EMC_FREQ 0% GR3D_FREQ 0% AO@42.5C GPU@44C PMIC@100C AUX@44C CPU@45C thermal@44.45C VDD_IN 10060/7893 VDD_CPU_GPU_CV 4083/2878 VDD_SOC 2204/1694
RAM 4857/7764MB (lfb 136x4MB) SWAP 78/32768MB (cached 10MB) CPU [51%@1420,45%@1420,46%@1420,48%@1420,46%@1420,51%@1420] EMC_FREQ 0% GR3D_FREQ 0% AO@42.5C GPU@44C PMIC@100C AUX@44C CPU@45C thermal@44.45C VDD_IN 10387/7904 VDD_CPU_GPU_CV 4328/2885 VDD_SOC 2245/1696
RAM 4852/7764MB (lfb 136x4MB) SWAP 78/32768MB (cached 10MB) CPU [53%@1420,41%@1420,40%@1420,37%@1420,39%@1420,48%@1420] EMC_FREQ 0% GR3D_FREQ 54% AO@43C GPU@44.5C PMIC@100C AUX@44C CPU@45C thermal@44.45C VDD_IN 10510/7915 VDD_CPU_GPU_CV 4409/2891 VDD_SOC 2245/1698
RAM 4855/7764MB (lfb 136x4MB) SWAP 78/32768MB (cached 10MB) CPU [46%@1420,46%@1420,49%@1420,51%@1420,48%@1420,48%@1420] EMC_FREQ 0% GR3D_FREQ 75% AO@43C GPU@44.5C PMIC@100C AUX@44C CPU@45C thermal@44.45C VDD_IN 10592/7927 VDD_CPU_GPU_CV 4450/2898 VDD_SOC 2286/1701
RAM 4852/7764MB (lfb 136x4MB) SWAP 78/32768MB (cached 10MB) CPU [52%@1420,46%@1420,45%@1420,45%@1420,52%@1420,43%@1420] EMC_FREQ 0% GR3D_FREQ 98% AO@43C GPU@44.5C PMIC@100C AUX@44C CPU@44.5C thermal@44.3C VDD_IN 10428/7937 VDD_CPU_GPU_CV 4369/2904 VDD_SOC 2245/1703
RAM 4855/7764MB (lfb 136x4MB) SWAP 79/32768MB (cached 10MB) CPU [54%@1420,43%@1420,48%@1420,47%@1420,53%@1420,49%@1420] EMC_FREQ 0% GR3D_FREQ 56% AO@43C GPU@44.5C PMIC@100C AUX@44C CPU@45C thermal@44.45C VDD_IN 10632/7949 VDD_CPU_GPU_CV 4450/2911 VDD_SOC 2286/1706
RAM 4849/7764MB (lfb 136x4MB) SWAP 79/32768MB (cached 10MB) CPU [53%@1420,50%@1420,50%@1420,43%@1420,45%@1420,45%@1420] EMC_FREQ 0% GR3D_FREQ 1% AO@43C GPU@44C PMIC@100C AUX@44C CPU@45C thermal@44.45C VDD_IN 10469/7959 VDD_CPU_GPU_CV 4409/2917 VDD_SOC 2245/1708
RAM 4851/7764MB (lfb 136x4MB) SWAP 79/32768MB (cached 10MB) CPU [49%@1420,42%@1420,38%@1420,47%@1420,43%@1420,47%@1420] EMC_FREQ 0% GR3D_FREQ 30% AO@42.5C GPU@44.5C PMIC@100C AUX@43.5C CPU@45C thermal@44.25C VDD_IN 10592/7970 VDD_CPU_GPU_CV 4450/2923 VDD_SOC 2286/1710
RAM 4849/7764MB (lfb 136x4MB) SWAP 79/32768MB (cached 10MB) CPU [54%@1420,42%@1420,47%@1420,48%@1420,47%@1420,53%@1420] EMC_FREQ 0% GR3D_FREQ 15% AO@42.5C GPU@44.5C PMIC@100C AUX@44C CPU@45C thermal@44.15C VDD_IN 10592/7981 VDD_CPU_GPU_CV 4491/2930 VDD_SOC 2245/1713
RAM 4844/7764MB (lfb 136x4MB) SWAP 79/32768MB (cached 10MB) CPU [46%@1420,36%@1420,44%@1420,43%@1420,45%@1420,45%@1420] EMC_FREQ 0% GR3D_FREQ 14% AO@43C GPU@44.5C PMIC@100C AUX@44C CPU@45C thermal@44.15C VDD_IN 10673/7992 VDD_CPU_GPU_CV 4491/2936 VDD_SOC 2327/1715
RAM 4842/7764MB (lfb 136x4MB) SWAP 79/32768MB (cached 10MB) CPU [55%@1420,48%@1420,49%@1420,52%@1420,55%@1420,50%@1420] EMC_FREQ 0% GR3D_FREQ 28% AO@42.5C GPU@44C PMIC@100C AUX@44C CPU@45C thermal@44.25C VDD_IN 10592/8003 VDD_CPU_GPU_CV 4532/2943 VDD_SOC 2245/1717
RAM 4842/7764MB (lfb 136x4MB) SWAP 79/32768MB (cached 10MB) CPU [49%@1420,44%@1420,45%@1420,47%@1420,41%@1420,45%@1420] EMC_FREQ 0% GR3D_FREQ 98% AO@42.5C GPU@44.5C PMIC@100C AUX@44C CPU@45C thermal@44.45C VDD_IN 10714/8014 VDD_CPU_GPU_CV 4532/2949 VDD_SOC 2286/1720
RAM 4845/7764MB (lfb 136x4MB) SWAP 79/32768MB (cached 10MB) CPU [57%@1420,53%@1420,46%@1420,48%@1420,43%@1420,47%@1420] EMC_FREQ 0% GR3D_FREQ 0% AO@42.5C GPU@44C PMIC@100C AUX@44C CPU@45C thermal@44.45C VDD_IN 10387/8024 VDD_CPU_GPU_CV 4369/2955 VDD_SOC 2204/1722
RAM 4899/7764MB (lfb 136x4MB) SWAP 79/32768MB (cached 10MB) CPU [70%@1420,72%@1420,72%@1420,70%@1420,65%@1420,77%@1420] EMC_FREQ 0% GR3D_FREQ 58% AO@42.5C GPU@44.5C PMIC@100C AUX@44C CPU@45C thermal@44.15C VDD_IN 11491/8038 VDD_CPU_GPU_CV 5226/2965 VDD_SOC 2327/1724
RAM 4908/7764MB (lfb 136x4MB) SWAP 79/32768MB (cached 10MB) CPU [63%@1420,81%@1420,57%@1420,58%@1420,63%@1420,70%@1420] EMC_FREQ 0% GR3D_FREQ 54% AO@42.5C GPU@44.5C PMIC@100C AUX@43.5C CPU@45C thermal@44.3C VDD_IN 11409/8052 VDD_CPU_GPU_CV 5185/2974 VDD_SOC 2286/1726
RAM 4841/7764MB (lfb 136x4MB) SWAP 79/32768MB (cached 10MB) CPU [64%@1420,54%@1420,55%@1420,57%@1420,55%@1420,61%@1420] EMC_FREQ 0% GR3D_FREQ 19% AO@43C GPU@44.5C PMIC@100C AUX@44C CPU@45C thermal@44.3C VDD_IN 10960/8064 VDD_CPU_GPU_CV 4736/2981 VDD_SOC 2327/1729
RAM 4838/7764MB (lfb 136x4MB) SWAP 79/32768MB (cached 10MB) CPU [49%@1420,41%@1420,43%@1420,44%@1420,44%@1420,50%@1420] EMC_FREQ 0% GR3D_FREQ 26% AO@42.5C GPU@44.5C PMIC@100C AUX@44C CPU@44.5C thermal@44.45C VDD_IN 10551/8074 VDD_CPU_GPU_CV 4409/2986 VDD_SOC 2245/1731
RAM 4836/7764MB (lfb 136x4MB) SWAP 79/32768MB (cached 10MB) CPU [55%@1420,46%@1420,50%@1420,51%@1420,51%@1420,48%@1420] EMC_FREQ 0% GR3D_FREQ 0% AO@43C GPU@44C PMIC@100C AUX@44C CPU@45C thermal@44.25C VDD_IN 10673/8084 VDD_CPU_GPU_CV 4573/2993 VDD_SOC 2245/1733
RAM 4834/7764MB (lfb 136x4MB) SWAP 79/32768MB (cached 10MB) CPU [52%@1420,40%@1420,46%@1420,43%@1420,38%@1420,45%@1420] EMC_FREQ 0% GR3D_FREQ 0% AO@43C GPU@44C PMIC@100C AUX@44C CPU@44.5C thermal@44.1C VDD_IN 10428/8093 VDD_CPU_GPU_CV 4287/2998 VDD_SOC 2245/1735
RAM 4842/7764MB (lfb 136x4MB) SWAP 79/32768MB (cached 10MB) CPU [52%@1420,47%@1420,47%@1420,48%@1420,50%@1420,41%@1420] EMC_FREQ 0% GR3D_FREQ 0% AO@43C GPU@44C PMIC@100C AUX@44C CPU@45C thermal@44.3C VDD_IN 10346/8102 VDD_CPU_GPU_CV 4328/3003 VDD_SOC 2204/1737
RAM 4832/7764MB (lfb 136x4MB) SWAP 79/32768MB (cached 10MB) CPU [52%@1420,43%@1420,48%@1420,43%@1420,47%@1420,40%@1420] EMC_FREQ 0% GR3D_FREQ 0% AO@42.5C GPU@44C PMIC@100C AUX@44C CPU@45C thermal@44.3C VDD_IN 10305/8111 VDD_CPU_GPU_CV 4328/3009 VDD_SOC 2204/1739
RAM 4839/7764MB (lfb 136x4MB) SWAP 79/32768MB (cached 10MB) CPU [52%@1420,44%@1420,43%@1420,44%@1420,40%@1420,43%@1420] EMC_FREQ 0% GR3D_FREQ 6% AO@43C GPU@44C PMIC@100C AUX@43.5C CPU@44.5C thermal@44.45C VDD_IN 10428/8120 VDD_CPU_GPU_CV 4328/3014 VDD_SOC 2245/1741
RAM 4830/7764MB (lfb 136x4MB) SWAP 80/32768MB (cached 10MB) CPU [58%@1420,52%@1420,47%@1420,48%@1420,47%@1420,50%@1420] EMC_FREQ 0% GR3D_FREQ 23% AO@42.5C GPU@44C PMIC@100C AUX@43.5C CPU@45C thermal@44.45C VDD_IN 10755/8131 VDD_CPU_GPU_CV 4614/3020 VDD_SOC 2286/1743
RAM 4836/7764MB (lfb 136x4MB) SWAP 80/32768MB (cached 10MB) CPU [52%@1420,41%@1420,43%@1420,40%@1420,41%@1420,38%@1420] EMC_FREQ 0% GR3D_FREQ 0% AO@42.5C GPU@44C PMIC@100C AUX@43.5C CPU@45C thermal@44.15C VDD_IN 10142/8138 VDD_CPU_GPU_CV 4124/3024 VDD_SOC 2245/1745
RAM 4826/7764MB (lfb 136x4MB) SWAP 80/32768MB (cached 10MB) CPU [55%@1420,50%@1420,50%@1420,48%@1420,48%@1420,50%@1420] EMC_FREQ 0% GR3D_FREQ 64% AO@42.5C GPU@44C PMIC@100C AUX@43.5C CPU@45C thermal@44.1C VDD_IN 10714/8149 VDD_CPU_GPU_CV 4614/3031 VDD_SOC 2286/1747
RAM 4833/7764MB (lfb 136x4MB) SWAP 80/32768MB (cached 10MB) CPU [47%@1420,43%@1420,47%@1420,45%@1420,47%@1420,42%@1420] EMC_FREQ 0% GR3D_FREQ 87% AO@42.5C GPU@44C PMIC@100C AUX@43.5C CPU@44.5C thermal@43.95C VDD_IN 10796/8159 VDD_CPU_GPU_CV 4573/3037 VDD_SOC 2327/1749
RAM 4829/7764MB (lfb 136x4MB) SWAP 80/32768MB (cached 10MB) CPU [55%@1420,45%@1420,46%@1420,56%@1420,52%@1420,52%@1420] EMC_FREQ 0% GR3D_FREQ 66% AO@42.5C GPU@44.5C PMIC@100C AUX@44C CPU@45C thermal@44.25C VDD_IN 10796/8169 VDD_CPU_GPU_CV 4695/3043 VDD_SOC 2245/1751

you can seach with green image key in forum for more detail

Is this already be fixed in v5.0.1? Last time i tested my code on v5.0.1 my code didn’t work well so i maintain using the v5.0.0.

newer version 5.0.1

1 Like

Thank you! I would like to migrate to v5.0.1 and have a try

1 Like

I migrated my code from v5.0.0 to v5.0.1 , it shows the following errors.

** ERROR: <main:1815>: Failed to set pipeline to PAUSED
Quitting
ERROR from sink_sub_bin_sink1: Could not initialize supporting library.
Debug info: /dvs/git/dirty/git-master_linux/deepstream/sdk/src/gst-plugins/gst-nvmsgbroker/gstnvmsgbroker.c(359): legacy_gst_nvmsgbroker_start (): /GstPipeline:pipeline/GstBin:sink_sub_bin1/GstNvMsgBroker:sink_sub_bin_sink1:
unable to open shared library
ERROR from sink_sub_bin_sink1: GStreamer error: state change failed and some element failed to post a proper error message with the reason for the failure.
Debug info: gstbasesink.c(5265): gst_base_sink_change_state (): /GstPipeline:pipeline/GstBin:sink_sub_bin1/GstNvMsgBroker:sink_sub_bin_sink1:
Failed to start
App run failed

Suppose my amqp are correct when using v5.0.0.

-rwxrwxrwx 1 root root 31K  2月  1 21:36 /opt/nvidia/deepstream/deepstream-5.0/lib/libnvds_amqp_proto.so

Any idea~?

1 Like

are you install lib mentions in readme file in test5 folder

Yes i do, if not i think even my v5.0.0 code should not work …
I use the AMQP broker for my apps.

1 Like

can you share config file

I figure out the problem! It seems like the [message-converter] enable=1 i changed it to enable=0 then the broker erros gone. I tested with the following config file.
The tiled-display with height 1920 and width 1080 still cropped the image as green colored with the same config i used on 5.0.0 Even I used the v5.0.1.

[application]
enable-perf-measurement=0
perf-measurement-interval-sec=5
#gie-kitti-output-dir=streamscl

[tiled-display]
enable=1
rows=1
columns=1
width=3840
height=2160
#width=1920
#height=1080
#width=1280
#height=720
gpu-id=0
nvbuf-memory-type=0

[source0]
enable=1
#Type - 1=CameraV4L2 2=URI 3=MultiURI 4=RTSP
type=2
uri=rtsp://admin:12345@192.168.1.120:554/live/main
num-sources=1
gpu-id=0
nvbuf-memory-type=0
# smart record specific fields, valid only for source type=4
smart-record=0
# 0 = mp4, 1 = mkv
smart-rec-container=0
smart-rec-file-prefix=sr_record
smart-rec-dir-path=./record_dir
# video cache size in seconds
smart-rec-video-cache=5
# default duration of recording in seconds.
#smart-rec-default-duration
# duration of recording in seconds.
# this will override default value.
smart-rec-duration=10
# seconds before the current time to start recording.
smart-rec-start-time=3
# value in seconds to dump video stream.
#smart-rec-interval

[sink0]
enable=0
#Type - 1=FakeSink 2=EglSink 3=File
type=2
sync=0
source-id=0
gpu-id=0
nvbuf-memory-type=0

[sink1]
enable=1
#Type - 1=FakeSink 2=EglSink 3=File 4=UDPSink 5=nvoverlaysink 6=MsgConvBroker
type=6
msg-conv-config=dstest4_msgconv_config.txt
#(0): PAYLOAD_DEEPSTREAM - Deepstream schema payload
#(1): PAYLOAD_DEEPSTREAM_MINIMAL - Deepstream schema payload minimal
#(256): PAYLOAD_RESERVED - Reserved type
#(257): PAYLOAD_CUSTOM   - Custom schema payload
msg-conv-payload-type=0
#msg-broker-proto-lib=/opt/nvidia/deepstream/deepstream-5.0/lib/libnvds_kafka_proto.so
msg-broker-proto-lib=/opt/nvidia/deepstream/deepstream-5.0/lib/libnvds_amqp_proto.so
#Provide your msg-broker-conn-str here
msg-broker-conn-str=127.0.0.1;5672;guest
topic=deepstream
#msg-broker-conn-str=127.0.0.1;9092;test
#topic=test
#Optional:
msg-broker-config=../cfg_amqp.txt
sync=0
#new-api=0
#(0) Use message adapter library api's
#(1) Use new msgbroker library api's


[sink2]
enable=1
#Type - 1=FakeSink 2=EglSink 3=File 4=UDPSink 5=nvoverlaysink 6=MsgConvBroker
##Old_Type - 1=FakeSink 2=EglSink 3=File 4=RTSPStreaming 5=Overlay
type=4
#1=h264 2=h265
codec=2
#encoder type 0=Hardware 1=Software
enc-type=0
sync=0
#bitrate=16000000
bitrate=4000000
#bitrate=8000000
#H264 Profile - 0=Baseline 2=Main 4=High
#H265 Profile - 0=Main 1=Main10
profile=0
# set below properties in case of RTSPStreaming
rtsp-port=8555
udp-port=5401
# RTSP Strem ID PASSWORD
#rtsp-id=admin
#rtsp-password=12345
# Smart Record Modules
smart-record=1
# 0 = mp4, 1 = mkv
smart-rec-container=0
smart-rec-file-prefix=sr_record_bbox
smart-rec-dir-path=./record_dir_bbox
# video cache size in seconds
smart-rec-video-cache=10
# default duration of recording in seconds.
#smart-rec-default-duration
# duration of recording in seconds.
# this will override default value.
smart-rec-duration=10
# seconds before the current time to start recording.
smart-rec-start-time=3
# value in seconds to dump video stream.
#smart-rec-interval

# sink type = 6 by default creates msg converter + broker.
# To use multiple brokers use this group for converter and use
# sink type = 6 with disable-msgconv = 1
[message-converter]
enable=0
msg-conv-config=dstest4_msgconv_config.txt
#(0): PAYLOAD_DEEPSTREAM - Deepstream schema payload
#(1): PAYLOAD_DEEPSTREAM_MINIMAL - Deepstream schema payload minimal
#(256): PAYLOAD_RESERVED - Reserved type
#(257): PAYLOAD_CUSTOM   - Custom schema payload
msg-conv-payload-type=0
# Name of library having custom implementation.
#msg-conv-msg2p-lib=<val>
# Id of component in case only selected message to parse.
#msg-conv-comp-id=<val>

# Configure this group to enable cloud message consumer.
[message-consumer0]
enable=0
proto-lib=/opt/nvidia/deepstream/deepstream-5.0/lib/libnvds_kafka_proto.so
#proto-lib=/opt/nvidia/deepstream/deepstream-5.0/lib/libnvds_amqp_proto.so
conn-str=127.0.0.1;9092;
#conn-str=localhost;
#config-file=../cfg_amqp_record.txt
subscribe-topic-list=record;
#conn-str=<host>;<port>
#config-file=<broker config file e.g. cfg_kafka.txt>
#subscribe-topic-list=<topic1>;<topic2>;<topicN>

[osd]
enable=1
gpu-id=0
border-width=1
text-size=15
text-color=1;1;1;1;
text-bg-color=0.3;0.3;0.3;1
font=Arial
show-clock=0
clock-x-offset=800
clock-y-offset=820
clock-text-size=12
clock-color=1;0;0;0
nvbuf-memory-type=0

[streammux]
gpu-id=0
##Boolean property to inform muxer that sources are live
live-source=1
batch-size=1
##time out in usec, to wait after the first buffer is available
##to push the batch even if the complete batch is not formed
batched-push-timeout=400
## Set muxer output width and height
width=1920
height=1080
##Enable to maintain aspect ratio wrt source, and allow black borders, works
##along with width, height properties
enable-padding=0
nvbuf-memory-type=0
## If set to TRUE, system timestamp will be attached as ntp timestamp
## If set to FALSE, ntp timestamp from rtspsrc, if available, will be attached
#attach-sys-ts-as-ntp=1

# config-file property is mandatory for any gie section.
# Other properties are optional and if set will override the properties set in
# the infer config file.
[primary-gie]
enable=1
gpu-id=0
#Required to display the PGIE labels, should be added even when using config-file
#property
#batch-size=1
#Required by the app for OSD, not a plugin property
bbox-border-color0=1;0;0;1
bbox-border-color1=0;1;1;1
bbox-border-color2=0;0;1;1
bbox-border-color3=0;1;0;1
interval=0
#Required by the app for SGIE, when used along with config-file property
gie-unique-id=1
nvbuf-memory-type=0
model-engine-file=#modelfilename
labelfile-path=#labels.txt
config-file=#config_infer.txt
#infer-raw-output-dir=../../../../../samples/primary_detector_raw_output/
enc-objects-images=1

[tracker]
enable=1
tracker-width=600
tracker-height=288
ll-lib-file=/opt/nvidia/deepstream/deepstream-5.0/lib/libnvds_mot_klt.so
#ll-config-file required for DCF/IOU only
#ll-config-file=tracker_config.yml
#ll-config-file=iou_config.txt
gpu-id=0
#enable-batch-process applicable to DCF only
enable-batch-process=1

[tests]
file-loop=1

And I tried to changed the tiled display size to width=3840 and height=2160, it got invalid pipeline params instead.

Errors

invalid pipeline params
invalid pipeline params
invalid pipeline params
invalid pipeline params
invalid pipeline params
invalid pipeline params
invalid pipeline params
invalid pipeline params
invalid pipeline params
invalid pipeline params
invalid pipeline params
invalid pipeline params

Does any documentation shows about how should we set the streammux and tiled display size with the camera resolution and network input dimension?

hmm… It seems like I changed the streammux to different size, it still shows the invalid pipeline params in deepstream v5.0.1…Maybe this is the problem of streammux plugin resizing itself? No idea how to configure the correct streammux setting with respective neural network size.

Can you change source type to 4 since you are using rtsp source?

@Fiona Thank you for reply! I have tried to set to type 4. however it still cropped in green colored. I tried with the same config with the following tiled display and streammux with 608x608 network input it cropped a 928x1012 green colored image in v5.0.1 however with this specific config with 5.0.0 i am able to cropped the image.

[source0]
enable=1
#Type - 1=CameraV4L2 2=URI 3=MultiURI 4=RTSP
type=4
uri=rtsp://admin:12345@192.168.1.120:554/live/main
num-sources=1
gpu-id=0
nvbuf-memory-type=0
# smart record specific fields, valid only for source type=4
smart-record=0
# 0 = mp4, 1 = mkv
smart-rec-container=0
smart-rec-file-prefix=sr_record
smart-rec-dir-path=./record_dir
# video cache size in seconds
smart-rec-video-cache=5
# default duration of recording in seconds.
#smart-rec-default-duration
# duration of recording in seconds.
# this will override default value.
smart-rec-duration=10
# seconds before the current time to start recording.
smart-rec-start-time=3
# value in seconds to dump video stream.
#smart-rec-interval

[streammux]
gpu-id=0
##Boolean property to inform muxer that sources are live
live-source=1
batch-size=1
##time out in usec, to wait after the first buffer is available
##to push the batch even if the complete batch is not formed
batched-push-timeout=400
## Set muxer output width and height
#width=1280
#height=720
width=1920
height=1080
##Enable to maintain aspect ratio wrt source, and allow black borders, works
##along with width, height properties
enable-padding=0
nvbuf-memory-type=0
## If set to TRUE, system timestamp will be attached as ntp timestamp
## If set to FALSE, ntp timestamp from rtspsrc, if available, will be attached
#attach-sys-ts-as-ntp=1

Summarize

Deepstream v5.0.0
[tiled-display] with width=3840,height=2160

// streammux experiement
3840x2160 Green
1920x1080 OK
1280x720   OK 

Deepstream v5.0.1
[tiled-display] with width=3840,height=2160

// streammux experiement
3840x2160 Green
1920x1080 Green
1280x720   Green

It seems like the v5.0.1 worse than my current main 5.0.0 version

Seems it is the same issue with Green Images are saved in deepstream-5.0 indeepstream-image-meta-test - Intelligent Video Analytics / DeepStream SDK - NVIDIA Developer Forums

1 Like

However, the bug still exists in deepstream release 5.1 version…

2 Likes