Using nvvideoconvert property for a specific video source

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

I have two video sources one is 360 camera and another one is a 180 fisheye camera.
I like to apply nvvideoconvert’s src-crop property to 360 camera only.
What I did was

/* create nv dewarper element */
    nvvideoconvert = gst_element_factory_make ("nvvideoconvert", NULL);
    g_object_set (G_OBJECT (nvvideoconvert), "src-crop", "0:0:500:500", NULL);
    if (!nvvideoconvert) {
      g_printerr ("Failed to create nvvideoconvert element. Exiting.\n");
      return -1;

It did cropping. Can I choose the source to crop?

I am checking.

what is your media pipeline? you can use streamdemux to output one source, then do crop, please refer to Gst-nvstreamdemux — DeepStream 6.1 Release documentation and deepstream sample deepstream-app.

No can’t because my video source is as shown in the below picture.
Left is 360 image and right is one of fisheyes images.
I need to crop 360 image at the source before inference.
Crop 360 first, then dewrap and infer.
I am using dewrap sample.
So I need to crop at source.

please refer to deepstream sample deepstream-app, and set src-crop property to nvvideoconvert, then you can crop 360 image from your video.

All the parameters for configuration file given for deepstream-app are here.
But don’t have src-crop property.
How can I set the parameter in config file?

there is no configuration for nvvideoconvert 's src-crop, you can modify the code.

I did something like this in code.

g_object_set (G_OBJECT (nvvideoconvert), "src-crop", "0:0:500:500", NULL);

How can I select the source?
I have two sources, I just like to crop one source only.

from your post, there is only one video, the left part is 360 images, the right part is fisheyes image, after decoding video, using “src-crop”, “0:0:500:500” will crop the 360 images.
please debug like this, gst-launch-1.0 filesrc location=blueCar.jpeg ! jpegdec ! ‘video/x-raw,format=I420’ ! nvvideoconvert src-crop=“0:0:500:500” ! jpegenc ! filesink location=7.jpeg

This command gst-launch-1.0 filesrc location=blueCar.jpeg ! jpegdec ! ‘video/x-raw,format=I420’ ! nvvideoconvert src-crop=“0:0:500:500” ! jpegenc ! filesink location=7.jpeg, how can I add inference in the command? Any sample?

please refer to gst-launch-1.0 filesrc location=/home/rec/7.jpeg ! jpegdec ! videoconvert ! ‘video/x-raw,format=I420’ ! nvvideoconvert nvbuf-memory-type=3 ! ‘video/x-raw(memory:NVMM),format=NV12’ ! mux.sink_0 nvstreammux name=mux batch-size=1 width=1920 height=1080 nvbuf-memory-type=3 ! nvinfer config-file-path=./ds_image_meta_pgie_config.txt ! nvvideoconvert ! ‘video/x-raw(memory:NVMM),format=RGBA’ ! nvdsosd ! nvvideoconvert ! ‘video/x-raw,format=I420’ ! jpegenc ! filesink location=7.jpeg

alright thank you