pi-camera icon indicating copy to clipboard operation
pi-camera copied to clipboard

Replace raspistill dependency with libcamera

Open tgraupmann opened this issue 3 years ago • 1 comments

After setting up a new RPI, it turns out raspistill is no longer installed by default.

ERROR: /bin/sh: 1: raspistill: not found

https://www.tomshardware.com/how-to/use-raspberry-pi-camera-with-bullseye

Is there any plans to switch to using libcamera? https://www.raspberrypi.com/documentation/accessories/camera.html#libcamera-and-libcamera-apps

OS

cat /etc/os-release
PRETTY_NAME="Raspbian GNU/Linux 11 (bullseye)"
NAME="Raspbian GNU/Linux"
VERSION_ID="11"
VERSION="11 (bullseye)"
VERSION_CODENAME=bullseye
ID=raspbian
ID_LIKE=debian
HOME_URL="http://www.raspbian.org/"
SUPPORT_URL="http://www.raspbian.org/RaspbianForums"
BUG_REPORT_URL="http://www.raspbian.org/RaspbianBugs"

tgraupmann avatar Jan 02 '22 01:01 tgraupmann

It looks like I can just change the hardcoded raspistill to libcamera-still in node_modules/pi_camera/index.js.

Not all of the same parameters are going to work with the new libcamera library.

I did have to enable Glamor in the advanced settings for libcamera-hello to work. https://forums.raspberrypi.com/viewtopic.php?t=323547

A workaround is to open a terminal, run "sudo raspi-config", navigate to "Advanced Options" and enable "Glamor" graphic acceleration. Then reboot your Pi.

Now I just have to get it to detect the camera...

Camera ERROR: [0:11:48.028249427] [3702]  INFO Camera camera_manager.cpp:293 libcamera v0.0.0+3156-f4070274
ERROR: *** no cameras available ***
$ sudo vcgencmd get_camera
supported=1 detected=1

I ended up doing an upgrade and continue to use raspistill. libcamera doesn't seem to be ready for primetime.... yet.

sudo apt-get -y dist-upgrade

tgraupmann avatar Jan 02 '22 01:01 tgraupmann