Error: gst-stream-error-quark: Internal data stream error. (1),

I am using Hailo AI kit with raspberry pi, I am connecting the camera and running the object detection model from hailo-examples, one of my wide angle camera is working fine with the model, but the other cctv camera is not working and giving the below error:


python basic_pipelines/detection.py --input rpi
hailomuxer name=hmux libcamerasrc name=src_0 auto-focus-mode=AfModeManual ! video/x-raw, format=RGB, width=1536, height=864 ! queue name=queue_src_scale max-size-buffers=3 max-size-bytes=0 max-size-time=0 ! videoscale ! video/x-raw, format=RGB, width=640, height=640, framerate=30/1 ! queue name=queue_scale max-size-buffers=3 max-size-bytes=0 max-size-time=0 ! videoscale n-threads=2 ! queue name=queue_src_convert max-size-buffers=3 max-size-bytes=0 max-size-time=0 ! videoconvert n-threads=3 name=src_convert qos=false ! video/x-raw, format=RGB, width=640, height=640, pixel-aspect-ratio=1/1 ! tee name=t ! queue name=bypass_queue max-size-buffers=20 max-size-bytes=0 max-size-time=0 ! hmux.sink_0 t. ! queue name=queue_hailonet max-size-buffers=3 max-size-bytes=0 max-size-time=0 ! videoconvert n-threads=3 ! hailonet hef-path=/home/maheedhar/hailo-rpi5-examples/basic_pipelines/../resources/yolov6n.hef batch-size=2 nms-score-threshold=0.3 nms-iou-threshold=0.45 output-format-type=HAILO_FORMAT_TYPE_FLOAT32 force-writable=true ! queue name=queue_hailofilter max-size-buffers=3 max-size-bytes=0 max-size-time=0 ! hailofilter so-path=/usr/lib/aarch64-linux-gnu/hailo/tappas//post-process/libyolo_hailortpp_post.so  qos=false ! queue name=queue_hmuc max-size-buffers=3 max-size-bytes=0 max-size-time=0 ! hmux.sink_1 hmux. ! queue name=queue_hailo_python max-size-buffers=3 max-size-bytes=0 max-size-time=0 ! queue name=queue_user_callback max-size-buffers=3 max-size-bytes=0 max-size-time=0 ! identity name=identity_callback ! queue name=queue_hailooverlay max-size-buffers=3 max-size-bytes=0 max-size-time=0 ! hailooverlay ! queue name=queue_videoconvert max-size-buffers=3 max-size-bytes=0 max-size-time=0 ! videoconvert n-threads=3 qos=false ! queue name=queue_hailo_display max-size-buffers=3 max-size-bytes=0 max-size-time=0 ! fpsdisplaysink video-sink=xvimagesink name=hailo_display sync=false text-overlay=False signal-fps-measurements=true 
[0:00:33.128773609] [2074]  INFO Camera camera_manager.cpp:313 libcamera v0.3.0+65-6ddd79b5
[0:00:33.135920979] [2091]  INFO RPI pisp.cpp:695 libpisp version v1.0.6 b567f0455680 13-08-2024 (13:30:39)
[0:00:33.145148590] [2091]  INFO RPI pisp.cpp:1154 Registered camera /base/axi/pcie@120000/rp1/i2c@88000/imx296@1a to CFE device /dev/media0 and ISP device /dev/media1 using PiSP variant BCM2712_C0
Error: gst-stream-error-quark: Internal data stream error. (1), ../src/gstreamer/gstlibcamerasrc.cpp(646): gst_libcamera_src_task_enter (): /GstPipeline:pipeline0/GstLibcameraSrc:src_0:
streaming stopped, reason not-negotiated (-4)

Hey @mahadheer,

Welcome to the Hailo Community!

It looks like you’re encountering a mismatch between your GStreamer pipeline configuration and your hardware setup. Let’s break this down:

  1. Camera Compatibility:
  • First, verify that your CCTV camera is fully compatible with the Raspberry Pi and libcamera framework. Not all cameras work out of the box, and some may need specific drivers or settings.
  1. GStreamer Pipeline Analysis:
  • The ‘not-negotiated’ error suggests a capability mismatch between pipeline elements. This could be due to unsupported resolutions, formats, or framerates. Let’s examine your pipeline: a) Check if your camera supports the initial format and resolution: video/x-raw, format=RGB, width=1536, height=864 b) Verify if the subsequent scaling operations are valid: video/x-raw, format=RGB, width=640, height=640, framerate=30/1 c) Ensure all elements in the pipeline are compatible, paying special attention to format transitions and resolutions.
  1. Troubleshooting Steps:
  • Try simplifying the pipeline to isolate the issue. Start with just the camera source and a simple sink, then gradually add elements back.
  • Use ‘gst-inspect-1.0’ to check the capabilities of each element in your pipeline.
  • Consider using ‘gst-launch-1.0’ with the ‘-v’ flag to get more verbose output for debugging.