AllskyTeam / allsky

A Raspberry Pi operated Wireless Allsky Camera
MIT License
1.12k stars 174 forks source link

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

Open MichelMoriniaux opened 1 month ago

MichelMoriniaux commented 1 month ago

Environment

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:

OR

OR

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 commented 3 weeks ago

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