Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] timeout 1 argument to libcamera-still broken in bookworm with rpicam-apps 1.4.4-1 #3657

Open
MichelMoriniaux opened this issue May 26, 2024 · 4 comments

Comments

@MichelMoriniaux
Copy link

MichelMoriniaux commented May 26, 2024

Environment

  • Camera: RPi - HQ ( Arducam Imx477 )
  • OS: Bookworm
  • Allsky version: v2023.05.01_04
  • Pi model 4b 8G

Bug Description

with rpicam-apps 1.4.4.1 ( current version for Bookworm) libcamera-still --timeout 1 forces the exposure time to 1ms regardless of the --shutter setting. This creates a very noisy, underexposed image. it seems that the --immediate flag provides the desired result

time libcamera-still --shutter 60000000 --timeout 1 completes in 1s
time libcamera-still --shutter 60000000 --immediate completes in 61s

side effect:
even though the image is taken in 1ms, allsky thinks it was 60s so there is an image taken every 30s instead of 90s

possible solutions:

  • replace the timeout command in capture_RPi.cpp by --immediate
    (do not change in scripts/fucntions.sh as it breaks command detection)

OR

  • change the timeout to 0

OR

  • change the timeout flag logic to be slightly longer than the exposure in capture_RPi.cpp

Log / configuration files

example log lines showing time discrepancies
2024-05-25T16:18:27.188947-07:00 skycam allsky[4885]: -----
2024-05-25T16:18:27.189394-07:00 skycam allsky[4885]: STARTING EXPOSURE at: 2024-05-25 16:18:27 @ 60.0 sec
2024-05-25T16:18:27.229334-07:00 skycam allsky[4885]: > Running: libcamera-still --output '/home/mark/allsky/tmp/image-20240525161827.jpg' --metadata /home/mark/allsky/config/overlay/extra/libcamera.txt --metadata-format txt --timeout 1 --nopreview --width 4056 --height 3040 --shutter 60000000 --analoggain 1.45151 --awb auto --quality 100
2024-05-25T16:18:30.631629-07:00 skycam allsky[4885]: > Saving DAY image 'image-20240525161827.jpg'
2024-05-25T16:18:30.633062-07:00 skycam allsky[4885]: > Sleeping: 30.0 sec

after fix in captureRPi.cpp:
2024-05-25T18:36:10.537156-07:00 skycam allsky[10987]: -----
2024-05-25T18:36:10.538206-07:00 skycam allsky[10987]: STARTING EXPOSURE at: 2024-05-25 18:36:10 @ 1.3 sec
2024-05-25T18:36:10.637617-07:00 skycam allsky[10987]: > Running: libcamera-still --output '/home/mark/allsky/tmp/image-20240525183610.jpg' --metadata /home/mark/allsky/config/overlay/extra/libcamera.txt --metadata-format txt --immediate --nopreview --width 4056 --height 3040 --shutter 1284414 --analoggain 1 --awb auto --quality 100
2024-05-25T18:36:17.919369-07:00 skycam allsky[10987]: > Saving DAY image 'image-20240525183610.jpg'
2024-05-25T18:36:17.920713-07:00 skycam allsky[10987]: > Sleeping: 88.7 sec

@EricClaeys
Copy link
Collaborator

@MichelMoriniaux, is rpicam-apps 1.4.4-1 still the latest release?

@rkinnett
Copy link

rkinnett commented Aug 16, 2024

Bump. If needed, I can help test with RPi HQ, Pi 4b, Raspbian bookworm.

@aaronwmorris
Copy link

@EricClaeys v1.5.0 is the latest release on bookworm.

@EricClaeys
Copy link
Collaborator

@MichelMoriniaux, @rkinnett, is this still a problem with v1.5.0 libcamera?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants