Hello @kvamvake,
Which camera are you using?
Do you connect your camera using USB or the Camera Serial Interface (CSI)?
Also, what do you see when you run edge-impulse-linux --verbose?
Regards,
Louis
Hello @kvamvake,
Which camera are you using?
Do you connect your camera using USB or the Camera Serial Interface (CSI)?
Also, what do you see when you run edge-impulse-linux --verbose?
Regards,
Louis
Minute 1, goal 1… I have the same fault too, I’m using Logitech c270 usb web cam and my verbose output…
ubuntu@ubuntu:~$ edge-impulse-linux --verbose
Edge Impulse Linux client v1.3.1
[SER] Using microphone hw:1,0
[GST] Found devices: [
{
“id”: “”,
“name”: “UVC Camera (046d 0825)”,
“caps”: [
{
“type”: “video/x-raw”,
“width”: 640,
“height”: 480,
“framerate”: 30
},
{
“type”: “video/x-raw”,
“width”: 160,
“height”: 120,
“framerate”: 30
},
{
“type”: “video/x-raw”,
“width”: 176,
“height”: 144,
“framerate”: 30
},
{
“type”: “video/x-raw”,
“width”: 320,
“height”: 176,
“framerate”: 30
},
{
“type”: “video/x-raw”,
“width”: 320,
“height”: 240,
“framerate”: 30
},
{
“type”: “video/x-raw”,
“width”: 352,
“height”: 288,
“framerate”: 30
},
{
“type”: “video/x-raw”,
“width”: 432,
“height”: 240,
“framerate”: 30
},
{
“type”: “video/x-raw”,
“width”: 544,
“height”: 288,
“framerate”: 30
},
{
“type”: “video/x-raw”,
“width”: 640,
“height”: 360,
“framerate”: 30
},
{
“type”: “video/x-raw”,
“width”: 752,
“height”: 416,
“framerate”: 25
},
{
“type”: “video/x-raw”,
“width”: 800,
“height”: 448,
“framerate”: 20
},
{
“type”: “video/x-raw”,
“width”: 800,
“height”: 600,
“framerate”: 20
},
{
“type”: “video/x-raw”,
“width”: 864,
“height”: 480,
“framerate”: 20
},
{
“type”: “video/x-raw”,
“width”: 960,
“height”: 544,
“framerate”: 15
},
{
“type”: “video/x-raw”,
“width”: 960,
“height”: 720,
“framerate”: 10
},
{
“type”: “video/x-raw”,
“width”: 1024,
“height”: 576,
“framerate”: 10
},
{
“type”: “video/x-raw”,
“width”: 1184,
“height”: 656,
“framerate”: 10
},
{
“type”: “video/x-raw”,
“width”: 1280,
“height”: 720,
“framerate”: 15
},
{
“type”: “video/x-raw”,
“width”: 1280,
“height”: 960,
“framerate”: 15
}
]
}
]
[SER] Using camera UVC Camera (046d 0825) starting…
[GST] Starting gst-launch-1.0 with [
‘v4l2src’,
‘device=’,
‘!’,
‘video/x-raw,width=640,height=480’,
‘!’,
‘videoconvert’,
‘!’,
‘jpegenc’,
‘!’,
‘multifilesink’,
‘location=test%05d.jpg’
]
[GST]
(gst-launch-1.0:3756): GStreamer-CRITICAL **: 07:04:18.725: gst_element_make_from_uri: assertion ‘gst_uri_is_valid (uri)’ failed
[GST] WARNING: erroneous pipeline: no element “video”
Failed to initialize linux tool Capture process failed with code 1
ubuntu@ubuntu:~$
Raspi 4B,
Ubuntu 21.10 (GNU/Linux 5.13.0-1015-raspi aarch64)
Hey all,
I’ve got the same issue on Raspberry Pi 4 with Logitech Webcam C925e.
Until now I simply deployed my model using: edge-impulse-linux, and everything worked fine. But now I’m trying to run example-linux-with-twilio from GitHub. And I always get the error: Capture process failed with code 1. Anyone can help me? 
Here is what I got by running edge-impulse-linux --verbose:
Edge Impulse Linux client v1.3.3
[SER] Using microphone hw:1,0
[GST] Found devices: [
{
"id": "",
"name": "/base/scb/pcie@7d500000/pci@0,0/usb@0,0-1.1",
"caps": [
{
"type": "video/x-raw",
"width": 160,
"height": 90,
"framerate": 0
},
{
"type": "video/x-raw",
"width": 160,
"height": 120,
"framerate": 0
},
{
"type": "video/x-raw",
"width": 176,
"height": 144,
"framerate": 0
},
{
"type": "video/x-raw",
"width": 320,
"height": 180,
"framerate": 0
},
{
"type": "video/x-raw",
"width": 320,
"height": 240,
"framerate": 0
},
{
"type": "video/x-raw",
"width": 352,
"height": 288,
"framerate": 0
},
{
"type": "video/x-raw",
"width": 432,
"height": 240,
"framerate": 0
},
{
"type": "video/x-raw",
"width": 640,
"height": 360,
"framerate": 0
},
{
"type": "video/x-raw",
"width": 640,
"height": 480,
"framerate": 0
},
{
"type": "video/x-raw",
"width": 800,
"height": 448,
"framerate": 0
},
{
"type": "video/x-raw",
"width": 864,
"height": 480,
"framerate": 0
},
{
"type": "video/x-raw",
"width": 800,
"height": 600,
"framerate": 0
},
{
"type": "video/x-raw",
"width": 1024,
"height": 576,
"framerate": 0
},
{
"type": "video/x-raw",
"width": 960,
"height": 720,
"framerate": 0
},
{
"type": "video/x-raw",
"width": 1280,
"height": 720,
"framerate": 0
},
{
"type": "video/x-raw",
"width": 1600,
"height": 896,
"framerate": 0
},
{
"type": "video/x-raw",
"width": 1920,
"height": 1080,
"framerate": 0
},
{
"type": "video/x-raw",
"width": 2304,
"height": 1296,
"framerate": 0
},
{
"type": "video/x-raw",
"width": 2304,
"height": 1536,
"framerate": 0
}
]
},
{
"id": "/dev/video0",
"name": "UvcH264 Logitech Webcam C925e (/dev/video0)",
"caps": [
{
"type": "video/x-raw",
"width": 2304,
"height": 1536,
"framerate": 2
},
{
"type": "video/x-raw",
"width": 2304,
"height": 1296,
"framerate": 2
},
{
"type": "video/x-raw",
"width": 1920,
"height": 1080,
"framerate": 5
},
{
"type": "video/x-raw",
"width": 1600,
"height": 896,
"framerate": 15
},
{
"type": "video/x-raw",
"width": 1280,
"height": 720,
"framerate": 10
},
{
"type": "video/x-raw",
"width": 960,
"height": 720,
"framerate": 15
},
{
"type": "video/x-raw",
"width": 1024,
"height": 576,
"framerate": 15
},
{
"type": "video/x-raw",
"width": 800,
"height": 600,
"framerate": 24
},
{
"type": "video/x-raw",
"width": 864,
"height": 480,
"framerate": 24
},
{
"type": "video/x-raw",
"width": 800,
"height": 448,
"framerate": 30
},
{
"type": "video/x-raw",
"width": 640,
"height": 480,
"framerate": 30
},
{
"type": "video/x-raw",
"width": 640,
"height": 360,
"framerate": 30
},
{
"type": "video/x-raw",
"width": 432,
"height": 240,
"framerate": 30
},
{
"type": "video/x-raw",
"width": 352,
"height": 288,
"framerate": 30
},
{
"type": "video/x-raw",
"width": 320,
"height": 240,
"framerate": 30
},
{
"type": "video/x-raw",
"width": 320,
"height": 180,
"framerate": 30
},
{
"type": "video/x-raw",
"width": 176,
"height": 144,
"framerate": 30
},
{
"type": "video/x-raw",
"width": 160,
"height": 120,
"framerate": 30
},
{
"type": "video/x-raw",
"width": 160,
"height": 90,
"framerate": 30
}
]
}
]
[SER] Using camera UvcH264 Logitech Webcam C925e (/dev/video0) starting...
[GST] Starting gst-launch-1.0 with [
'uvch264src',
'device=/dev/video0',
'!',
'video/x-raw,width=640,height=480',
'!',
'videoconvert',
'!',
'jpegenc',
'!',
'multifilesink',
'location=test%05d.jpg'
]
[GST] Setting pipeline to PAUSED ...
[GST] Pipeline is live and does not need PREROLL ...
[GST] Pipeline is PREROLLED ...
Setting pipeline to PLAYING ...
[GST] New clock: GstSystemClock
[GST] ERROR: from element /GstPipeline:pipeline0/GstUvcH264Src:uvch264src0/GstV4l2Src:v4l2src0: Device '/dev/video0' is busy
Additional debug info:
../sys/v4l2/gstv4l2object.c(3969): gst_v4l2_object_set_format_full (): /GstPipeline:pipeline0/GstUvcH264Src:uvch264src0/GstV4l2Src:v4l2src0:
Call to S_FMT failed for YUYV @ 640x480: Device or resource busy
[GST] ERROR: from element /GstPipeline:pipeline0/GstUvcH264Src:uvch264src0/GstV4l2Src:v4l2src0: Internal data stream error.
Additional debug info:
../libs/gst/base/gstbasesrc.c(3127): gst_base_src_loop (): /GstPipeline:pipeline0/GstUvcH264Src:uvch264src0/GstV4l2Src:v4l2src0:
streaming stopped, reason not-negotiated (-4)
[GST] Execution ended after 0:00:00.005324008
Setting pipeline to NULL ...
[GST] Freeing pipeline ...
Failed to initialize linux tool Capture process failed with code 1
facing same problem but on linux on running: “edge-impulse-linux” in terminal.
The terminal output.
`
Edge Impulse Linux client v1.4.1
[SER] Using microphone hw:0,0
[SER] Using camera Integrated_Webcam_HD starting...
Failed to initialize linux tool Capture process failed with code 1
`
I have this error
Failed to initialize linux tool first photo was not created within 20 second
Help plzz !!
Camera raspberry pi v1.3
Hello @FIRAS,
Maybe this thread can help you: Using raspberry pi camera - #2 by louis
Let me know if it fixes your issue.
Best,
Louis
Actually I have the same problem too
Error: “failed to run impulse capture process failed with code 1”
How to solve this problem would anyone like to share ??
Hello i am having the same problem. my error message is:
[SER] Using microphone hw:1,0
[GST] checking for /etc/os-release
Failed to initialize linux tool Capture process failed with code 1
I am using camera Arducam 12MP IMX708, Raspberry Pi 5 with Bookworm.
the camera works perfectly fine in the command line with rpicam
For RPI5, make sure you install: sudo apt install -y gstreamer1.0-libcamera
Then look for your device with : gst-device-monitor-1.0
Device found:
name : /base/axi/pcie@1000120000/rp1/usb@200000-2:1.0-03f0:654a
class : Source/Video
caps : image/jpeg, width=160, height=120
image/jpeg, width=320, height=240
image/jpeg, width=640, height=360
image/jpeg, width=640, height=480
image/jpeg, width=800, height=600
image/jpeg, width=1024, height=768
image/jpeg, width=1280, height=720
image/jpeg, width=1920, height=1080
image/jpeg, width=2560, height=1440
image/jpeg, width=2592, height=1944
video/x-raw, format=YUY2, width=160, height=120
video/x-raw, format=YUY2, width=320, height=240
video/x-raw, format=YUY2, width=640, height=360
video/x-raw, format=YUY2, width=640, height=480
video/x-raw, format=YUY2, width=800, height=600
video/x-raw, format=YUY2, width=1024, height=768
video/x-raw, format=YUY2, width=1280, height=720
video/x-raw, format=YUY2, width=1920, height=1080
video/x-raw, format=YUY2, width=2560, height=1440
video/x-raw, format=YUY2, width=2592, height=1944
gst-launch-1.0 libcamerasrc camera-name="/base/axi/pcie\@1000120000/rp1/usb\@200000-2:1.0-03f0:654a" ! ...
Grab the camera-name section and start edge-impulse-linux with:
edge-impulse-linux --gst-launch-args "libcamerasrc camera-name="/base/axi/pcie\@1000120000/rp1/usb\@200000-2:1.0-03f0:654a" ! video/x-raw,width=640,height=480,format=YUY2 ! videoconvert ! jpegenc"
I was having the same problem starting Edge Impulse on Arduino Uno Q until I plugged in two cameras to my USB-C hub, then I was prompted on which camera to use and it started up properly.
Hey @CapperLabs first of all welcome to the Edge Impulse community!
how did you run Edge Impulse? Did you use the command
edge-impulse-linux --gst-launch-args "libcamerasrc camera-name="/base/axi/pcie\@1000120000/rp1/usb\@200000-2:1.0-03f0:654a" ! video/x-raw,width=640,height=480,format=YUY2 ! videoconvert ! jpegenc"
or similar?
That didn’t work for me. When I ran
gst-device-monitor-1.0 The name of the device was “Streaming Camera: Streaming Cam”
and if I tried to use that name in the edge-impulse-linux command it didn’t like the colon and the spaces in the name and gave me an error “could not find device Streaming”
However, when I plugged in two cameras, then when I ran edge-impulse-linux with no args, it gave me a choice of the two cameras \dev\video0 and \dev\video3, and then connected to edge impulse correctly.
Thanks for sharing @CapperLabs
Could you please share more details about your cameras? Did you try with 1 or the other? What do you get when you try gst-device-monitor-1.0 with each one separated? and together?
Please do share all the logs here!
I will do some experiments with different configurations and capture the screens for you this week. I’m using the Arduino Uno Q and a ABIWAZY 9-n-1 USB-C hub. I have a few different cameras I can try. I have never used Edge Impulse before this project, so I’m still learning.
Tonight’s session log…
With no camera and the Q just plugged into the PC USB-C port this command works:
arduino@Q:~$ edge-impulse-linux --disable-microphone --disable-camera
If I plug in the first camera (no name webcam - Device USB\VID_0C45&PID_636B&MI_00\8&315a9f63&0&0000)
arduino@Q:~$ edge-impulse-linux
Edge Impulse Linux client v1.20.1[SER] Using microphone hw:0,0
[GST] checking for /etc/os-release
Failed to initialize linux tool Capture process failed with code 1command: gst-launch-1.0 v4l2src device=/dev/video0 ! video/x-raw,width=640,height=480 ! videoconvert ! jpegenc ! multifilesink location=resized%05d.jpg post-messages=true sync=false
Re-run this command with --verbose to enable debug logs
arduino@Q:~$
arduino@Q:~$ gst-device-monitor-1.0
Probing devices…
Device found:
name : Streaming Camera: Streaming Cam
class : Video/Source
…cut some lines here
udev-probed = true
device.bus_path = platform-xhci-hcd.2.auto-usb-0:1.3.4:1.0
sysfs.path = /sys/devices/platform/soc@0/4ef8800.usb/4e00000.usb/xhci-hcd.2.auto/usb1/1-1/1-1.3/1-1.3.4/1-1.3.4:1.0/video4linux/video0
device.bus = usb
device.subsystem = video4linux
device.vendor.id = 0c45
device.vendor.name = SONix\x20Technology\x20Co.\x2c\x20Ltd.
device.product.id = 636b
device.product.name = Streaming Camera: Streaming Cam
device.serial = SONix_Technology_Co.__Ltd._Streaming_Camera_SN0001
device.capabilities = :capture:
device.api = v4l2
device.path = /dev/video0
v4l2.device.driver = uvcvideo
v4l2.device.card = Streaming Camera: Streaming Cam
v4l2.device.bus_info = usb-xhci-hcd.2.auto-1.3.4
v4l2.device.version = 397312 (0x00061000)
v4l2.device.capabilities = 2225078273 (0x84a00001)
v4l2.device.device_caps = 69206017 (0x04200001)
gst-launch-1.0 v4l2src ! …
arduino@Q:~$ edge-impulse-linux --gst-launch-args “libcamerasrc camera-name=“Streaming Camera: Streaming Cam””
Edge Impulse Linux client v1.20.1
[SER] Using microphone hw:0,0
[GST] checking for /etc/os-release
Failed to initialize linux tool Capture process failed with code 1
command: gst-launch-1.0 libcamerasrc camera-name=Streaming ! multifilesink location=resized%05d.jpg post-messages=true sync=false
Re-run this command with --verbose to enable debug logs
arduino@Q:~$
If I plug in both cameras - the first time it gave me a choice, this time it just started video0.
arduino@Q:~$ edge-impulse-linux
Edge Impulse Linux client v1.20.1[SER] Using microphone hw:0,0
[GST] checking for /etc/os-release
[SER] Connected to camera Streaming Camera: Streaming Cam (/dev/video0)
[SER] Connected to camera Streaming Camera: Streaming Cam (/dev/video0)
[WS ] Connecting to wss://remote-mgmt.edgeimpulse.com
[WS ] Connected to wss://remote-mgmt.edgeimpulse.com
[WS ] Device “Q” is now connected to project “CapperLabs-Sensor-Fusion-Challenge”. To connect to another project, runedge-impulse-linux --clean.
[WS ] Go to Login - Edge Impulse to build your machine learning model!
The second camera is a Logitech C920
arduino@Q:~$ gst-device-monitor-1.0
Probing devices…
Device found:
name : HD Pro Webcam C920
class : Video/Source
…cut some lines here
udev-probed = true
device.bus_path = platform-xhci-hcd.2.auto-usb-0:1.3.2:1.0
sysfs.path = /sys/devices/platform/soc@0/4ef8800.usb/4e00000.usb/xhci-hcd.2.auto/usb1/1-1/1-1.3/1-1.3.2/1-1.3.2:1.0/video4linux/video3
device.bus = usb
device.subsystem = video4linux
device.vendor.id = 046d
device.vendor.name = 046d
device.product.id = 082d
device.product.name = HD Pro Webcam C920
device.serial = 046d_HD_Pro_Webcam_C920_B58C4E9F
device.capabilities = :capture:
device.api = v4l2
device.path = /dev/video3
v4l2.device.driver = uvcvideo
v4l2.device.card = HD Pro Webcam C920
v4l2.device.bus_info = usb-xhci-hcd.2.auto-1.3.2
v4l2.device.version = 397312 (0x00061000)
v4l2.device.capabilities = 2225078273 (0x84a00001)
v4l2.device.device_caps = 69206017 (0x04200001)
gst-launch-1.0 v4l2src device=/dev/video3 ! …
If I just use the Logitech camera, it works the first time
arduino@Q:~$ edge-impulse-linux
Edge Impulse Linux client v1.20.1? Select a microphone USB-Audio - HD Pro Webcam C920
[SER] Using microphone hw:0,0
[GST] checking for /etc/os-release
[SER] Connected to camera HD Pro Webcam C920 (/dev/video0)
[SER] Connected to camera HD Pro Webcam C920 (/dev/video0)
[WS ] Connecting to wss://remote-mgmt.edgeimpulse.com
[WS ] Connected to wss://remote-mgmt.edgeimpulse.com
[WS ] Device “Q” is now connected to project “CapperLabs-Sensor-Fusion-Challenge”. To connect to another project, runedge-impulse-linux --clean.
[WS ] Go to Login - Edge Impulse to build your machine learning model!
I noticed that if there is no hub or webcam attached, it doesn’t see the Q microphone, but if a camera is plugged in then it gives me a choice
? Select a microphone (Use arrow keys)
❯ USB-Audio - HD Pro Webcam C920
qcm2290 - Arduino-Imola-HPH-LOUT