How to use Deepstream with aravissrc (as a gstreamer command) ?

Hi everyone,

I am using a camera that does not support v4l2src. in order to get the camera working on my Jetson Nano, I installed aravissrc. now, I can successfully run my camera with gstreamer and get the video stream by running the following command:

gst-launch-1.0 -e --gst-plugin-path=/usr/local/lib/ aravissrc camera-name="U3V-00D24866386" !  nveglglessink

running the above command would give me the following warning in the terminal:

Setting pipeline to PAUSED ...

Using winsys: x11 
Pipeline is live and does not need PREROLL ...
Got context from element 'eglglessink0': gst.egl.EGLDisplay=context, display=(GstEGLDisplay)NULL;
Setting pipeline to PLAYING ...
New clock: GstSystemClock

(gst-launch-1.0:21433): GLib-GObject-WARNING **: 11:05:30.920: g_object_set_is_valid_property: object class 'ArvUvStream' has no property named 'packet-resend'

then a window appears, and it successfully shows the video stream from my camera.

now, I would like to change the above command a little bit to connect it to my yolov2-tiny classifier. to do so, I opened up a terminal in the directory where my yolo is installed (i.e. /opt/nvidia/deepstream/deepstream-4.0/sources/objectDetector_Yolo), and I run the following command:

gst-launch-1.0 -e --gst-plugin-path=/usr/local/lib/ aravissrc camera-name="U3V-00D24866386"  !  nvinfer config-file-path= /opt/nvidia/deepstream/deepstream-4.0/sources/yololight_car_test_jelo_panjereh_plate_both_backup/config_infer_primary_yoloV2_tiny.txt batch-size=1 unique-id=1 ! nvinfer config-file-path= /opt/nvidia/deepstream/deepstream-4.0/sources/yololight_car_test_jelo_panjereh_plate_both_backup/config_infer_primary_yoloV2_tiny.txt batch-size=16 unique-id=2 infer-on-gie-id=1 ! nvmultistreamtiler rows=1 columns=1 width=1280 height=720 ! nvvideoconvert ! nvdsosd ! nvegltransform ! nveglglessink

which successfully creates the tensorrt engine, but at the end pops up an error as follows:

$  gst-launch-1.0 -e --gst-plugin-path=/usr/local/lib/ aravissrc camera-name="U3V-00D24866386"  !  nvinfer config-file-path= /opt/nvidia/deepstream/deepstream-4.0/sources/yololight_car_test_jelo_panjereh_plate_both_backup/config_infer_primary_yoloV2_tiny.txt batch-size=1 unique-id=1 ! nvinfer config-file-path= /opt/nvidia/deepstream/deepstream-4.0/sources/yololight_car_test_jelo_panjereh_plate_both_backup/config_infer_primary_yoloV2_tiny.txt batch-size=16 unique-id=2 infer-on-gie-id=1 ! nvmultistreamtiler rows=1 columns=1 width=1280 height=720 ! nvvideoconvert ! nvdsosd ! nvegltransform ! nveglglessink
Setting pipeline to PAUSED ...

Using winsys: x11 
Creating LL OSD context new
0:00:06.117645315 21802   0x556ba15e10 WARN                 nvinfer gstnvinfer.cpp:515:gst_nvinfer_logger:<nvinfer1> NvDsInferContext[UID 2]:checkEngineParams(): Requested Max Batch Size is less than engine batch size
0:00:06.118706839 21802   0x556ba15e10 INFO                 nvinfer gstnvinfer.cpp:519:gst_nvinfer_logger:<nvinfer1> NvDsInferContext[UID 2]:initialize(): Trying to create engine from model files
Loading pre-trained weights...
Loading complete!
Total Number of weights read : 549187
      layer               inp_size            out_size       weightPtr
(1)   conv-bn-leaky     3 x 224 x 224      16 x 224 x 224    448   
(2)   maxpool          16 x 224 x 224      16 x 112 x 112    448   
(3)   conv-bn-leaky    16 x 112 x 112      32 x 112 x 112    5088  
(4)   maxpool          32 x 112 x 112      32 x  56 x  56    5088  
(5)   conv-bn-leaky    32 x  56 x  56      64 x  56 x  56    23584 
(6)   maxpool          64 x  56 x  56      64 x  28 x  28    23584 
(7)   conv-bn-leaky    64 x  28 x  28     128 x  28 x  28    97440 
(8)   maxpool         128 x  28 x  28     128 x  14 x  14    97440 
(9)   conv-bn-leaky   128 x  14 x  14     128 x  14 x  14    245024
(10)  maxpool         128 x  14 x  14     128 x   7 x   7    245024
(11)  conv-bn-leaky   128 x   7 x   7     256 x   7 x   7    540192
(12)  conv-linear     256 x   7 x   7      35 x   7 x   7    549187
(13)  region           35 x   7 x   7      35 x   7 x   7    549187
Anchors are being converted to network input resolution i.e. Anchors x 32 (stride)
Output blob names :
region_13
Total number of layers: 21
Total number of layers on DLA: 0
Building the TensorRT Engine...
Building complete!
0:01:28.498629092 21802   0x556ba15e10 INFO                 nvinfer gstnvinfer.cpp:519:gst_nvinfer_logger:<nvinfer1> NvDsInferContext[UID 2]:generateTRTModel(): Storing the serialized cuda engine to file at /opt/nvidia/deepstream/deepstream-4.0/sources/yololight_car_test_jelo_panjereh_plate_both_backup/model_b16_fp16.engine
Pipeline is live and does not need PREROLL ...
Got context from element 'eglglessink0': gst.egl.EGLDisplay=context, display=(GstEGLDisplay)NULL;
ERROR: from element /GstPipeline:pipeline0/GstAravis:aravis0: Internal data stream error.
Additional debug info:
gstbasesrc.c(3055): gst_base_src_loop (): /GstPipeline:pipeline0/GstAravis:aravis0:
streaming stopped, reason not-negotiated (-4)
ERROR: pipeline doesn't want to preroll.
Setting pipeline to PAUSED ...
Setting pipeline to READY ...
Setting pipeline to NULL ...
Freeing pipeline ...

my question precisely is “How can I successfully run my yolov2-tiny classifier with using aravissrc?”

Duplicate of https://devtalk.nvidia.com/default/topic/1068213/