Libcam octopi Arducam 16MP autofocus, following the instructions

Looking for ideas - I have followed the guide to the letter, no updates, but something is still missing. The libcamera takes a still photo, but OctoPrint doesn’t show the stream. Any help is welcome!

Test step:

libcamera-still -t 5000 -o test.jpg -n

The image is created, also verified through SFTP.

[0:01:25.674784384] [3730]  INFO Camera camera_manager.cpp:293 libcamera v0.0.0+3896-6019b245
[0:01:25.696607538] [3732]  WARN CameraSensorProperties camera_sensor_properties.cpp:174 No static properties available for 'imx519'
[0:01:25.696695834] [3732]  WARN CameraSensorProperties camera_sensor_properties.cpp:176 Please consider updating the camera sensor properties database
[0:01:25.720081883] [3732]  WARN RPI raspberrypi.cpp:1280 Mismatch between Unicam and CamHelper for embedded data usage!
[0:01:25.721188375] [3732] ERROR DelayedControls delayed_controls.cpp:87 Delay request for control id 0x009a090a but control is not exposed by device /dev/v4l-subdev0
[0:01:25.721499521] [3732]  INFO RPI raspberrypi.cpp:1404 Registered camera /base/soc/i2c0mux/i2c@1/imx519@1a to Unicam device /dev/media0 and ISP device /dev/media1
[0:01:25.722236090] [3730]  INFO Camera camera.cpp:1035 configuring streams: (0) 2328x1748-YUV420
[0:01:25.722805400] [3732]  INFO RPI raspberrypi.cpp:765 Sensor: /base/soc/i2c0mux/i2c@1/imx519@1a - Selected sensor format: 2328x1748-SRGGB10_1X10 - Selected unicam format: 2328x1748-pRAA
[0:01:30.952794114] [3730]  INFO Camera camera.cpp:1035 configuring streams: (0) 4656x3496-YUV420 (1) 4656x3496-SRGGB10_CSI2P
[0:01:30.984600519] [3732]  INFO RPI raspberrypi.cpp:765 Sensor: /base/soc/i2c0mux/i2c@1/imx519@1a - Selected sensor format: 4656x3496-SRGGB10_1X10 - Selected unicam format: 4656x3496-pRAA
Still capture image received

After launching OctoPrinter the stream at http://octopi.local/webcam/?action=stream doesn’t show.

OctoPrint:

Octopi.txt:

### Windows users: To edit this file use Notepad++, VSCode, Atom or SublimeText.
### Do not use Notepad or WordPad.

### MacOSX users: If you use Textedit to edit this file make sure to use 
### "plain text format" and "disable smart quotes" in "Textedit > Preferences"

### Configure which camera to use
#
# Available options are:
# - auto: tries first usb webcam, if that's not available tries raspi cam
# - usb: only tries usb webcam
# - raspi: only tries raspi cam
#
# Defaults to auto
#
#camera="auto"

### Additional options to supply to MJPG Streamer for the USB camera
#
# See https://faq.octoprint.org/mjpg-streamer-config for available options
#
# Defaults to a resolution of 640x480 px and a framerate of 10 fps
#
#camera_usb_options="-r 640x480 -f 10"

### Additional webcam devices known to cause problems with -f
#
# Apparently there a some devices out there that with the current 
# mjpg_streamer release do not support the -f parameter (for specifying 
# the capturing framerate) and will just refuse to output an image if it 
# is supplied.
#
# The webcam daemon will detect those devices by their USB Vendor and Product
# ID and remove the -f parameter from the options provided to mjpg_streamer.
#
# By default, this is done for the following devices:
#   Logitech C170 (046d:082b)
#   GEMBIRD (1908:2310)
#   Genius F100 (0458:708c)
#   Cubeternet GL-UPC822 UVC WebCam (1e4e:0102)
#
# Using the following option it is possible to add additional devices. If
# your webcam happens to show above symptoms, try determining your cam's
# vendor and product id via lsusb, activating the line below by removing # and 
# adding it, e.g. for two broken cameras "aabb:ccdd" and "aabb:eeff"
#
#   additional_brokenfps_usb_devices=("aabb:ccdd" "aabb:eeff")
#
# If this fixes your problem, please report it back so we can include the device
# out of the box: https://github.com/guysoft/OctoPi/issues
#
#additional_brokenfps_usb_devices=()

### Additional options to supply to MJPG Streamer for the RasPi Cam
#
# See https://faq.octoprint.org/mjpg-streamer-config for available options.
#
# NOTE: Newer raspi cam modules are reporting as usb devices causing these
#       options to be ignored. Set `camera="raspi"` to avoid these issues.
#
# Defaults to 10fps
#
#camera_raspi_options="-fps 10"

### Configuration of camera HTTP output
#
# Usually you should NOT need to change this at all! Only touch if you
# know what you are doing and what the parameters mean.
#
# Below settings are used in the mjpg-streamer call like this:
#
#   -o "output_http.so -w $camera_http_webroot $camera_http_options"
#
# Current working directory is the mjpg-streamer base directory.
#
camera_http_webroot="./www"
camera_http_options=""

# Configuration of network monitoring
#
# This enables network monitoring for wifi connections with a simple ping test.
# If connection terminates by variable reasons system tries to restart the wifi connection to reestablish a connection.
# The connection test is done every minute.
# By default it is disabled (0 = off / 1 = on)
# dstination_host can be an ip address or a hostname (for hostname ensure dns resosultion is working correctly)
enable_network_monitor=0
destination_host=192.168.1.1

### EXPERIMENTAL
# Support for different streamer types.
#
# Available options:
#   mjpeg [default] - stable MJPG-streamer
#   hls - experimental FFMPEG HLS streamer
#camera_streamer=mjpeg
camera="libcamera"
camera_libcamera_options="-r 1280x720 -f 15"

@kanapala

Your service did not start correctly.

Hold on a second, I’ll give you a command to verify.

@kanapala

Please use the following command:

systemctl status webcamd.service

Please send me the output information to look at.

1 Like

@Edward
Thaks for yourr reply, here`s the output:

systemctl status webcamd.service
● webcamd.service - the OctoPi webcam daemon with the user specified config
     Loaded: loaded (/etc/systemd/system/webcamd.service; enabled; vendor preset: enabled)
     Active: activating (start) since Sat 2022-10-08 20:24:41 CEST; 55s ago
Cntrl PID: 1139 (webcamd)
      Tasks: 2 (limit: 4915)
        CPU: 154ms
     CGroup: /system.slice/webcamd.service
             ├─1139 /bin/bash /root/bin/webcamd
             └─1174 sleep 120

Oct 08 20:24:41 potatoprinter systemd[1]: Starting the OctoPi webcam daemon with the user specified config...
Oct 08 20:24:41 potatoprinter root[1150]: Starting Libcamera camera
Oct 08 20:24:41 potatoprinter mjpg_streamer[1151]: MJPG-streamer [1151]: starting application
Oct 08 20:24:41 potatoprinter mjpg_streamer[1151]: MJPG-streamer [1151]: MJPG Streamer Version: git rev: d3bb80e4061d5d0>
Oct 08 20:24:41 potatoprinter mjpg_streamer[1151]: MJPG-streamer [1151]: ERROR: could not find input plugin
Oct 08 20:24:41 potatoprinter mjpg_streamer[1151]: MJPG-streamer [1151]:        Perhaps you want to adjust the search pa>
Oct 08 20:24:41 potatoprinter mjpg_streamer[1151]: MJPG-streamer [1151]:        # export LD_LIBRARY_PATH=/path/to/plugin>
Oct 08 20:24:41 potatoprinter mjpg_streamer[1151]: MJPG-streamer [1151]:        dlopen: input_libcamera.so: cannot open >

@kanapala

ERROR: could not find input plugin
It seems that the plugin was not installed successfully.

What steps did you follow to install this plugin.

Hey!
I followed the Guide by Wong exactly, to the best of my understanding.

Hey,
it seems that choosing english US as locale in Raspberry Pi Imager resolved the install script not working. I got the idea from the forums somewhere, different languages, different " symbols. I have it streaming in OctoPrint

Allthough the test is not working:

libcamera-still -t 5000 -o test.jpg -n
[0:02:19.968905828] [3942]  INFO Camera camera_manager.cpp:293 libcamera v0.0.0+3896-6019b245
[0:02:19.971808739] [3944] ERROR V4L2 v4l2_device.cpp:349 'imx519 10-001a': Unable to set controls: Device or resource busy
[0:02:19.972844051] [3944]  WARN CameraSensorProperties camera_sensor_properties.cpp:174 No static properties available for 'imx519'
[0:02:19.972919961] [3944]  WARN CameraSensorProperties camera_sensor_properties.cpp:176 Please consider updating the camera sensor properties database
[0:02:19.989228108] [3944]  WARN RPI raspberrypi.cpp:1280 Mismatch between Unicam and CamHelper for embedded data usage!
[0:02:19.990331885] [3944] ERROR DelayedControls delayed_controls.cpp:87 Delay request for control id 0x009a090a but control is not exposed by device /dev/v4l-subdev0
[0:02:19.990557837] [3944]  INFO RPI raspberrypi.cpp:1404 Registered camera /base/soc/i2c0mux/i2c@1/imx519@1a to Unicam device /dev/media1 and ISP device /dev/media0
[0:02:19.990722305] [3942]  INFO Camera camera.cpp:848 Pipeline handler in use by another process
[0:02:19.991278786] [3944] ERROR V4L2 v4l2_videodevice.cpp:1234 /dev/video0[14:cap]: Unable to request 0 buffers: Device or resource busy
[0:02:19.991376030] [3944] ERROR V4L2 v4l2_videodevice.cpp:1234 /dev/video13[15:out]: Unable to request 0 buffers: Device or resource busy
[0:02:19.991447810] [3944] ERROR V4L2 v4l2_videodevice.cpp:1234 /dev/video14[16:cap]: Unable to request 0 buffers: Device or resource busy
[0:02:19.991515424] [3944] ERROR V4L2 v4l2_videodevice.cpp:1234 /dev/video15[17:cap]: Unable to request 0 buffers: Device or resource busy
[0:02:19.991583481] [3944] ERROR V4L2 v4l2_videodevice.cpp:1234 /dev/video16[18:cap]: Unable to request 0 buffers: Device or resource busy
[0:02:19.991675021] [3944] ERROR V4L2 v4l2_videodevice.cpp:1234 /dev/video16[18:cap]: Unable to request 0 buffers: Device or resource busy
[0:02:19.991776580] [3944] ERROR V4L2 v4l2_videodevice.cpp:1234 /dev/video15[17:cap]: Unable to request 0 buffers: Device or resource busy
[0:02:19.991857787] [3944] ERROR V4L2 v4l2_videodevice.cpp:1234 /dev/video14[16:cap]: Unable to request 0 buffers: Device or resource busy
[0:02:19.991939234] [3944] ERROR V4L2 v4l2_videodevice.cpp:1234 /dev/video13[15:out]: Unable to request 0 buffers: Device or resource busy
[0:02:19.992037256] [3944] ERROR V4L2 v4l2_videodevice.cpp:1234 /dev/video0[14:cap]: Unable to request 0 buffers: Device or resource busy
ERROR: *** failed to acquire camera /base/soc/i2c0mux/i2c@1/imx519@1a ***```

...

@kanapala

It seems that the service has been started, can you look at the current status again?

systemctl status webcamd.service

Hi! Here’s the output:

systemctl status webcamd.service
● webcamd.service - the OctoPi webcam daemon with the user specified config
     Loaded: loaded (/etc/systemd/system/webcamd.service; enabled; vendor preset: enabled)
     Active: active (running) since Mon 2022-10-10 06:32:32 CEST; 11h ago
   Main PID: 575 (webcamd)
      Tasks: 8 (limit: 4915)
        CPU: 3min 43.738s
     CGroup: /system.slice/webcamd.service
             ├─575 /bin/bash /root/bin/webcamd
             └─600 ./mjpg_streamer -o output_http.so -w ./www  -i input_libcamera.so

Oct 10 06:32:32 potatoprinter mjpg_streamer[600]: MJPG-streamer [600]: starting application
Oct 10 06:32:32 potatoprinter mjpg_streamer[600]: MJPG-streamer [600]: MJPG Streamer Version: git rev: 059c60a49d01b1276>
Oct 10 06:32:33 potatoprinter mjpg_streamer[600]: MJPG-streamer [600]: Desired Resolution: 640 x 480
Oct 10 06:32:33 potatoprinter mjpg_streamer[600]: MJPG-streamer [600]: www-folder-path......: ./www/
Oct 10 06:32:33 potatoprinter mjpg_streamer[600]: MJPG-streamer [600]: HTTP TCP port........: 8080
Oct 10 06:32:33 potatoprinter mjpg_streamer[600]: MJPG-streamer [600]: HTTP Listen Address..: (null)
Oct 10 06:32:33 potatoprinter mjpg_streamer[600]: MJPG-streamer [600]: username:password....: disabled
Oct 10 06:32:33 potatoprinter mjpg_streamer[600]: MJPG-streamer [600]: commands.............: enabled
Oct 10 06:32:33 potatoprinter mjpg_streamer[600]: MJPG-streamer [600]: starting input plugin input_libcamera.so
Oct 10 06:32:33 potatoprinter mjpg_streamer[600]: MJPG-streamer [600]: starting output plugin: output_http.so (ID: 00)
lines 1-20/20 (END)

@kanapala

Your service has started successfully.
You can access the camera from another computer by opening a browser and entering the ipv4 address of your Raspberry Pi.

I guess I can’t run the test libcamera-still -t 5000 -o test.jpg -n while it is already busy streaming?

@kanapala

Your service has been started.Your camera is being used and you can’t call from the command line.

Please enter your Raspberry Pi ipv4 address into the browser for preview and control.