Multiple cameras use nvdewarper

Theese is my Origin Pipeline,

gst-launch-1.0 \
    nvstreammux width=1920 height=1080 batch-size=4 live-source=1 name=mux ! \
    nvinfer config-file-path=configs/config_infer_primary_yoloV8.txt ! \
    nvtracker tracker-width=640 tracker-height=480 gpu-id=0 ll-config-file=/opt/nvidia/deepstream/deepstream/samples/configs/deepstream-app/config_tracker_NvDCF_perf.yml ll-lib-file=/opt/nvidia/deepstream/deepstream/lib/libnvds_nvmultiobjecttracker.so ! \
    nvmultistreamtiler rows=2 columns=2 width=1920 height=1080 ! \
    nvdsosd ! nvvidconv ! nv3dsink sync=false \
    v4l2src device=/dev/video0 ! tee name=t0 \
        t0. ! queue max-size-buffers=800 leaky=downstream ! nvvidconv ! "video/x-raw(memory:NVMM),width=640,height=480" ! mux.sink_0 \
        t0. ! queue max-size-buffers=800 leaky=downstream ! nvvidconv !  videorate max-rate=5 ! nvv4l2h264enc ! h264parse ! splitmuxsink location="videos/camera_0/output_%010d.mp4" max-size-time=10000000000 sync=false \
    v4l2src device=/dev/video1 ! tee name=t1 \
        t1. ! queue max-size-buffers=800 leaky=downstream ! nvvidconv ! "video/x-raw(memory:NVMM),width=640,height=480" ! mux.sink_1 \
        t1. ! queue max-size-buffers=800 leaky=downstream ! nvvidconv ! videorate max-rate=5 ! nvv4l2h264enc ! h264parse ! splitmuxsink location="videos/camera_1/output_%010d.mp4" max-size-time=10000000000 sync=false \
    v4l2src device=/dev/video2 ! tee name=t2 \
        t2. ! queue max-size-buffers=800 leaky=downstream ! nvvidconv ! "video/x-raw(memory:NVMM),width=640,height=480" ! mux.sink_2 \
        t2. ! queue max-size-buffers=800 leaky=downstream ! nvvidconv ! videorate max-rate=5 ! nvv4l2h264enc ! h264parse ! splitmuxsink location="videos/camera_2/output_%010d.mp4" max-size-time=10000000000 sync=false \
    v4l2src device=/dev/video3 ! tee name=t3 \
        t3. ! queue max-size-buffers=800 leaky=downstream ! nvvidconv ! "video/x-raw(memory:NVMM),width=640,height=480" ! mux.sink_3 \
        t3. ! queue max-size-buffers=800 leaky=downstream ! nvvidconv ! videorate max-rate=5 ! nvv4l2h264enc ! h264parse ! splitmuxsink location="videos/camera_3/output_%010d.mp4" max-size-time=10000000000 sync=false

> Camera Info(1920*1280 30FPS):

config_dewarper.txt:
config_dewarper.txt (2.2 KB)

I want to add link nvdewarper only on Display,
How can I Modify?
Thanks!

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)

Software part of jetson-stats 4.2.12 - (c) 2024, Raffaello Bonghi
Model: Jetson AGX Orin - Jetpack 5.1.1 [L4T 35.3.1]
NV Power Mode[0]: MAXN
Serial Number: [XXX Show with: jetson_release -s XXX]
Hardware:
 - Module: Check with sudo
Platform:
 - Distribution: Ubuntu 20.04 focal
 - Release: 5.10.104-tegra
jtop:
 - Version: 4.2.12
 - Service: Active
Libraries:
 - CUDA: 11.4.315
 - cuDNN: 8.6.0.166
 - TensorRT: 8.5.2.2
 - VPI: 2.2.7
 - Vulkan: 1.3.204
 - OpenCV: 4.10.0 - with CUDA: YES

Do you mean only use nvdewarper for inferencing and display? How many surfaces will your dewarpper algorithm output?

This First one is 4 in 1 and inferer on Display Function ,I want add nvdewarper

Then every single camera be save origin frame to mp4 file,No use 4 in 1 and infer.

Finally every single camera be save nvdewarper frame to mp4 file,No use 4 in 1 and infer.

I’m talking about the dewarper algorithm Gst-nvdewarper — DeepStream documentation but not the pipeline. You can dewarp the camera image into several surfaces Gst-nvdewarper — DeepStream documentation. How many surfaces will you configure?

I have four cameras,
I want configure one surface with one camera.

  1. Please use “nvvideoconvert” instead of “nvvidconv” for you are constructing DeepStream pipeline. DeepStream SDK FAQ - Intelligent Video Analytics / DeepStream SDK - NVIDIA Developer Forums
  2. Take one camera as the example:
v4l2src device=/dev/video0 ! tee name=t0 \
        t0. ! queue max-size-buffers=800 leaky=downstream ! nvvideoconvert ! "video/x-raw(memory:NVMM),width=1920,height=1080,format=RGBA" ! nvdewarper config-file=your_dewarper_config.txt source-id=0  ! nvvideoconvert mux.sink_0 \
        t0. ! queue max-size-buffers=800 leaky=downstream ! nvvideoconvert !  videorate max-rate=5 ! nvv4l2h264enc ! h264parse ! splitmuxsink location="videos/camera_0/output_%010d.mp4" max-size-time=10000000000 sync=false

My Pipeline:

gst-launch-1.0 \
    nvstreammux width=1920 height=1080 batch-size=4 live-source=1 name=mux ! \
    nvinfer config-file-path=config_infer_primary_yoloV8.txt ! \
    nvtracker tracker-width=640 tracker-height=480 gpu-id=0 ll-config-file=/opt/nvidia/deepstream/deepstream/samples/configs/deepstream-app/config_tracker_NvDCF_perf.yml ll-lib-file=/opt/nvidia/deepstream/deepstream/lib/libnvds_nvmultiobjecttracker.so ! \
    nvmultistreamtiler rows=2 columns=2 width=1920 height=1080 ! \
    nvdsosd ! nvvideoconvert ! nv3dsink sync=false  \
    v4l2src device=/dev/video0 ! tee name=t0 \
        t0. ! queue max-size-buffers=200 leaky=downstream ! nvvideoconvert ! \
        nvdewarper config-file=/home/nvidia/workspaces/yolov8-for-jetson/DeepStream-gi/configs/config_dewarper.txt source-id=6 !  mux.sink_0 \
        t0. ! queue max-size-buffers=200 leaky=downstream ! nvvideoconvert !  videorate max-rate=5 ! nvv4l2h264enc ! h264parse ! splitmuxsink location="videos/camera_0/output_%010d.mp4" max-size-time=10000000000  \
    v4l2src device=/dev/video1 ! tee name=t1 \
        t1. ! queue max-size-buffers=200 leaky=downstream ! nvvideoconvert ! \
        nvdewarper config-file=/home/nvidia/workspaces/yolov8-for-jetson/DeepStream-gi/configs/config_dewarper.txt source-id=6 ! mux.sink_1 \
        t1. ! queue max-size-buffers=200 leaky=downstream ! nvvideoconvert ! videorate max-rate=5 ! nvv4l2h264enc ! h264parse ! splitmuxsink location="videos/camera_1/output_%010d.mp4" max-size-time=10000000000  \
    v4l2src device=/dev/video2 ! tee name=t2 \
        t2. ! queue max-size-buffers=200 leaky=downstream ! nvvideoconvert ! \
        nvdewarper config-file=/home/nvidia/workspaces/yolov8-for-jetson/DeepStream-gi/configs/config_dewarper.txt source-id=6 ! mux.sink_2 \
        t2. ! queue max-size-buffers=200 leaky=downstream ! nvvideoconvert ! videorate max-rate=5 ! nvv4l2h264enc ! h264parse ! splitmuxsink location="videos/camera_2/output_%010d.mp4" max-size-time=10000000000  \
    v4l2src device=/dev/video3 ! tee name=t3 \
        t3. ! queue max-size-buffers=200 leaky=downstream ! nvvideoconvert ! \
        nvdewarper config-file=/home/nvidia/workspaces/yolov8-for-jetson/DeepStream-gi/configs/config_dewarper.txt source-id=6 ! mux.sink_3 \
        t3. ! queue max-size-buffers=200 leaky=downstream ! nvvideoconvert ! videorate max-rate=5 ! nvv4l2h264enc ! h264parse ! splitmuxsink location="videos/camera_3/output_%010d.mp4" max-size-time=10000000000

I try single run only display is work,
Same time add save mp4 file function is can not open pipeline.
Maybe have problem on save video file with Deepestream 7.1,
But don’t have this problem on Deepstream 6.2.
And I found can’t use sync=false on splitmuxsink with Deepstream 7.1.

How can I fix it?
Thanks!

What do you mean by this?

I do not meet any issue with your pipeline with our cameras and model.

I use python gi library run pipeline
Long time test is ok,
Suddenly can’t run anymore,
I try reboot my jetson,
But not work,
Can I Private Sent Code to Your E-mail?
Have theese error:

Opening in BLOCKING MODE 
0:00:00.193921312 19820     0x26288750 WARN                    v4l2 gstv4l2object.c:2398:gst_v4l2_object_add_interlace_mode:0x26256de0 Failed to determine interlace mode
0:00:00.193965376 19820     0x26288750 WARN                    v4l2 gstv4l2object.c:2398:gst_v4l2_object_add_interlace_mode:0x26256de0 Failed to determine interlace mode
0:00:00.193982176 19820     0x26288750 WARN                    v4l2 gstv4l2object.c:2398:gst_v4l2_object_add_interlace_mode:0x26256de0 Failed to determine interlace mode
0:00:00.193996384 19820     0x26288750 WARN                    v4l2 gstv4l2object.c:2398:gst_v4l2_object_add_interlace_mode:0x26256de0 Failed to determine interlace mode
0:00:00.194035104 19820     0x26288750 WARN                    v4l2 gstv4l2object.c:4512:gst_v4l2_object_probe_caps:<dewaper_record_encoder3:src> Failed to probe pixel aspect ratio with VIDIOC_CROPCAP: Unknown error -1
Opening in BLOCKING MODE 
0:00:00.210970848 19820     0x26288750 WARN                    v4l2 gstv4l2object.c:2398:gst_v4l2_object_add_interlace_mode:0x2624cad0 Failed to determine interlace mode
0:00:00.211007520 19820     0x26288750 WARN                    v4l2 gstv4l2object.c:2398:gst_v4l2_object_add_interlace_mode:0x2624cad0 Failed to determine interlace mode
0:00:00.211025056 19820     0x26288750 WARN                    v4l2 gstv4l2object.c:2398:gst_v4l2_object_add_interlace_mode:0x2624cad0 Failed to determine interlace mode
0:00:00.211039552 19820     0x26288750 WARN                    v4l2 gstv4l2object.c:2398:gst_v4l2_object_add_interlace_mode:0x2624cad0 Failed to determine interlace mode
0:00:00.211078368 19820     0x26288750 WARN                    v4l2 gstv4l2object.c:4512:gst_v4l2_object_probe_caps:<record_encoder3:src> Failed to probe pixel aspect ratio with VIDIOC_CROPCAP: Unknown error -1
Opening in BLOCKING MODE 
0:00:00.228096288 19820     0x26288750 WARN                    v4l2 gstv4l2object.c:2398:gst_v4l2_object_add_interlace_mode:0x26225720 Failed to determine interlace mode
0:00:00.228133120 19820     0x26288750 WARN                    v4l2 gstv4l2object.c:2398:gst_v4l2_object_add_interlace_mode:0x26225720 Failed to determine interlace mode
0:00:00.228152160 19820     0x26288750 WARN                    v4l2 gstv4l2object.c:2398:gst_v4l2_object_add_interlace_mode:0x26225720 Failed to determine interlace mode
0:00:00.228166880 19820     0x26288750 WARN                    v4l2 gstv4l2object.c:2398:gst_v4l2_object_add_interlace_mode:0x26225720 Failed to determine interlace mode
0:00:00.228204480 19820     0x26288750 WARN                    v4l2 gstv4l2object.c:4512:gst_v4l2_object_probe_caps:<dewaper_record_encoder2:src> Failed to probe pixel aspect ratio with VIDIOC_CROPCAP: Unknown error -1
Opening in BLOCKING MODE 
0:00:00.245250208 19820     0x26288750 WARN                    v4l2 gstv4l2object.c:2398:gst_v4l2_object_add_interlace_mode:0x2621b430 Failed to determine interlace mode
0:00:00.245285472 19820     0x26288750 WARN                    v4l2 gstv4l2object.c:2398:gst_v4l2_object_add_interlace_mode:0x2621b430 Failed to determine interlace mode
0:00:00.245302496 19820     0x26288750 WARN                    v4l2 gstv4l2object.c:2398:gst_v4l2_object_add_interlace_mode:0x2621b430 Failed to determine interlace mode
0:00:00.245316928 19820     0x26288750 WARN                    v4l2 gstv4l2object.c:2398:gst_v4l2_object_add_interlace_mode:0x2621b430 Failed to determine interlace mode
0:00:00.245352544 19820     0x26288750 WARN                    v4l2 gstv4l2object.c:4512:gst_v4l2_object_probe_caps:<record_encoder2:src> Failed to probe pixel aspect ratio with VIDIOC_CROPCAP: Unknown error -1
Opening in BLOCKING MODE 
0:00:00.261936032 19820     0x26288750 WARN                    v4l2 gstv4l2object.c:2398:gst_v4l2_object_add_interlace_mode:0x261f8f80 Failed to determine interlace mode
0:00:00.261970720 19820     0x26288750 WARN                    v4l2 gstv4l2object.c:2398:gst_v4l2_object_add_interlace_mode:0x261f8f80 Failed to determine interlace mode
0:00:00.261987776 19820     0x26288750 WARN                    v4l2 gstv4l2object.c:2398:gst_v4l2_object_add_interlace_mode:0x261f8f80 Failed to determine interlace mode
0:00:00.262002656 19820     0x26288750 WARN                    v4l2 gstv4l2object.c:2398:gst_v4l2_object_add_interlace_mode:0x261f8f80 Failed to determine interlace mode
0:00:00.262039808 19820     0x26288750 WARN                    v4l2 gstv4l2object.c:4512:gst_v4l2_object_probe_caps:<dewaper_record_encoder1:src> Failed to probe pixel aspect ratio with VIDIOC_CROPCAP: Unknown error -1
Opening in BLOCKING MODE 
0:00:00.278950080 19820     0x26288750 WARN                    v4l2 gstv4l2object.c:2398:gst_v4l2_object_add_interlace_mode:0x261eef20 Failed to determine interlace mode
0:00:00.278989056 19820     0x26288750 WARN                    v4l2 gstv4l2object.c:2398:gst_v4l2_object_add_interlace_mode:0x261eef20 Failed to determine interlace mode
0:00:00.279009216 19820     0x26288750 WARN                    v4l2 gstv4l2object.c:2398:gst_v4l2_object_add_interlace_mode:0x261eef20 Failed to determine interlace mode
0:00:00.279024672 19820     0x26288750 WARN                    v4l2 gstv4l2object.c:2398:gst_v4l2_object_add_interlace_mode:0x261eef20 Failed to determine interlace mode
0:00:00.279063200 19820     0x26288750 WARN                    v4l2 gstv4l2object.c:4512:gst_v4l2_object_probe_caps:<record_encoder1:src> Failed to probe pixel aspect ratio with VIDIOC_CROPCAP: Unknown error -1
Opening in BLOCKING MODE 
0:00:00.296321856 19820     0x26288750 WARN                    v4l2 gstv4l2object.c:2398:gst_v4l2_object_add_interlace_mode:0x261b98f0 Failed to determine interlace mode
0:00:00.296357760 19820     0x26288750 WARN                    v4l2 gstv4l2object.c:2398:gst_v4l2_object_add_interlace_mode:0x261b98f0 Failed to determine interlace mode
0:00:00.296374368 19820     0x26288750 WARN                    v4l2 gstv4l2object.c:2398:gst_v4l2_object_add_interlace_mode:0x261b98f0 Failed to determine interlace mode
0:00:00.296388544 19820     0x26288750 WARN                    v4l2 gstv4l2object.c:2398:gst_v4l2_object_add_interlace_mode:0x261b98f0 Failed to determine interlace mode
0:00:00.296424160 19820     0x26288750 WARN                    v4l2 gstv4l2object.c:4512:gst_v4l2_object_probe_caps:<dewaper_record_encoder0:src> Failed to probe pixel aspect ratio with VIDIOC_CROPCAP: Unknown error -1
Opening in BLOCKING MODE 
0:00:00.313373280 19820     0x26288750 WARN                    v4l2 gstv4l2object.c:2398:gst_v4l2_object_add_interlace_mode:0x261a5630 Failed to determine interlace mode
0:00:00.313409344 19820     0x26288750 WARN                    v4l2 gstv4l2object.c:2398:gst_v4l2_object_add_interlace_mode:0x261a5630 Failed to determine interlace mode
0:00:00.313426560 19820     0x26288750 WARN                    v4l2 gstv4l2object.c:2398:gst_v4l2_object_add_interlace_mode:0x261a5630 Failed to determine interlace mode
0:00:00.313444800 19820     0x26288750 WARN                    v4l2 gstv4l2object.c:2398:gst_v4l2_object_add_interlace_mode:0x261a5630 Failed to determine interlace mode
0:00:00.313481952 19820     0x26288750 WARN                    v4l2 gstv4l2object.c:4512:gst_v4l2_object_probe_caps:<record_encoder0:src> Failed to probe pixel aspect ratio with VIDIOC_CROPCAP: Unknown error -1
Opening in BLOCKING MODE
ArgusV4L2_Open failed: No such file or directory
Opening in BLOCKING MODE 
Opening in BLOCKING MODE
ArgusV4L2_Open failed: No such file or directory
Opening in BLOCKING MODE 
Opening in BLOCKING MODE
ArgusV4L2_Open failed: No such file or directory
Opening in BLOCKING MODE 
gstnvtracker: Loading low-level lib at /opt/nvidia/deepstream/deepstream/lib/libnvds_nvmultiobjecttracker.so
gstnvtracker: Batch processing is ON
gstnvtracker: Past frame output is OFF
[NvMultiObjectTracker] Initialized
WARNING: [TRT]: Using an engine plan file across different models of devices is not recommended and is likely to affect performance or even cause errors.
0:00:04.997334400 19820     0x26288750 INFO                 nvinfer gstnvinfer.cpp:680:gst_nvinfer_logger:<nvinfer> NvDsInferContext[UID 1]: Info from NvDsInferContextImpl::deserializeEngineAndBackend() <nvdsinfer_context_impl.cpp:1909> [UID = 1]: deserialized trt engine from :/home/ubuntu/workspaces/yolov8-for-jetson/DeepStream-gi/configs/model_b1_gpu0_fp32.engine
WARNING: [TRT]: The getMaxBatchSize() function should not be used with an engine built from a network created with NetworkDefinitionCreationFlag::kEXPLICIT_BATCH flag. This function will always return 1.
INFO: [Implicit Engine Info]: layers num: 2
0   INPUT  kFLOAT images          3x640x640       
1   OUTPUT kFLOAT output0         84x8400         

0:00:05.146052288 19820     0x26288750 INFO                 nvinfer gstnvinfer.cpp:680:gst_nvinfer_logger:<nvinfer> NvDsInferContext[UID 1]: Info from NvDsInferContextImpl::generateBackendContext() <nvdsinfer_context_impl.cpp:2012> [UID = 1]: Use deserialized engine model: /home/ubuntu/workspaces/yolov8-for-jetson/DeepStream-gi/configs/model_b1_gpu0_fp32.engine
0:00:05.153216672 19820     0x26288750 INFO                 nvinfer gstnvinfer_impl.cpp:328:notifyLoadModelStatus:<nvinfer> [UID 1]: Load new model:configs/config_infer_primary_yoloV8.txt sucessfully
NvMMLiteOpen : Block : BlockType = 4 
===== NVMEDIA: NVENC =====
NvMMLiteOpen : Block : BlockType = 4 
NvMMLiteOpen : Block : BlockType = 4 
===== NVMEDIA: NVENC =====
NvMMLiteOpen : Block : BlockType = 4 
===== NVMEDIA: NVENC =====
NvMMLiteOpen : Block : BlockType = 4 
===== NVMEDIA: NVENC =====
===== NVMEDIA: NVENC =====
NvMMLiteOpen : Block : BlockType = 4 
===== NVMEDIA: NVENC =====
NvMMLiteOpen : Block : BlockType = 4 
===== NVMEDIA: NVENC =====
NvMMLiteBlockCreate : Block : BlockType = 4 
NvMMLiteBlockCreate : Block : BlockType = 4 
NvMMLiteBlockCreate : Block : BlockType = 4 
NvMMLiteBlockCreate : Block : BlockType = 4 
NvMMLiteBlockCreate : Block : BlockType = 4 
NvMMLiteBlockCreate : Block : BlockType = 4 
NvMMLiteOpen : Block : BlockType = 4 
NvMMLiteBlockCreate : Block : BlockType = 4 
===== NVMEDIA: NVENC =====
NvMMLiteBlockCreate : Block : BlockType = 4 
0:00:05.189832768 19820     0x26342de0 WARN          v4l2bufferpool gstv4l2bufferpool.c:1114:gst_v4l2_buffer_pool_start:<dewaper_record_encoder1:pool:src> Uncertain or not enough buffers, enabling copy threshold
0:00:05.189832832 19820     0x26342ea0 WARN          v4l2bufferpool gstv4l2bufferpool.c:1114:gst_v4l2_buffer_pool_start:<dewaper_record_encoder0:pool:src> Uncertain or not enough buffers, enabling copy threshold
0:00:05.189859488 19820     0x26342d80 WARN          v4l2bufferpool gstv4l2bufferpool.c:1114:gst_v4l2_buffer_pool_start:<record_encoder2:pool:src> Uncertain or not enough buffers, enabling copy threshold
0:00:05.189929248 19820     0x26342cc0 WARN          v4l2bufferpool gstv4l2bufferpool.c:1114:gst_v4l2_buffer_pool_start:<record_encoder3:pool:src> Uncertain or not enough buffers, enabling copy threshold
0:00:05.190109376 19820     0x26342c60 WARN          v4l2bufferpool gstv4l2bufferpool.c:1114:gst_v4l2_buffer_pool_start:<dewaper_record_encoder3:pool:src> Uncertain or not enough buffers, enabling copy threshold
0:00:05.190209920 19820     0x26342e40 WARN          v4l2bufferpool gstv4l2bufferpool.c:1114:gst_v4l2_buffer_pool_start:<record_encoder1:pool:src> Uncertain or not enough buffers, enabling copy threshold
0:00:05.190211872 19820     0x26342f00 WARN          v4l2bufferpool gstv4l2bufferpool.c:1114:gst_v4l2_buffer_pool_start:<record_encoder0:pool:src> Uncertain or not enough buffers, enabling copy threshold
0:00:05.190235104 19820     0x26342d20 WARN          v4l2bufferpool gstv4l2bufferpool.c:1114:gst_v4l2_buffer_pool_start:<dewaper_record_encoder2:pool:src> Uncertain or not enough buffers, enabling copy threshold
0:00:05.200640832 19820     0x315eca40 WARN          v4l2bufferpool gstv4l2bufferpool.c:809:gst_v4l2_buffer_pool_start:<src3:pool:src> Uncertain or not enough buffers, enabling copy threshold
0:00:05.200921056 19820     0x315ec9e0 WARN          v4l2bufferpool gstv4l2bufferpool.c:809:gst_v4l2_buffer_pool_start:<src2:pool:src> Uncertain or not enough buffers, enabling copy threshold
0:00:05.201070784 19820     0x315ec980 WARN          v4l2bufferpool gstv4l2bufferpool.c:809:gst_v4l2_buffer_pool_start:<src1:pool:src> Uncertain or not enough buffers, enabling copy threshold
0:00:05.201198880 19820     0x315ec920 WARN          v4l2bufferpool gstv4l2bufferpool.c:809:gst_v4l2_buffer_pool_start:<src0:pool:src> Uncertain or not enough buffers, enabling copy threshold
0:00:05.276212768 19820     0x315ec980 WARN                 v4l2src gstv4l2src.c:914:gst_v4l2src_create:<src1> Timestamp does not correlate with any clock, ignoring driver timestamps
0:00:05.314358272 19820     0x315ec9e0 WARN                 v4l2src gstv4l2src.c:914:gst_v4l2src_create:<src2> Timestamp does not correlate with any clock, ignoring driver timestamps
H264: Profile = 77, Level = 0 
0:00:05.344516800 19820     0x315ec920 WARN                 v4l2src gstv4l2src.c:914:gst_v4l2src_create:<src0> Timestamp does not correlate with any clock, ignoring driver timestamps
NVMEDIA: Need to set EMC bandwidth : 21000 
NVMEDIA_ENC: bBlitMode is set to TRUE 
0:00:05.377906464 19820     0x315eca40 WARN                 v4l2src gstv4l2src.c:914:gst_v4l2src_create:<src3> Timestamp does not correlate with any clock, ignoring driver timestamps
H264: Profile = 77, Level = 0 
NVMEDIA: Need to set EMC bandwidth : 21000 
NVMEDIA_ENC: bBlitMode is set to TRUE 
H264: Profile = 77, Level = 0 
NvHostHost1xChannelSetModuleClockRate: NvError_IoctlFailed with error code 22
NVMEDIA: Need to set EMC bandwidth : 21000 
NvHostHost1xChannelSetModuleBandwidth: NvError_IoctlFailed with error code 22
0:00:05.425454816 19820 0xfffeb40d5ea0 WARN          v4l2bufferpool gstv4l2bufferpool.c:1565:gst_v4l2_buffer_pool_dqbuf:<record_encoder1:pool:src> Driver should never set v4l2_buffer.field to ANY
NVMEDIA_ENC: bBlitMode is set to TRUE 
H264: Profile = 77, Level = 0 
NVMEDIA: Need to set EMC bandwidth : 21000 
NvHostHost1xChannelSetModuleBandwidth: NvError_IoctlFailed with error code 22
NVMEDIA_ENC: bBlitMode is set to TRUE 
NvHostHost1xChannelSetModuleClockRate: NvError_IoctlFailed with error code 22
H264: Profile = 77, Level = 0 
0:00:05.460557536 19820 0xfffeb40d5400 WARN          v4l2bufferpool gstv4l2bufferpool.c:1565:gst_v4l2_buffer_pool_dqbuf:<dewaper_record_encoder1:pool:src> Driver should never set v4l2_buffer.field to ANY
NVMEDIA: Need to set EMC bandwidth : 21000 
NvHostHost1xChannelSetModuleBandwidth: NvError_IoctlFailed with error code 22
NVMEDIA_ENC: bBlitMode is set to TRUE 
H264: Profile = 77, Level = 0 
NvHostHost1xChannelSetModuleClockRate: NvError_IoctlFailed with error code 22
0:00:05.488101952 19820 0xfffea8262300 WARN          v4l2bufferpool gstv4l2bufferpool.c:1565:gst_v4l2_buffer_pool_dqbuf:<record_encoder2:pool:src> Driver should never set v4l2_buffer.field to ANY
H264: Profile = 77, Level = 0 
NvHostHost1xChannelSetModuleClockRate: NvError_IoctlFailed with error code 22
0:00:05.509402144 19820 0xfffebc0d2de0 WARN          v4l2bufferpool gstv4l2bufferpool.c:1565:gst_v4l2_buffer_pool_dqbuf:<record_encoder0:pool:src> Driver should never set v4l2_buffer.field to ANY
NVMEDIA: Need to set EMC bandwidth : 21000 
H264: Profile = 77, Level = 0 
NvHostHost1xChannelSetModuleClockRate: NvError_IoctlFailed with error code 22
0:00:05.527583648 19820 0xfffeb00d3cc0 WARN          v4l2bufferpool gstv4l2bufferpool.c:1565:gst_v4l2_buffer_pool_dqbuf:<dewaper_record_encoder2:pool:src> Driver should never set v4l2_buffer.field to ANY
NvHostHost1xChannelSetModuleBandwidth: NvError_IoctlFailed with error code 22
NVMEDIA_ENC: bBlitMode is set to TRUE 
NVMEDIA: Need to set EMC bandwidth : 21000 
NvHostHost1xChannelSetModuleBandwidth: NvError_IoctlFailed with error code 22
NVMEDIA_ENC: bBlitMode is set to TRUE 
NVMEDIA: Need to set EMC bandwidth : 21000 
NvHostHost1xChannelSetModuleBandwidth: NvError_IoctlFailed with error code 22
NvHostHost1xChannelSetModuleClockRate: NvError_IoctlFailed with error code 22
NvHostHost1xChannelSetModuleClockRate: NvError_IoctlFailed with error code 22
NVMEDIA_ENC: bBlitMode is set to TRUE 
0:00:05.587322944 19820 0xfffeac0e2c00 WARN          v4l2bufferpool gstv4l2bufferpool.c:1565:gst_v4l2_buffer_pool_dqbuf:<dewaper_record_encoder0:pool:src> Driver should never set v4l2_buffer.field to ANY
0:00:05.593191200 19820 0xfffea4066a40 WARN          v4l2bufferpool gstv4l2bufferpool.c:1565:gst_v4l2_buffer_pool_dqbuf:<dewaper_record_encoder3:pool:src> Driver should never set v4l2_buffer.field to ANY
NvHostHost1xChannelSetModuleClockRate: NvError_IoctlFailed with error code 22
0:00:05.624201472 19820 0xfffed00d2520 WARN          v4l2bufferpool gstv4l2bufferpool.c:1565:gst_v4l2_buffer_pool_dqbuf:<record_encoder3:pool:src> Driver should never set v4l2_buffer.field to ANY
Segmentation fault (core dumped)

How can I fix it?
Thanks!

Can you check the kernel log?

Theese is dmesg log:
dmesg_error.log (148.1 KB)

From the log, you are using IMX390 camera. Seems the camera goes into some error.

tegra-camrtc-capture-vi tegra-capture-vi: corr_err: discarding frame 0, flags: 0, err_data 131072

Please raise topic in the Jetson forum. Latest Jetson & Embedded Systems/Jetson AGX Orin topics - NVIDIA Developer Forums

After many attempts
I found is the deepstream auto convert engine file’s problem,
I try use previous engine file is work,
But use now auto rebuild engine file will crash,
My model is build with ultralytics python library like theese:

from ultralytics import YOLO

# Load the YOLOv8n model
model = YOLO("yolov8n.pt")  # Make sure yolov8n.pt is in your directory or provide the path

# Export the model to ONNX format
model.export(format="onnx")
# model.export(format="onnx")

Output:

Downloading https://github.com/ultralytics/assets/releases/download/v8.2.0/yolov8n.pt to 'yolov8n.pt'...
100%|███████████████████████████████████████████████████████████████████████████████████████████| 6.25M/6.25M [00:01<00:00, 3.58MB/s] 
100%|███████████████████████████████████████████████████████████████████████████████████████████| 6.25M/6.25M [00:01<00:00, 3.58MB/s] 
Ultralytics YOLOv8.2.42 🚀 Python-3.11.9 torch-2.3.1+cpu CPU (13th Gen Intel Core(TM) i9-13900H)
Ultralytics YOLOv8.2.42 🚀 Python-3.11.9 torch-2.3.1+cpu CPU (13th Gen Intel Core(TM) i9-13900H)
YOLOv8n summary (fused): 168 layers, 3151904 parameters, 0 gradients, 8.7 GFLOPs

PyTorch: starting from 'yolov8n.pt' with input shape (1, 3, 640, 640) BCHW and output shape(s) (1, 84, 8400) (6.2 MB)

PyTorch: starting from 'yolov8n.pt' with input shape (1, 3, 640, 640) BCHW and output shape(s) (1, 84, 8400) (6.2 MB)

ONNX: starting export with onnx 1.17.0 opset 17...

ONNX: starting export with onnx 1.17.0 opset 17...
ONNX: export success ✅ 1.0s, saved as 'yolov8n.onnx' (12.2 MB)
ONNX: export success ✅ 1.0s, saved as 'yolov8n.onnx' (12.2 MB)


Export complete (4.9s)
Results saved to C:\Users\I374\TungHoSteel\Code\onnx_convert\wieghts\yolov8n\simply
Predict:         yolo predict task=detect model=yolov8n.onnx imgsz=640
Validate:        yolo val task=detect model=yolov8n.onnx imgsz=640 data=coco.yaml
Visualize:       https://netron.app

What kind of crash?

What the engine files difference?

Theese is test ok and crash engine files:

engines.zip (22.2 MB)

Run Log:

os.environ[‘GST_DEBUG’] = ‘6’

ubuntu@EAC-5000:~/workspaces/yolov8-for-jetson/DeepStream-gi$ python3 '/home/ubuntu/workspaces/yolov8-for-jetson/DeepStream-gi/deepstream_gi_single_to_muilty_videosave_display.py'
fliter :['30-001b', '30-001c', '31-001b', '31-001c']
Select Cameras :{'30-001b': '/dev/video0', '30-001c': '/dev/video1', '31-001b': '/dev/video2', '31-001c': '/dev/video3'}
Folder 'videos/origin/camera_1' already exists.
Folder 'videos/dewaper/camera_1' already exists.
Folder 'videos/origin/camera_2' already exists.
Folder 'videos/dewaper/camera_2' already exists.
Folder 'videos/origin/camera_3' already exists.
Folder 'videos/dewaper/camera_3' already exists.
Folder 'videos/origin/camera_4' already exists.
Folder 'videos/dewaper/camera_4' already exists.
Opening in BLOCKING MODE 
Opening in BLOCKING MODE 
Opening in BLOCKING MODE 
Opening in BLOCKING MODE 
Opening in BLOCKING MODE 
Opening in BLOCKING MODE 
Opening in BLOCKING MODE 
Opening in BLOCKING MODE 
Opening in BLOCKING MODE
ArgusV4L2_Open failed: No such file or directory
Opening in BLOCKING MODE 
Opening in BLOCKING MODE
ArgusV4L2_Open failed: No such file or directory
Opening in BLOCKING MODE 
Opening in BLOCKING MODE
ArgusV4L2_Open failed: No such file or directory
Opening in BLOCKING MODE 
gstnvtracker: Loading low-level lib at /opt/nvidia/deepstream/deepstream/lib/libnvds_nvmultiobjecttracker.so
gstnvtracker: Batch processing is ON
gstnvtracker: Past frame output is OFF
[NvMultiObjectTracker] Initialized
WARNING: Deserialize engine failed because file path: /home/ubuntu/workspaces/yolov8-for-jetson/DeepStream-gi/configs/model_b1_gpu0_fp32.engine open error
0:00:04.124366624 218971      0xdfe3e40 WARN                 nvinfer gstnvinfer.cpp:677:gst_nvinfer_logger:<nvinfer> NvDsInferContext[UID 1]: Warning from NvDsInferContextImpl::deserializeEngineAndBackend() <nvdsinfer_context_impl.cpp:1897> [UID = 1]: deserialize engine from file :/home/ubuntu/workspaces/yolov8-for-jetson/DeepStream-gi/configs/model_b1_gpu0_fp32.engine failed
0:00:04.269880192 218971      0xdfe3e40 WARN                 nvinfer gstnvinfer.cpp:677:gst_nvinfer_logger:<nvinfer> NvDsInferContext[UID 1]: Warning from NvDsInferContextImpl::generateBackendContext() <nvdsinfer_context_impl.cpp:2002> [UID = 1]: deserialize backend context from engine from file :/home/ubuntu/workspaces/yolov8-for-jetson/DeepStream-gi/configs/model_b1_gpu0_fp32.engine failed, try rebuild
0:00:04.269927008 218971      0xdfe3e40 INFO                 nvinfer gstnvinfer.cpp:680:gst_nvinfer_logger:<nvinfer> NvDsInferContext[UID 1]: Info from NvDsInferContextImpl::buildModel() <nvdsinfer_context_impl.cpp:1923> [UID = 1]: Trying to create engine from model files
WARNING: [TRT]: onnx2trt_utils.cpp:375: Your ONNX model has been generated with INT64 weights, while TensorRT does not natively support INT64. Attempting to cast down to INT32.

Building the TensorRT Engine

Building complete

0:03:07.903868192 218971      0xdfe3e40 INFO                 nvinfer gstnvinfer.cpp:680:gst_nvinfer_logger:<nvinfer> NvDsInferContext[UID 1]: Info from NvDsInferContextImpl::buildModel() <nvdsinfer_context_impl.cpp:1955> [UID = 1]: serialize cuda engine to file: /home/ubuntu/workspaces/yolov8-for-jetson/DeepStream-gi/model_b1_gpu0_fp32.engine successfully
WARNING: [TRT]: The getMaxBatchSize() function should not be used with an engine built from a network created with NetworkDefinitionCreationFlag::kEXPLICIT_BATCH flag. This function will always return 1.
INFO: [Implicit Engine Info]: layers num: 2
0   INPUT  kFLOAT images          3x640x640       
1   OUTPUT kFLOAT output0         84x8400         

0:03:08.105005184 218971      0xdfe3e40 INFO                 nvinfer gstnvinfer_impl.cpp:328:notifyLoadModelStatus:<nvinfer> [UID 1]: Load new model:configs/config_infer_primary_yoloV8.txt sucessfully
NvMMLiteOpen : Block : BlockType = 4 
NvMMLiteOpen : Block : BlockType = 4 
NvMMLiteOpen : Block : BlockType = 4 
NvMMLiteOpen : Block : BlockType = 4 
===== NVMEDIA: NVENC =====
===== NVMEDIA: NVENC =====
===== NVMEDIA: NVENC =====
===== NVMEDIA: NVENC =====
NvMMLiteBlockCreate : Block : BlockType = 4 
NvMMLiteBlockCreate : Block : BlockType = 4 
NvMMLiteBlockCreate : Block : BlockType = 4 
NvMMLiteBlockCreate : Block : BlockType = 4 
NvMMLiteOpen : Block : BlockType = 4 
===== NVMEDIA: NVENC =====
NvMMLiteBlockCreate : Block : BlockType = 4 
NvMMLiteOpen : Block : BlockType = 4 
NvMMLiteOpen : Block : BlockType = 4 
NvMMLiteOpen : Block : BlockType = 4 
===== NVMEDIA: NVENC =====
===== NVMEDIA: NVENC =====
===== NVMEDIA: NVENC =====
NvMMLiteBlockCreate : Block : BlockType = 4 
NvMMLiteBlockCreate : Block : BlockType = 4 
NvMMLiteBlockCreate : Block : BlockType = 4 
Segmentation fault (core dumped)

Kernal logs always like theese:

[Thu Nov 21 16:36:10 2024] cpufreq: cpu4,cur:1990000,set:2188800,set ndiv:171
[Thu Nov 21 16:36:12 2024] cpufreq: cpu0,cur:2063000,set:2188800,set ndiv:171
[Thu Nov 21 16:36:14 2024] cpufreq: cpu0,cur:2324000,set:2188800,set ndiv:171
[Thu Nov 21 16:36:18 2024] cpufreq: cpu4,cur:2313000,set:2188800,set ndiv:171
[Thu Nov 21 16:36:19 2024] cpufreq: cpu0,cur:2018000,set:2188800,set ndiv:171
[Thu Nov 21 16:36:20 2024] cpufreq: cpu4,cur:2026000,set:2188800,set ndiv:171
[Thu Nov 21 16:36:23 2024] cpufreq: cpu4,cur:2002000,set:2188800,set ndiv:171
[Thu Nov 21 16:36:25 2024] cpufreq: cpu0,cur:2327000,set:2188800,set ndiv:171
[Thu Nov 21 16:36:26 2024] cpufreq: cpu4,cur:2331000,set:2188800,set ndiv:171
[Thu Nov 21 16:36:28 2024] cpufreq: cpu4,cur:2380000,set:2188800,set ndiv:171
[Thu Nov 21 16:36:32 2024] cpufreq: cpu0,cur:2368000,set:2188800,set ndiv:171
[Thu Nov 21 16:36:38 2024] cpufreq: cpu0,cur:2360000,set:2188800,set ndiv:171
[Thu Nov 21 16:36:40 2024] cpufreq: cpu0,cur:2057000,set:2188800,set ndiv:171
[Thu Nov 21 16:36:42 2024] cpufreq: cpu0,cur:2068000,set:2188800,set ndiv:171
[Thu Nov 21 16:36:42 2024] cpufreq: cpu4,cur:2375000,set:2188800,set ndiv:171
[Thu Nov 21 16:36:45 2024] bwmgr API not supported
[Thu Nov 21 16:36:45 2024] bwmgr API not supported
[Thu Nov 21 16:36:45 2024] bwmgr API not supported
[Thu Nov 21 16:36:45 2024] bwmgr API not supported
[Thu Nov 21 16:36:45 2024] tegra-camrtc-capture-vi tegra-capture-vi: corr_err: discarding frame 0, flags: 0, err_data 131072
[Thu Nov 21 16:36:45 2024] tegra-camrtc-capture-vi tegra-capture-vi: corr_err: discarding frame 0, flags: 0, err_data 131072
[Thu Nov 21 16:36:45 2024] tegra-camrtc-capture-vi tegra-capture-vi: corr_err: discarding frame 0, flags: 0, err_data 131072
[Thu Nov 21 16:36:45 2024] tegra-camrtc-capture-vi tegra-capture-vi: corr_err: discarding frame 0, flags: 0, err_data 131072
[Thu Nov 21 16:36:45 2024] bwmgr API not supported
[Thu Nov 21 16:36:45 2024] bwmgr API not supported
[Thu Nov 21 16:36:45 2024] cpufreq: cpu4,cur:2386000,set:2188800,set ndiv:171
[Thu Nov 21 16:36:46 2024] bwmgr API not supported
[Thu Nov 21 16:36:46 2024] bwmgr API not supported

Can you get the crash stack with gdb?

I use python coding
How can I use gdb?