Segmentation Fault on Frame-Image Conversion using pyds.get_nvds_buf_surface

DeepStream Version - 7.0
Docker Image - nvcr.io/nvidia/deepstream:7.0-gc-triton-devel
GPU - NVIDIA A100-SXM4-40GB
NVIDIA GPU Driver - 550.90.07
CUDA Version -12.4
PyTorch Version - 2.4.0

I’m getting segmentation fault while trying to access frames using pyds.get_nvds_buf_surface inside pgie_src_pad_buffer_probe, following is the terminal output -

Creating Pipeline 
 
Creating streamux 
 
Creating source_bin  0  
 
Creating source bin
source-bin-00
Creating Pgie 
 
Creating tracker 
 
Creating tiler 
 
Creating nvvidconv 
 
Creating nvvidconv1...
 
Creating filter1...
 
Creating nvosd 
 
Creating nvdsanalytics 
 
Is it Integrated GPU? : 0
Memory type is NOT INTEGRATED
WARNING: Overriding infer-config batch-size 10  with number of sources  1  

Adding elements to Pipeline 

Linking elements in the Pipeline 

Adding elements to Pipeline 

Linking elements in the Pipeline 


 *** nvrtspoutsinkbin: Launched RTSP Streaming at rtsp://localhost:570/iobk ***

Queue created
Now playing...
0 :  file:///opt/nvidia/deepstream/deepstream-7.0/sources/deepstream_python_apps/apps/deepstream-test3/1min.mp4
Starting pipeline 

Decodebin child added: nvurisrc_bin_src_elem 

<Gst.Bin object at 0x7f3cdc751b40 (GstBin at 0x55b4403bec80)>
gstnvtracker: Loading low-level lib at ../../../../lib/libnvds_nvmultiobjecttracker.so
[NvTrackerParams::getConfigRoot()] !!![WARNING] File doesn't exist. Will go ahead with default values
[NvMultiObjectTracker] Initialized
0:00:07.096926871 1515470 0x55b440a6f110 INFO                 nvinfer gstnvinfer.cpp:682:gst_nvinfer_logger:<primary-inference> NvDsInferContext[UID 1]: Info from NvDsInferContextImpl::deserializeEngineAndBackend() <nvdsinfer_context_impl.cpp:2095> [UID = 1]: deserialized trt engine from :/opt/nvidia/deepstream/deepstream-7.0/sources/deepstream_tao_apps/models/ansh/resnet34_peoplenet_int8.onnx_b1_gpu0_int8.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: ../nvdsinfer/nvdsinfer_model_builder.cpp:612 [Implicit Engine Info]: layers num: 3
0   INPUT  kFLOAT input_1:0       3x544x960       
1   OUTPUT kFLOAT output_cov/Sigmoid:0 3x34x60         
2   OUTPUT kFLOAT output_bbox/BiasAdd:0 12x34x60        

0:00:07.384021764 1515470 0x55b440a6f110 INFO                 nvinfer gstnvinfer.cpp:682:gst_nvinfer_logger:<primary-inference> NvDsInferContext[UID 1]: Info from NvDsInferContextImpl::generateBackendContext() <nvdsinfer_context_impl.cpp:2198> [UID = 1]: Use deserialized engine model: /opt/nvidia/deepstream/deepstream-7.0/sources/deepstream_tao_apps/models/ansh/resnet34_peoplenet_int8.onnx_b1_gpu0_int8.engine
0:00:07.400558410 1515470 0x55b440a6f110 INFO                 nvinfer gstnvinfer_impl.cpp:343:notifyLoadModelStatus:<primary-inference> [UID 1]: Load new model:nvicm_ansh.txt sucessfully

**PERF:  {'stream0': 0.0} 


**PERF:  {'stream0': 0.0} 

sys:1: Warning: g_object_get_is_valid_property: object class 'GstUDPSrc' has no property named 'pt'

(python3:1515470): GStreamer-WARNING **: 08:03:07.304: ../gst/gstpad.c:4416:gst_pad_chain_data_unchecked:<nvv4l2decoder0:sink> Got data flow before segment event
Decodebin child added: nvurisrc_bin_queue 

<Gst.Bin object at 0x7f3cdc751b40 (GstBin at 0x55b4403bec80)>
Decodebin child added: nvurisrc_bin_nvvidconv_elem 

<Gst.Bin object at 0x7f3cdc751b40 (GstBin at 0x55b4403bec80)>
Decodebin child added: nvurisrc_bin_src_cap_filter_nvvidconv 

<Gst.Bin object at 0x7f3cdc751b40 (GstBin at 0x55b4403bec80)>
In cb_newpad

gstname= video/x-raw
features= <Gst.CapsFeatures object at 0x7f3cdc091300 (GstCapsFeatures at 0x7f3bcc01a660)>
Decodebin child added: nvurisrc_bin__fakesink 

<Gst.Bin object at 0x7f3cdc751b40 (GstBin at 0x55b4403bec80)>
Decodebin child added: tee0 

<Gst.Bin object at 0x7f3cdc751b40 (GstBin at 0x55b4403bec80)>
Decodebin child added: nvurisrc_bin_fakequeue 

<Gst.Bin object at 0x7f3cdc751b40 (GstBin at 0x55b4403bec80)>

(python3:1515470): GStreamer-WARNING **: 08:03:07.433: ../gst/gstpad.c:4416:gst_pad_chain_data_unchecked:<nvv4l2decoder0:sink> Got data flow before segment event

(python3:1515470): GStreamer-WARNING **: 08:03:07.434: ../gst/gstpad.c:4416:gst_pad_chain_data_unchecked:<nvv4l2decoder0:sink> Got data flow before segment event

(python3:1515470): GStreamer-WARNING **: 08:03:07.434: ../gst/gstpad.c:4416:gst_pad_chain_data_unchecked:<nvv4l2decoder0:sink> Got data flow before segment event

(python3:1515470): GStreamer-WARNING **: 08:03:07.435: ../gst/gstpad.c:4416:gst_pad_chain_data_unchecked:<nvv4l2decoder0:sink> Got data flow before segment event

(python3:1515470): GStreamer-WARNING **: 08:03:07.510: ../gst/gstpad.c:4416:gst_pad_chain_data_unchecked:<nvv4l2decoder0:sink> Got data flow before segment event
###### <pyds.NvDsFrameMeta object at 0x7f3cdc0c0170>
Segmentation fault (core dumped)

extract_frames.txt (43.8 KB)
frame_config.txt (1.1 KB)

Attached is the code and configuration file for the same. The last print is coming from line 222 and line 223 is where the segmentaion fault is getting triggered I suppose. I think I have used nvvideoconvert and capsfilter correctly and added them to the pipeline before pgie in lines 1078-1081 which was working for me in another code that I had written before.

Please advise, thanks!

Could you run with below flag. This enables Gstreamer logs.

os.environ["GST_DEBUG"] = "3"

Following is the output with GST_DEBUG=3 and it’s not showing why the segmentation fault is being thrown -

Creating Pipeline 
 
Creating streamux 
 
Creating source_bin  0  
 
Creating source bin
source-bin-00
Creating Pgie 
 
Creating tracker 
 
Creating tiler 
 
Creating nvvidconv 
 
Creating nvvidconv1...
 
Creating filter1...
 
Creating nvosd 
 
Creating nvdsanalytics 
 
Is it Integrated GPU? : 0
Memory type is NOT INTEGRATED
WARNING: Overriding infer-config batch-size 10  with number of sources  1  

Adding elements to Pipeline 

Linking elements in the Pipeline 

Adding elements to Pipeline 

Linking elements in the Pipeline 


 *** nvrtspoutsinkbin: Launched RTSP Streaming at rtsp://localhost:670/iobk ***

Queue created
Now playing...
0 :  file:///opt/nvidia/deepstream/deepstream-7.0/sources/deepstream_python_apps/apps/deepstream-test3/1min.mp4
Starting pipeline 

0:00:00.105309349 1563241 0x56382d3153d0 ERROR             rtspserver rtsp-server.c:1004:gst_rtsp_server_create_socket:<GstRTSPServer@0x56382d38b6c0> failed to create socket
0:00:00.105347260 1563241 0x56382d3153d0 ERROR             rtspserver rtsp-server.c:1374:gst_rtsp_server_create_source:<GstRTSPServer@0x56382d38b6c0> failed to create socket
0:00:00.105360575 1563241 0x56382d3153d0 ERROR             rtspserver rtsp-server.c:1420:gst_rtsp_server_attach:<GstRTSPServer@0x56382d38b6c0> failed to create watch: Error binding to address 0.0.0.0:670: Address already in use
Decodebin child added: nvurisrc_bin_src_elem 

<Gst.Bin object at 0x7fdedeb00440 (GstBin at 0x56382cc64ef0)>
gstnvtracker: Loading low-level lib at ../../../../lib/libnvds_nvmultiobjecttracker.so
[NvTrackerParams::getConfigRoot()] !!![WARNING] File doesn't exist. Will go ahead with default values
[NvMultiObjectTracker] Initialized
0:00:07.371374210 1563241 0x56382d3153d0 INFO                 nvinfer gstnvinfer.cpp:682:gst_nvinfer_logger:<primary-inference> NvDsInferContext[UID 1]: Info from NvDsInferContextImpl::deserializeEngineAndBackend() <nvdsinfer_context_impl.cpp:2095> [UID = 1]: deserialized trt engine from :/opt/nvidia/deepstream/deepstream-7.0/sources/deepstream_tao_apps/models/ansh/resnet34_peoplenet_int8.onnx_b1_gpu0_int8.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: ../nvdsinfer/nvdsinfer_model_builder.cpp:612 [Implicit Engine Info]: layers num: 3
0   INPUT  kFLOAT input_1:0       3x544x960       
1   OUTPUT kFLOAT output_cov/Sigmoid:0 3x34x60         
2   OUTPUT kFLOAT output_bbox/BiasAdd:0 12x34x60        

0:00:07.676716636 1563241 0x56382d3153d0 INFO                 nvinfer gstnvinfer.cpp:682:gst_nvinfer_logger:<primary-inference> NvDsInferContext[UID 1]: Info from NvDsInferContextImpl::generateBackendContext() <nvdsinfer_context_impl.cpp:2198> [UID = 1]: Use deserialized engine model: /opt/nvidia/deepstream/deepstream-7.0/sources/deepstream_tao_apps/models/ansh/resnet34_peoplenet_int8.onnx_b1_gpu0_int8.engine
0:00:07.701556975 1563241 0x56382d3153d0 INFO                 nvinfer gstnvinfer_impl.cpp:343:notifyLoadModelStatus:<primary-inference> [UID 1]: Load new model:nvicm_ansh.txt sucessfully
0:00:07.704215579 1563241 0x56382d3153d0 WARN                 basesrc gstbasesrc.c:3688:gst_base_src_start_complete:<source> pad not activated yet
0:00:07.704556604 1563241 0x56382d3153d0 WARN                 basesrc gstbasesrc.c:3688:gst_base_src_start_complete:<source> pad not activated yet

**PERF:  {'stream0': 0.0} 


**PERF:  {'stream0': 0.0} 

0:00:07.710678271 1563241 0x7fde840038c0 WARN                 qtdemux qtdemux_types.c:249:qtdemux_type_get: unknown QuickTime node type sgpd
0:00:07.710711784 1563241 0x7fde840038c0 WARN                 qtdemux qtdemux_types.c:249:qtdemux_type_get: unknown QuickTime node type sbgp
0:00:07.710756970 1563241 0x7fde840038c0 WARN                 qtdemux qtdemux.c:3121:qtdemux_parse_trex:<qtdemux0> failed to find fragment defaults for stream 1
0:00:07.710827402 1563241 0x7fde840038c0 WARN                 qtdemux qtdemux.c:3121:qtdemux_parse_trex:<qtdemux0> failed to find fragment defaults for stream 2
0:00:07.781643530 1563241 0x7fde84003c20 WARN                    v4l2 gstv4l2object.c:3100:gst_v4l2_object_get_nearest_size:<nvv4l2decoder0:sink> Unable to try format: Unknown error -1
0:00:07.781682212 1563241 0x7fde84003c20 WARN                    v4l2 gstv4l2object.c:2985:gst_v4l2_object_probe_caps_for_format:<nvv4l2decoder0:sink> Could not probe minimum capture size for pixelformat MJPG
0:00:07.781688143 1563241 0x7fde84003c20 WARN                    v4l2 gstv4l2object.c:3100:gst_v4l2_object_get_nearest_size:<nvv4l2decoder0:sink> Unable to try format: Unknown error -1
0:00:07.781699456 1563241 0x7fde84003c20 WARN                    v4l2 gstv4l2object.c:2991:gst_v4l2_object_probe_caps_for_format:<nvv4l2decoder0:sink> Could not probe maximum capture size for pixelformat MJPG
0:00:07.781718852 1563241 0x7fde84003c20 WARN                    v4l2 gstv4l2object.c:3100:gst_v4l2_object_get_nearest_size:<nvv4l2decoder0:sink> Unable to try format: Unknown error -1
0:00:07.781727819 1563241 0x7fde84003c20 WARN                    v4l2 gstv4l2object.c:2985:gst_v4l2_object_probe_caps_for_format:<nvv4l2decoder0:sink> Could not probe minimum capture size for pixelformat AV10
0:00:07.781787241 1563241 0x7fde84003c20 WARN                    v4l2 gstv4l2object.c:3100:gst_v4l2_object_get_nearest_size:<nvv4l2decoder0:sink> Unable to try format: Unknown error -1
0:00:07.781798743 1563241 0x7fde84003c20 WARN                    v4l2 gstv4l2object.c:2991:gst_v4l2_object_probe_caps_for_format:<nvv4l2decoder0:sink> Could not probe maximum capture size for pixelformat AV10
0:00:07.781814753 1563241 0x7fde84003c20 WARN                    v4l2 gstv4l2object.c:3100:gst_v4l2_object_get_nearest_size:<nvv4l2decoder0:sink> Unable to try format: Unknown error -1
0:00:07.781826455 1563241 0x7fde84003c20 WARN                    v4l2 gstv4l2object.c:2985:gst_v4l2_object_probe_caps_for_format:<nvv4l2decoder0:sink> Could not probe minimum capture size for pixelformat DVX5
0:00:07.781838498 1563241 0x7fde84003c20 WARN                    v4l2 gstv4l2object.c:3100:gst_v4l2_object_get_nearest_size:<nvv4l2decoder0:sink> Unable to try format: Unknown error -1
0:00:07.781848607 1563241 0x7fde84003c20 WARN                    v4l2 gstv4l2object.c:2991:gst_v4l2_object_probe_caps_for_format:<nvv4l2decoder0:sink> Could not probe maximum capture size for pixelformat DVX5
0:00:07.781889384 1563241 0x7fde84003c20 WARN                    v4l2 gstv4l2object.c:3100:gst_v4l2_object_get_nearest_size:<nvv4l2decoder0:sink> Unable to try format: Unknown error -1
0:00:07.781901597 1563241 0x7fde84003c20 WARN                    v4l2 gstv4l2object.c:2985:gst_v4l2_object_probe_caps_for_format:<nvv4l2decoder0:sink> Could not probe minimum capture size for pixelformat DVX4
0:00:07.781906337 1563241 0x7fde84003c20 WARN                    v4l2 gstv4l2object.c:3100:gst_v4l2_object_get_nearest_size:<nvv4l2decoder0:sink> Unable to try format: Unknown error -1
0:00:07.781915013 1563241 0x7fde84003c20 WARN                    v4l2 gstv4l2object.c:2991:gst_v4l2_object_probe_caps_for_format:<nvv4l2decoder0:sink> Could not probe maximum capture size for pixelformat DVX4
0:00:07.781930712 1563241 0x7fde84003c20 WARN                    v4l2 gstv4l2object.c:3100:gst_v4l2_object_get_nearest_size:<nvv4l2decoder0:sink> Unable to try format: Unknown error -1
0:00:07.781940801 1563241 0x7fde84003c20 WARN                    v4l2 gstv4l2object.c:2985:gst_v4l2_object_probe_caps_for_format:<nvv4l2decoder0:sink> Could not probe minimum capture size for pixelformat MPG4
0:00:07.781945490 1563241 0x7fde84003c20 WARN                    v4l2 gstv4l2object.c:3100:gst_v4l2_object_get_nearest_size:<nvv4l2decoder0:sink> Unable to try format: Unknown error -1
0:00:07.781970127 1563241 0x7fde84003c20 WARN                    v4l2 gstv4l2object.c:2991:gst_v4l2_object_probe_caps_for_format:<nvv4l2decoder0:sink> Could not probe maximum capture size for pixelformat MPG4
0:00:07.781978713 1563241 0x7fde84003c20 WARN                    v4l2 gstv4l2object.c:3100:gst_v4l2_object_get_nearest_size:<nvv4l2decoder0:sink> Unable to try format: Unknown error -1
0:00:07.781984734 1563241 0x7fde84003c20 WARN                    v4l2 gstv4l2object.c:2985:gst_v4l2_object_probe_caps_for_format:<nvv4l2decoder0:sink> Could not probe minimum capture size for pixelformat MPG2
0:00:07.781989364 1563241 0x7fde84003c20 WARN                    v4l2 gstv4l2object.c:3100:gst_v4l2_object_get_nearest_size:<nvv4l2decoder0:sink> Unable to try format: Unknown error -1
0:00:07.781994843 1563241 0x7fde84003c20 WARN                    v4l2 gstv4l2object.c:2991:gst_v4l2_object_probe_caps_for_format:<nvv4l2decoder0:sink> Could not probe maximum capture size for pixelformat MPG2
0:00:07.782003711 1563241 0x7fde84003c20 WARN                    v4l2 gstv4l2object.c:3100:gst_v4l2_object_get_nearest_size:<nvv4l2decoder0:sink> Unable to try format: Unknown error -1
0:00:07.782009852 1563241 0x7fde84003c20 WARN                    v4l2 gstv4l2object.c:2985:gst_v4l2_object_probe_caps_for_format:<nvv4l2decoder0:sink> Could not probe minimum capture size for pixelformat H265
0:00:07.782014371 1563241 0x7fde84003c20 WARN                    v4l2 gstv4l2object.c:3100:gst_v4l2_object_get_nearest_size:<nvv4l2decoder0:sink> Unable to try format: Unknown error -1
0:00:07.782020331 1563241 0x7fde84003c20 WARN                    v4l2 gstv4l2object.c:2991:gst_v4l2_object_probe_caps_for_format:<nvv4l2decoder0:sink> Could not probe maximum capture size for pixelformat H265
0:00:07.782171267 1563241 0x7fde84003c20 WARN                    v4l2 gstv4l2object.c:3100:gst_v4l2_object_get_nearest_size:<nvv4l2decoder0:sink> Unable to try format: Unknown error -1
0:00:07.782178902 1563241 0x7fde84003c20 WARN                    v4l2 gstv4l2object.c:2985:gst_v4l2_object_probe_caps_for_format:<nvv4l2decoder0:sink> Could not probe minimum capture size for pixelformat VP90
0:00:07.782184412 1563241 0x7fde84003c20 WARN                    v4l2 gstv4l2object.c:3100:gst_v4l2_object_get_nearest_size:<nvv4l2decoder0:sink> Unable to try format: Unknown error -1
0:00:07.782193449 1563241 0x7fde84003c20 WARN                    v4l2 gstv4l2object.c:2991:gst_v4l2_object_probe_caps_for_format:<nvv4l2decoder0:sink> Could not probe maximum capture size for pixelformat VP90
0:00:07.782201143 1563241 0x7fde84003c20 WARN                    v4l2 gstv4l2object.c:3100:gst_v4l2_object_get_nearest_size:<nvv4l2decoder0:sink> Unable to try format: Unknown error -1
0:00:07.782207595 1563241 0x7fde84003c20 WARN                    v4l2 gstv4l2object.c:2985:gst_v4l2_object_probe_caps_for_format:<nvv4l2decoder0:sink> Could not probe minimum capture size for pixelformat VP80
0:00:07.782212144 1563241 0x7fde84003c20 WARN                    v4l2 gstv4l2object.c:3100:gst_v4l2_object_get_nearest_size:<nvv4l2decoder0:sink> Unable to try format: Unknown error -1
0:00:07.782226982 1563241 0x7fde84003c20 WARN                    v4l2 gstv4l2object.c:2991:gst_v4l2_object_probe_caps_for_format:<nvv4l2decoder0:sink> Could not probe maximum capture size for pixelformat VP80
0:00:07.782239455 1563241 0x7fde84003c20 WARN                    v4l2 gstv4l2object.c:3100:gst_v4l2_object_get_nearest_size:<nvv4l2decoder0:sink> Unable to try format: Unknown error -1
0:00:07.782249605 1563241 0x7fde84003c20 WARN                    v4l2 gstv4l2object.c:2985:gst_v4l2_object_probe_caps_for_format:<nvv4l2decoder0:sink> Could not probe minimum capture size for pixelformat H264
0:00:07.782258322 1563241 0x7fde84003c20 WARN                    v4l2 gstv4l2object.c:3100:gst_v4l2_object_get_nearest_size:<nvv4l2decoder0:sink> Unable to try format: Unknown error -1
0:00:07.782326971 1563241 0x7fde84003c20 WARN                    v4l2 gstv4l2object.c:2991:gst_v4l2_object_probe_caps_for_format:<nvv4l2decoder0:sink> Could not probe maximum capture size for pixelformat H264
0:00:07.782777522 1563241 0x7fde84003c20 WARN                    v4l2 gstv4l2object.c:3100:gst_v4l2_object_get_nearest_size:<nvv4l2decoder0:src> Unable to try format: Unknown error -1
0:00:07.782794694 1563241 0x7fde84003c20 WARN                    v4l2 gstv4l2object.c:2985:gst_v4l2_object_probe_caps_for_format:<nvv4l2decoder0:src> Could not probe minimum capture size for pixelformat Y444
0:00:07.782799755 1563241 0x7fde84003c20 WARN                    v4l2 gstv4l2object.c:3100:gst_v4l2_object_get_nearest_size:<nvv4l2decoder0:src> Unable to try format: Unknown error -1
0:00:07.782810655 1563241 0x7fde84003c20 WARN                    v4l2 gstv4l2object.c:2991:gst_v4l2_object_probe_caps_for_format:<nvv4l2decoder0:src> Could not probe maximum capture size for pixelformat Y444
0:00:07.782823830 1563241 0x7fde84003c20 WARN                    v4l2 gstv4l2object.c:3100:gst_v4l2_object_get_nearest_size:<nvv4l2decoder0:src> Unable to try format: Unknown error -1
0:00:07.782833719 1563241 0x7fde84003c20 WARN                    v4l2 gstv4l2object.c:2985:gst_v4l2_object_probe_caps_for_format:<nvv4l2decoder0:src> Could not probe minimum capture size for pixelformat P410
0:00:07.782838437 1563241 0x7fde84003c20 WARN                    v4l2 gstv4l2object.c:3100:gst_v4l2_object_get_nearest_size:<nvv4l2decoder0:src> Unable to try format: Unknown error -1
0:00:07.782849137 1563241 0x7fde84003c20 WARN                    v4l2 gstv4l2object.c:2991:gst_v4l2_object_probe_caps_for_format:<nvv4l2decoder0:src> Could not probe maximum capture size for pixelformat P410
0:00:07.782862192 1563241 0x7fde84003c20 WARN                    v4l2 gstv4l2object.c:3100:gst_v4l2_object_get_nearest_size:<nvv4l2decoder0:src> Unable to try format: Unknown error -1
0:00:07.782871059 1563241 0x7fde84003c20 WARN                    v4l2 gstv4l2object.c:2985:gst_v4l2_object_probe_caps_for_format:<nvv4l2decoder0:src> Could not probe minimum capture size for pixelformat PM10
0:00:07.782875698 1563241 0x7fde84003c20 WARN                    v4l2 gstv4l2object.c:3100:gst_v4l2_object_get_nearest_size:<nvv4l2decoder0:src> Unable to try format: Unknown error -1
0:00:07.782886488 1563241 0x7fde84003c20 WARN                    v4l2 gstv4l2object.c:2991:gst_v4l2_object_probe_caps_for_format:<nvv4l2decoder0:src> Could not probe maximum capture size for pixelformat PM10
0:00:07.782899352 1563241 0x7fde84003c20 WARN                    v4l2 gstv4l2object.c:3100:gst_v4l2_object_get_nearest_size:<nvv4l2decoder0:src> Unable to try format: Unknown error -1
0:00:07.782911044 1563241 0x7fde84003c20 WARN                    v4l2 gstv4l2object.c:2985:gst_v4l2_object_probe_caps_for_format:<nvv4l2decoder0:src> Could not probe minimum capture size for pixelformat NM12
0:00:07.782920191 1563241 0x7fde84003c20 WARN                    v4l2 gstv4l2object.c:3100:gst_v4l2_object_get_nearest_size:<nvv4l2decoder0:src> Unable to try format: Unknown error -1
0:00:07.782930521 1563241 0x7fde84003c20 WARN                    v4l2 gstv4l2object.c:2991:gst_v4l2_object_probe_caps_for_format:<nvv4l2decoder0:src> Could not probe maximum capture size for pixelformat NM12

(python3:1563241): GStreamer-WARNING **: 04:13:55.603: ../gst/gstpad.c:4416:gst_pad_chain_data_unchecked:<nvv4l2decoder0:sink> Got data flow before segment event
0:00:07.784472716 1563241 0x7fde84003c20 WARN            videodecoder gstvideodecoder.c:2816:gst_video_decoder_chain:<nvv4l2decoder0> Received buffer without a new-segment. Assuming timestamps start from 0.
Decodebin child added: nvurisrc_bin_queue 

<Gst.Bin object at 0x7fdedeb00440 (GstBin at 0x56382cc64ef0)>
Decodebin child added: nvurisrc_bin_nvvidconv_elem 

<Gst.Bin object at 0x7fdedeb00440 (GstBin at 0x56382cc64ef0)>
Decodebin child added: nvurisrc_bin_src_cap_filter_nvvidconv 

<Gst.Bin object at 0x7fdedeb00440 (GstBin at 0x56382cc64ef0)>
In cb_newpad

gstname= video/x-raw
features= <Gst.CapsFeatures object at 0x7fdedbf5d2a0 (GstCapsFeatures at 0x7fddec01a9f0)>
Decodebin child added: nvurisrc_bin__fakesink 

<Gst.Bin object at 0x7fdedeb00440 (GstBin at 0x56382cc64ef0)>
Decodebin child added: tee0 

<Gst.Bin object at 0x7fdedeb00440 (GstBin at 0x56382cc64ef0)>
Decodebin child added: nvurisrc_bin_fakequeue 

<Gst.Bin object at 0x7fdedeb00440 (GstBin at 0x56382cc64ef0)>
0:00:07.910742940 1563241 0x7fde84003c20 WARN            v4l2videodec gstv4l2videodec.c:2311:gst_v4l2_video_dec_decide_allocation:<nvv4l2decoder0> Duration invalid, not setting latency
0:00:07.957146256 1563241 0x7fde84003c20 WARN          v4l2bufferpool gstv4l2bufferpool.c:1116:gst_v4l2_buffer_pool_start:<nvv4l2decoder0:pool:src> Uncertain or not enough buffers, enabling copy threshold
0:00:07.958090479 1563241 0x7fde84004f10 WARN          v4l2bufferpool gstv4l2bufferpool.c:1567:gst_v4l2_buffer_pool_dqbuf:<nvv4l2decoder0:pool:src> Driver should never set v4l2_buffer.field to ANY

(python3:1563241): GStreamer-WARNING **: 04:13:55.783: ../gst/gstpad.c:4416:gst_pad_chain_data_unchecked:<nvv4l2decoder0:sink> Got data flow before segment event

(python3:1563241): GStreamer-WARNING **: 04:13:55.785: ../gst/gstpad.c:4416:gst_pad_chain_data_unchecked:<nvv4l2decoder0:sink> Got data flow before segment event

(python3:1563241): GStreamer-WARNING **: 04:13:55.785: ../gst/gstpad.c:4416:gst_pad_chain_data_unchecked:<nvv4l2decoder0:sink> Got data flow before segment event

(python3:1563241): GStreamer-WARNING **: 04:13:55.851: ../gst/gstpad.c:4416:gst_pad_chain_data_unchecked:<nvv4l2decoder0:sink> Got data flow before segment event

(python3:1563241): GStreamer-WARNING **: 04:13:55.854: ../gst/gstpad.c:4416:gst_pad_chain_data_unchecked:<nvv4l2decoder0:sink> Got data flow before segment event
###### <pyds.NvDsFrameMeta object at 0x7fdedbf6b8f0>
Segmentation fault (core dumped)

The issue was with setting the memory type, following is the solution -

 mem_type = int(pyds.NVBUF_MEM_CUDA_UNIFIED)
 print("Memory Type", mem_type)

 streammux.set_property('nvbuf-memory-type', mem_type)
 nvvidconv.set_property('nvbuf-memory-type', mem_type)
 nvvidconv1.set_property('nvbuf-memory-type', mem_type)

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.