Trying to connect rpi5 to edge impulse - getting error code 1

Question/Issue:
Seem to be having basic problem using edge-impulse-linux from RPI5. Used --disable-microphone (don’t have one), and the --verbose listing seemed to recognize the camera just fine, but keep getting “Failed to initialize linux tool Capture process failed with code 1”

Project ID:
Project is called: Bar Star Vision

Context/Use case:
Just trying to connect my RPI 5 to edge impulse project

Steps Taken:

  1. [Step 1] - used --disable-microphone
  2. [Step 2] - tested camera - works with libcamera
  3. [Step 3]

Expected Outcome:
Expected my RPI5 to be connected to my edge impulse (community version) project called “Bar Star Vision”

Actual Outcome:
Failed to initialize linux tool Capture process failed with code 1

Reproducibility:

  • [ ] Always

Environment:

  • Platform: [e.g., Raspberry Pi 5]

  • snooker5@raspberrypi:~ $ cat /etc/os-release
    PRETTY_NAME=“Debian GNU/Linux 12 (bookworm)”
    NAME=“Debian GNU/Linux”
    VERSION_ID=“12”
    VERSION=“12 (bookworm)”
    VERSION_CODENAME=bookworm
    ID=debian

  • Edge Impulse Version (Firmware):

** Maybe I need to download and install firmware???
** I did not do any kind of edge impulse deployment except for:

sudo apt update
curl -sL https://deb.nodesource.com/setup_20.x | sudo bash -
sudo apt install -y gcc g++ make build-essential nodejs sox gstreamer1.0-tools gstreamer1.0-plugins-good gstreamer1.0-plugins-base gstreamer1.0-plugins-base-apps
sudo npm install edge-impulse-linux -g --unsafe-perm

when I do “edge-impulse-linux”, I get the following:

Edge Impulse Linux client v1.12.0

? Select a microphone USB-Audio - CT002
[SER] Using microphone hw:2,0
[GST] checking for /etc/os-release
Failed to initialize linux tool Capture process failed with code 1

Including relevant parts of --verbose output

[GST] Starting gst-launch-1.0 with [
‘libcamerasrc’,
‘!’,
‘video/x-raw,width=640,height=480’,
‘!’,
‘videoconvert’,
‘!’,
‘jpegenc’,
‘!’,
‘multifilesink’,
‘location=test%05d.jpg’
]
[GST] Setting pipeline to PAUSED …

[GST] [1:04:43.764841246] [3511] INFO Camera camera_manager.cpp:327 libcamera v0.4.0+50-83cb8101

[GST] [1:04:43.773973943] [3514] INFO RPI pisp.cpp:720 libpisp version v1.1.0 e7974a156008 27-01-2025 (21:50:51)

[GST] [1:04:43.782849619] [3514] INFO RPI pisp.cpp:1179 Registered camera /base/axi/pcie@120000/rp1/i2c@88000/ov64a40@36 to CFE device /dev/media1 and ISP device /dev/media0 using PiSP variant BCM2712_C0

[GST] Pipeline is live and does not need PREROLL …
Pipeline is PREROLLED …
Setting pipeline to PLAYING …
New clock: GstSystemClock

[GST] [1:04:43.787759156] [3517] INFO Camera camera.cpp:1202 configuring streams: (0) 1920x1080-SRGGB16

[GST] [1:04:43.787986474] [3514] INFO RPI pisp.cpp:1484 Sensor: /base/axi/pcie@120000/rp1/i2c@88000/ov64a40@36 - Selected sensor format: 1920x1080-SRGGB10_1X10 - Selected CFE format: 1920x1080-RG16

[GST]
(gst-launch-1.0:3511): GStreamer-CRITICAL **: 18:46:51.818: gst_structure_set: assertion ‘structure != NULL’ failed

(gst-launch-1.0:3511): GStreamer-CRITICAL **: 18:46:51.819: gst_structure_set: assertion ‘structure != NULL’ failed

(gst-launch-1.0:3511): GStreamer-CRITICAL **: 18:46:51.819: gst_caps_get_structure: assertion ‘index < GST_CAPS_LEN (caps)’ failed

(gst-launch-1.0:3511): GStreamer-CRITICAL **: 18:46:51.819: gst_structure_set: assertion ‘structure != NULL’ failed

(gst-launch-1.0:3511): GStreamer-CRITICAL **: 18:46:51.819: gst_event_new_caps: assertion ‘gst_caps_is_fixed (caps)’ failed

(gst-launch-1.0:3511): GStreamer-CRITICAL **: 18:46:51.819: gst_pad_push_event: assertion ‘GST_IS_EVENT (event)’ failed
ERROR: from element /GstPipeline:pipeline0/GstLibcameraSrc:libcamerasrc0: Internal data stream error.
Additional debug info:
…/src/gstreamer/gstlibcamerasrc.cpp(662): gst_libcamera_src_task_enter (): /GstPipeline:pipeline0/GstLibcameraSrc:libcamerasrc0:
streaming stopped, reason not-negotiated (-4)

[GST] Execution ended after 0:00:00.006087829
Setting pipeline to NULL …

[GST] Freeing pipeline …

Failed to initialize linux tool Capture process failed with code 1

Should also mention that my RPI5 has an AI Hat on it as well.

I’m going to try to do connect to edge-impulse from a RPI4B in the morning and post the results. Might be just that simple.

I really do appreciate any comments anyone might have on all of this though. I’m new here and just getting started on my learning curve. Seems like really fun stuff.

Hey @snookersanders,

Can you try the following command and let me know if it works (and/or share the log)

edge-impulse-linux-runner --gst-launch-args "libcamerasrc ! video/x-raw,width=640,height=480,format=YUY2 ! videoconvert ! jpegenc"

If it doesn’t work can you share the log output of when you run libcamerasrc successfully? The more verbosity the better.

// Raul James

1 Like