×

INDI Library v2.0.7 is Released (01 Apr 2024)

Bi-monthly release with minor bug fixes and improvements

INDI LibCamera Driver

  • Posts: 64
  • Thank you received: 10

Replied by Axel on topic INDI LibCamera Driver

Hi Jasem,

thanks a lot.

> Jasem Mutlaq post=98771: I pushed an update to indi-libcamera package yesterday, did you install that version? There was an update to rpicam-apps as well. Make sure to run this:
<code>sudo apt-get update && sudo apt-get -y dist-upgrade
</code>[/quote]

I did my test yesterday (here is CEST, so only 2 hours difference). Probably things got mixed up. Now I just did an upgrade and got a lot of indi drivers, but no indi-libcamera. And I now know why ...
stellarmate@stellarmate:~ $ dpkg -l indi-libcamera
dpkg-query: no packages found matching indi-libcamera
stellarmate@stellarmate:~ $ apt-cache search libcam | grep indi
python3-libcamera - complex camera support library (Python bindings)
indi-libcamera - INDI driver for cameras accessible via libcamera.
indi-libcamera-dbg - INDI driver for cameras accessible via libcamera.

:huh: Seems there had been no such module installed. Me culpa mea maxima culpa.
stellarmate@stellarmate:~ $ sudo apt install indi-libcamera
[...]
The following NEW packages will be installed:
  indi-libcamera
[...]
Setting up indi-libcamera (1.1+z+stable~202402051324) ...

Test:
- After starting Stellarmate I could select the driver LibCamera imx477 (see photo). Good.
- Taking photo leads to an abort
- I changed the image type in the Stellarmate App from DNG (default) to JPG and could take a photo.
- After fidling around with the filetype in EKOS (VNC), I got only "scrambled eggs" :-)
- rebooted. Captured OK (JPG) - > but after 4 or 5 times the capture aborts:
[ERROR] Error opening camera: failed to allocate capture buffers for stream
- rebooted. capture OK (JPG and DNG) ... after some tries: scrambled eggs or [ERROR]:-)


So this is a big step forward - Tux likes it :) But it needs some work to really beeing stable.

I'll try further on.
2 months 3 weeks ago #98823
Attachments:

Please Log in or Create an account to join the conversation.

  • Posts: 124
  • Thank you received: 13

Replied by Outta on topic INDI LibCamera Driver

Ok I have a clean version of stellarmate did update dist-upgrade
When I select Libcamera i indi is not starting.

Then I pulled recent version of indi-libcamera

Initially falied to cmake due to missing libcamera-dev installed by

sudo apt-get install libcamera-dev

Next issue was
-- Could NOT find Boost: missing: program_options (found /usr/lib/aarch64-linux-gnu/cmake/Boost-1.74.0/BoostConfig.cmake (found version "1.74.0"))

Solved by
sudo apt-get install libboost-all-dev

And then it installed
The following user(s) said Thank You: Axel
2 months 3 weeks ago #98847

Please Log in or Create an account to join the conversation.

  • Posts: 124
  • Thank you received: 13

Replied by Outta on topic INDI LibCamera Driver

Very important trick is to set AWB Blue and AWB Red to 1, if itis set to 0, it will take 3 exposures to adjust awb. Default should be 1 I think as well.
2 months 1 week ago #99103

Please Log in or Create an account to join the conversation.

  • Posts: 64
  • Thank you received: 10

Replied by Axel on topic INDI LibCamera Driver

Hi Outta,

could you probably be a little bit more precise in what you really did and write it down in a row :-)

- Did you build (!) the indi-libcamera? How?
- What means "pulled"? - from where (git -which version exactly?)
- You write "And then it installed" - what exactly did you install (your built indi-libcamera ...?)

I think this would help people to understand what you exactly did and why :-) For me, it is not clear what your goal was and what you succeeded in the end and why.

THX and cheers
Axel
Last edit: 2 months 1 week ago by Axel .
2 months 1 week ago #99113

Please Log in or Create an account to join the conversation.

  • Posts: 124
  • Thank you received: 13

Replied by Outta on topic INDI LibCamera Driver

I got fresh clean install of Stellarmate and did
sudo apt update
sudo apt upgrade
sudo apt dist-upgrade?

Then i coppied commands in a row from this github github.com/indilib/indi-3rdparty

To ease up here are all in order without my failed steps, just run one by one when previous is finished.

sudo apt-get -y install libnova-dev libcfitsio-dev libusb-1.0-0-dev zlib1g-dev libgsl-dev build-essential cmake git libjpeg-dev libcurl4-gnutls-dev libtiff-dev libfftw3-dev libftdi-dev libgps-dev libraw-dev libdc1394-dev libgphoto2-dev libboost-dev libboost-regex-dev librtlsdr-dev liblimesuite-dev libftdi1-dev libavcodec-dev libavdevice-dev

sudo apt-get -y install libindi-dev

mkdir -p ~/Projects
cd ~/Projects

git clone --depth=1 github.com/indilib/indi-3rdparty

Then I ran this two commands I mentioned:

sudo apt-get install libcamera-dev
sudo apt-get install libboost-all-dev

Next I ran this set of commands
mkdir -p ~/Projects/build/indi-libcamera
cd ~/Projects/build/indi-libcamera
cmake -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_BUILD_TYPE=Debug ~/Projects/indi-3rdparty/indi-libcamera
make -j4
sudo make install

Then I started Kstats, opened Ekos, Selected Camera to be Raspberry Pi - Libcamera, started Ekos, and set AWB Blue and Red to 1 from zero and voila, it works!

OH IMPORTANT:
Gain has to be 1 or more. It crashes with 0
Last edit: 2 months 1 week ago by Outta.
2 months 1 week ago #99117

Please Log in or Create an account to join the conversation.

  • Posts: 7
  • Thank you received: 0
I was able to make it work! Thanks for the detailed instructions. Although I don't know if it happens to you, but for me after a couple pictures the camera crashes (or its driver).
Well at least we are getting some progress.
Best,
2 months 1 week ago #99257

Please Log in or Create an account to join the conversation.

  • Posts: 124
  • Thank you received: 13

Replied by Outta on topic INDI LibCamera Driver

Not a single crash for me,
1-2s exposures, gain 16, running all night in 8 bit phd2, this are my libcam versions

libcamera-dev:arm64 0.1.0+rpt20231122-1 >
ii libcamera-ipa:arm64 0.1.0+rpt20231122-1 >
ii libcamera-tools 0.1.0+rpt20231122-1 >
ii libcamera0.1:arm64 0.1.0+rpt20231122-1 >
2 months 1 week ago #99258

Please Log in or Create an account to join the conversation.

  • Posts: 2
  • Thank you received: 0

Replied by Matt on topic INDI LibCamera Driver


I've tried these steps a few times now with Stellarmate 1.8.1 on a pi 4B. After one to two captures the driver crashes. Tested with the LibCamera imx477. New to this software as of last week, but willing to provide any logs or testing if you can point me in the right direction. I would prefer to get this camera working vs buying another at this time.
2 months 1 day ago #99417

Please Log in or Create an account to join the conversation.

Replied by Jasem Mutlaq on topic INDI LibCamera Driver

Issue with upstream RPICAM leading to out-of-memory error, it's reported here: github.com/raspberrypi/rpicam-apps/issues/640
2 months 18 hours ago #99420

Please Log in or Create an account to join the conversation.

Replied by Jasem Mutlaq on topic INDI LibCamera Driver

Apparently the OOM issue was due to not parsing options, I uploaded a new version. Please check it out.
2 months 14 hours ago #99422

Please Log in or Create an account to join the conversation.

  • Posts: 2
  • Thank you received: 0

Replied by Matt on topic INDI LibCamera Driver

Yes sir, that solved the issue for me. I updated to the latest, setup a capture of 300 and let it run. No issues to report. Thank you for taking the time to get that update in there so quickly.
2 months 8 hours ago #99428

Please Log in or Create an account to join the conversation.

  • Posts: 144
  • Thank you received: 7

Replied by Ettore on topic INDI LibCamera Driver

Hello i have this error:
Found LIBCAMERA Library: /usr/local/lib/aarch64-linux-gnu/libcamera.so
CMake Error at /home/masseris/Projects/indi-3rdparty/cmake_modules/FindLibCameraApps.cmake:43 (message):
LIBCAMERAAPPS Library not found. Please install rpicam-apps
Call Stack (most recent call first):
CMakeLists.txt:14 (find_package)

Ettore
1 month 3 weeks ago #99500

Please Log in or Create an account to join the conversation.

Time to create page: 1.171 seconds