Gstreamer app issues

Hey, community, I want to test the Gstreamer application you gave for detection using Python and Gstreamer. After solving all the community members’ problems, I had something new: gst_parse_error: could not link queue_hailonet to hailonet0. Now, I am trying to run it on video to pretend confuses with cameras and on models from hailo_model_zoo.
Tell me how to solve this problem, please.

Since you’re trying to run the GStreamer application on a video file instead of a live camera feed, and you’re using models from the hailo_model_zoo, here’s how you can troubleshoot and resolve the issue:

1. Ensure the Video Input is Correct:

When switching from a camera to a video file, make sure that your GStreamer pipeline properly handles the video source. Instead of using a camera input (v4l2src), you should use filesrc for video files and then decode it using the appropriate decoder for the format of your video file.

For example, if you are using a .mp4 video, your GStreamer pipeline should look something like this:

filesrc location=/path/to/your/video.mp4 ! decodebin ! videoconvert ! video/x-raw,format=RGB ! queue_hailonet ! hailonet0 ...

Replace /path/to/your/video.mp4 with the actual path to your video file.

2. Check the Linking Error:

The error gst_parse_error: could not link queue_hailonet to hailonet0 suggests that GStreamer is unable to link the queue_hailonet element with hailonet0. This could be due to:

  • A mismatch in the formats (caps) between the elements.
  • A missing element in the pipeline that converts formats between these stages.

To resolve this:

  • Add a capsfilter between the elements to ensure that the video formats are compatible. You can try something like this:

    ... ! video/x-raw,format=RGB,width=1280,height=720 ! queue_hailonet ! hailonet0 ...
    

    Adjust the width and height based on your model’s expected input size (you can find this in the model’s configuration in the Hailo Model Zoo).

3. Model Compatibility:

Ensure the model you’re using from the hailo_model_zoo is compatible with the pipeline. Models from the Hailo Model Zoo may require specific input sizes or formats. Check the model’s expected input format and adjust the pipeline accordingly.

For example, if the model expects a 416x416 RGB input, make sure your pipeline includes a resizing step:

... ! videoscale ! video/x-raw,width=416,height=416 ! videoconvert ! queue_hailonet ! hailonet0 ...

Let me know how it goes or if you encounter any other issues! I’d be happy to assist further.

@omria, thank you for the fast response. I changed the input to a USB camera because that is the best and most transparent way to run your pipeline and then get this.

Could not load lib /home/user/tappas_v3.30.0/apps/h8/gstreamer/resources/hef/ssd_mobilenet_v1.hef/libyolo_hailortpp_post.so: cannot open shared object file: Not a directory
Cannot load symbol: /opt/hailo/tappas/lib/aarch64-linux-gnu/gstreamer-1.0/libgsthailotools.so: undefined symbol: yolov5
Segmentation fault

Is it my fault for setting the environment or installing the Tappas, or are there some pipeline troubles? Thank you!

Hey @ighgul,

Thanks for providing more details about your situation. It looks like you’re facing some library and environment issues with Tappas after switching to a USB camera input. Let’s break down the problems and solutions:

  1. Library Load Error (libyolo_hailortpp_post.so):
    The error suggests GStreamer can’t find or load the post-processing library. To fix this:

    • Verify the path: /home/user/tappas_v3.30.0/apps/h8/gstreamer/resources/hef/ssd_mobilenet_v1.hef/ exists and contains libyolo_hailortpp_post.so.
    • If the file is missing, try reinstalling Tappas:
      cd /home/user/tappas_v3.30.0/
      sudo ./install.sh
      
  2. Undefined Symbol Error (libgsthailotools.so):
    This error indicates a problem with YOLOv5-related libraries. To resolve:

    • Ensure all YOLOv5 libraries are properly installed and compatible with your Tappas version.
    • Rebuild GStreamer plugins:
      cd /opt/hailo/tappas/
      make clean
      make all
      
  3. Segmentation Fault:
    This is likely caused by the unresolved symbol error. To address:

    • Check environment variables:
      echo $LD_LIBRARY_PATH
      echo $GST_PLUGIN_PATH
      
      Ensure these point to Tappas libraries and GStreamer plugins.
    • Test USB camera with GStreamer:
      gst-launch-1.0 v4l2src device=/dev/video0 ! videoconvert ! autovideosink
      
  4. GStreamer Pipeline Adjustments:
    Adapt your pipeline for USB camera input:

    gst-launch-1.0 v4l2src device=/dev/video0 ! videoconvert ! video/x-raw,format=RGB,width=640,height=480 ! queue_hailonet ! hailonet0 ...
    

    Ensure the camera feed format matches your Hailo model’s expectations.

  5. Verify Tappas Installation:
    Consider reinstalling Tappas:

    cd /path/to/tappas_v3.30.0
    sudo ./install.sh
    

Final Tips:

  • Double-check all required .so files and model dependencies are in the correct paths.
  • Rebuild GStreamer plugins to ensure proper linking of all components.
  • Thoroughly test the USB camera setup with GStreamer.

Let me know if these steps help resolve your issues or if you need more assistance!

@omria thank you for answering me. I have done all you say to do.
Moreover, I’ve install 3.19 version (previously work on 3.18) to check if something behaves in another way, answer is no, I still have this:

Could not load lib :/home/user/tappas_v3.30.0/apps/h8/gstreamer/resources/hef/ssd_mobilenet_v1.hef/libyolo_hailortpp_post.so: cannot open shared object file: No such file or directory
Cannot load symbol: /opt/hailo/tappas/lib/aarch64-linux-gnu/gstreamer-1.0/libgsthailotools.so: undefined symbol: yolov5
Segmentation fault

something that I can’t do in the way you describe or problems with these steps:

cd /opt/hailo/tappas/
make clean
make all

I don’t know what rules I should use for it:

make: *** No rule to make target 'clean'.  Stop.
make: *** No rule to make target 'all'.  Stop.

I cant catch what is the reason of this. Maybe you can help me with tip or something like this.

@omria reinstalled it to 4.18 and got an import error: Failed to import hailo python module. Make sure you are in hailo virtual environment., in details ImportError: libgsthailometa.so.3: cannot open shared object file: No such file or directory. This env see hailo lib:

hailo --version
HailoRT v4.18.0

@omria is it possible to solve this issues or maybe I’ve done something wrong?