Nvarguscamerasrc for deepstream 5

• Jetson
• DeepStream Version 5 release
• JetPack Version 4.4 GA
• TensorRT Version 7.1.3.0

How change input from mp4 file to nvarguscamerasrc ?

I have this correct pipeline:

gst-launch-1.0 filesrc location=./samples/streams/sample_1080p_h264.mp4
! qtdemux ! h264parse ! nvv4l2decoder ! m.sink_0 nvstreammux name=m batch-size=1 width=1920 height=1080
! nvinfer config-file-path=./samples/configs/deepstream-app/config_infer_primary.txt batch-size=1 unique-id=1
! nvtracker ll-lib-file=/opt/nvidia/deepstream/deepstream-5.0/lib/libnvds_mot_klt.so
! nvinfer config-file-path=./samples/configs/deepstream-app/config_infer_secondary_carcolor.txt batch-size=16 unique-id=2 infer-on-gie-id=1 infer-on-class-ids=0
! nvmultistreamtiler rows=1 columns=1 width=1280 height=720
! nvvideoconvert ! nvdsosd ! nvegltransform
! nveglglessink

changing to this, give me :

gst-launch-1.0 nvarguscamerasrc wbmode=5
! ‘video/x-raw(memory:NVMM),width=(int)1920, height=(int)1080, framerate=30/1, format=(string)NV12’
! nvvidconv flip-method=2
! nvv4l2h264enc maxperf-enable=1 bitrate=8000000
! h264parse ! qtmux ! m.sink_0 nvstreammux name=m batch-size=1 width=1920 height=1080
! nvinfer config-file-path=./samples/configs/deepstream-app/config_infer_primary.txt batch-size=1 unique-id=1
! nvtracker ll-lib-file=/opt/nvidia/deepstream/deepstream-5.0/lib/libnvds_mot_klt.so
! nvinfer config-file-path=./samples/configs/deepstream-app/config_infer_secondary_carcolor.txt batch-size=16 unique-id=2 infer-on-gie-id=1 infer-on-class-ids=0
! nvmultistreamtiler rows=1 columns=1 width=1280 height=720
! nvvideoconvert ! nvdsosd ! nvegltransform
! nveglglessink

WARNING: erroneous pipeline: could not link qtmux0 to m

Do you know what is “nvv4l2h264enc”, “h264parse” and “qtmux” mean? It means you encode the NV12 format data into a mp4 file with h264 compressed video data.
https://docs.nvidia.com/metropolis/deepstream/dev-guide/index.html#page/DeepStream%20Plugins%20Development%20Guide/deepstream_plugin_details.html#wwpID0E0RQ0HA
https://gstreamer.freedesktop.org/data/doc/gstreamer/head/gst-plugins-bad/html/gst-plugins-bad-plugins-h264parse.html
https://gstreamer.freedesktop.org/data/doc/gstreamer/head/gst-plugins-good/html/gst-plugins-good-plugins-qtmux.html

nvinfer can not handle such data.

Please make sure you know the input and output of every plugin you are using.
It is better to study GStreamer first before start to use deepstream