photobooth icon indicating copy to clipboard operation
photobooth copied to clipboard

[BUG]: very long shtter lag after cheeeeese

Open hubertmeier opened this issue 1 year ago • 1 comments

Describe the bug

i installed the script after a fresh bookworm installation on a raspberry pi 4. The webui works fine, the load is always under 5%, the pi has nothing to do. If i take a picture (gphoto2 with Sony Alpha 7C or another Sony Alpha) it requires 15-20 seconds to the shutter! If i tke the picture from the terminal with the gphoto2 command, it takes 2-3 seconds. I see in htop, that after 3-2-1-cheeese 10-15 seconds pass away before the job of gphoto2 appears! The load of the pi is always under 5%. After gphoto2, the animation with the circle appears, processing of the picture requires 20-30% load. What can i do that photobooth starts gphoto2 immediately?

Thank you, its a nice software.

Steps to reproduce the behavior

fresh raspberry os on rpi 4 Sony Alpha 7c

Expected behavior

taking a picture immediately or starting gphoto2 immediately

Photobooth Version

4.5.1

Browser and browser version

firefox on windows, firefox on android

Operating System

raspberry os debian 12

Did it work before?

No

Latest working version

No response

Additional context

No response

hubertmeier avatar Sep 22 '24 12:09 hubertmeier

You can try one of the alternative capture commands mentioned in the FAQ. Please also take a look at the browser console while Loglevel is set to 2.

https://photoboothproject.github.io/faq/#alternative-capture-commands

Photobooth v4 stable branch only gets compatibility updates to work with latest Photbooth installer, bugs won't be looked at.

If the issue persist please install latest development version and check there.

andi34 avatar Sep 22 '24 16:09 andi34

I am currently having similar issues with a fresh installation. I tried to debug the problem with a system of a 5-second countdown with a live view of the DSLR camera.

After clicking on the take picture button, the countdown starts, and the live view is shown immediately in the background (which is great). After 5 seconds, "Cheeeeeeese" is displayed on the screen, and the Console log shows the Capture image. message. Just afterward, the camera makes the picture with the flash (also directly after the countdown ends, without a long waiting time). Until now, everything works as expected. After this, the photobooth stays in the "Cheeeeeeese" screen, even if the picture is taken. After a waiting time (which is the problem and too long), the console says Taking picture took 12860ms. The rest of the process is as expected. The processing screen is shown for a short time and the image is correctly shown on the screen. So the problem must be related while "Cheeeeeese" is shown, right after the Capture image. message. The 12860ms for taking a picture is way too long.

https://github.com/PhotoboothProject/photobooth/blob/fe24e40ed73715e122eef29171b4a50f54ff66f5/assets/js/core.js#L575

Maybe it is also a configuration problem. Any idea why it takes so long?

The gphoto2 command took around 4-6 seconds in the terminal. So half of the time is wasted somewhere in the photobooth application.

mhellmeier avatar Dec 25 '24 13:12 mhellmeier

@mhellmeier like mentioned, try one of the mentioned commands. If using go2rtc for preview simply replace the word gphoto2 with the word capture. The JavaScript is waiting for the response of the capture command to continue and end the cheese.

andi34 avatar Dec 25 '24 16:12 andi34

And also use a cheese time of 0 if using live preview

andi34 avatar Dec 25 '24 16:12 andi34

After further investigation, the problem seems to be caused upstream from gphoto2. An open issue for long delays still exists for specific Nikon models: https://github.com/gphoto/gphoto2/issues/203

I also noticed that gphoto2 scans all images on the camera's SD card to find the correct one before downloading. Consequently, a very full camera SD card with numerous pictures can cause long cheese timer lags. Keeping the number of pictures minimal on the camera SD card can massively improve the performance of the photobooth. Also, reducing the sizes of the images and their quality might improve it.

I hope these tips will help people with similar issues.

mhellmeier avatar Oct 02 '25 20:10 mhellmeier