raspberrypi / userland

Source code for ARM side libraries for interfacing to Raspberry Pi GPU.
BSD 3-Clause "New" or "Revised" License
2.04k stars 1.09k forks source link

datetime with milliseconds & fast capture #707

Open sebmueller opened 2 years ago

sebmueller commented 2 years ago

Hi guys,

I use the Raspberry (3) together with the HQ camera in an Allsky camera setup. I want to take long exposure pictures all the night and looking for shooting stars.

Because a shooting star has a very short time to live (1-2 seconds) I tried to bring down the time between 2 pictures in infinite mode (timeout 0, timelapse 0). Also I needed more detailed filenames, when using the datetime option. So I added another function, which creates a more detailed filename (YYYYMMDD_HHMMSS_millisecond), also the functions creates the destination folder, if not exists.

a second change was to remove the waiting time within the timelapse function.

I saw also, the the internal signal handler for USR1 Signal did not start the picture, the function was not complete implemented.

maybe you can review the changes and take it for the next raspistill release.

kind regards Seabastian

RaspiStill.zip

6by9 commented 2 years ago

Please submit proposed changes as a pull request - https://github.com/raspberrypi/userland/pulls

domtisdell commented 2 years ago

Hi Seabastian, 6by9

I really like the ability to have the milliseconds in the file name for the timelapse option (could do it 'manually' outside of the options list for other configs). Will come in very handy for both astro and UAV mapping. Likewise for the speed increase. Thank you.

As an example, I've trialled the code on a CM4 based platform with dual HQ (IMX477) cameras set to capture raw images with 2x2 binning called via multiprocess. This results in a circa 15ms difference in the time stamps between the two cameras and a circa 0.9 sec delay between frames saving directly to SD card.

I can't unfortunately seem to find a way to add a variable name prefix to the date-time stamp in the filename as I can with the original raspistill code e.g. cmd = 'raspistill -cs 0 -r -n -t 10000 -tl 0 -dt -md 2 -o ' + 'cam0%d' + '.jpg' The prefix seems to now be set to "img". Is there a way to use combined variable string + accurate date-time stamps for filenames in the updated code?

Thanks again and kind regards