Skip to content
This repository has been archived by the owner on Aug 27, 2022. It is now read-only.

[BUG]: Gphoto2 preview not working with power save mode #407

Closed
smoki3 opened this issue Apr 4, 2022 · 12 comments · Fixed by #448
Closed

[BUG]: Gphoto2 preview not working with power save mode #407

smoki3 opened this issue Apr 4, 2022 · 12 comments · Fixed by #448
Labels
bug Something isn't working

Comments

@smoki3
Copy link

smoki3 commented Apr 4, 2022

Describe the bug

Hi,

I tried to enable the preview mode during the countdown. But it is not working for me.

I using chromium 88 and a Nikon D610.

If I enable the power saving mode for the preview I dont get any image during the countdown. But the camera is opening the shutter as soon I press the release button.

If I disable the power saving mode then the preview is always shown and everthing is working as expected.

I did a clean install with the latest dev branch and lastest raspbian OS.

Steps to reproduce the behavior

If I enable the power saving mode for the preview I dont get any image during the countdown. But the camera is opening the shutter as soon I press the release button.

If I disable the power saving mode then the preview is always shown and everthing is working as expected.

Expected behavior

The preview is shown as soon I press the release button.

Photobooth Version

latest dev

Browser and browser version

Chromium 88

Operating System

Raspberry OS

Did it work before?

No

Latest working version

Additional context

No response

@smoki3 smoki3 added the bug Something isn't working label Apr 4, 2022
@andi34
Copy link
Owner

andi34 commented Apr 4, 2022

Have you tried python gohoto?
https://github.com/andi34/photobooth/blob/dev/faq/faq.md#how-to-get-better-performance-using-gphoto2-as-preview

This doesn't sound like a general Photobooth issue.
On a mobile phone I had an issue in the past with chrome not updating the preview from device cam until I moved chrome into the background and taking it in the foreground again.

@up-87
Copy link

up-87 commented Apr 8, 2022

How long is your countdown? If you disable power saver mode it'll take several seconds until the camera preview is ready. Same would be true if you were using the python script with power saver mode active in the script. Your camera will only be able to show the preview instantly if you disable power saver mode. Without it it can take 2 to 5 seconds until the preview is ready. Maybe even more. Try a really long countdown. My assumption would be that the camera preview will get available.

@stale
Copy link

stale bot commented Jun 10, 2022

This issue has been automatically marked as stale because it has not had recent activity. I am here to help clear issues left open even if solved or waiting for more insight. This issue will be closed if no further activity occurs during the next 2 weeks. If the issue is still valid just add a comment to keep it alive. Thank you for your contributions.

@stale stale bot added the stale label Jun 10, 2022
@DIY89
Copy link

DIY89 commented Jun 12, 2022

Maybe your fault is related to a small bug in the core.js
api.startCountdown = function (start, element, cb) {
let count = 0;
let current = start;
const stop = start > config.preview.stop_time, 10 ? start - config.preview.stop_time, 10 : start;

add
parseInt() to stop time const stop = start > parseInt(config.preview.stop_time, 10) ? start - parseInt(config.preview.stop_time, 10) : start;

@stale stale bot removed the stale label Jun 12, 2022
@er9xuser
Copy link

er9xuser commented Jun 15, 2022

I did try to use python3 cameracontrol.py for livepreview...but unfortunately doesn't work. I'm using Canon EOS 1200D. And for manual in wiki. I'm not sure where to edit commands. Where to put python3 cameracontrol.py? I know where to put python3 cameracontrol.py --set-config capturetarget=1 but in the end...photobooth says something wrong.

@andi34
Copy link
Owner

andi34 commented Jun 15, 2022

I did try to use python3 cameracontrol.py for livepreview...but unfortunately doesn't work. I'm using Canon EOS 1200D. And for manual in wiki. I'm not sure where to edit commands. Where to put python3 cameracontrol.py? I know where to put python3 cameracontrol.py --set-config capturetarget=1 but in the end...photobooth says something wrong.

it's a feature added to latest development branch. You need to install some packages and adjust the take picture command etc.
If you're having trouble on the setup feel free to join our telegram group because only photobooth issues can be discussed here on github.

@er9xuser
Copy link

What is Telegram group called?

@andi34
Copy link
Owner

andi34 commented Jun 15, 2022

Linked inside the README ;)
https://t.me/PhotoboothGroup

@er9xuser
Copy link

I'll try latest development branch. Thanks

@er9xuser
Copy link

Live preview works. But when capturing image...i get error:

[error] => File was not created
[cmd] => python3 cameracontrol.py -s capturetarget=1 -c capture-image-and-download 2>&1
[returnValue] => 0
[output] => Array
(
[0] => Sending message: {'device': '/dev/video0', 'config': ['capturetarget=1'], 'imgpath': 'capture-image-and-download', 'bsm': False, 'chroma_image': None, 'chroma_color': None, 'chroma_sensitivity': None, 'chroma_blend': None, 'exit': False}
[1] => Image captured
)

[php] => takePic.php

My take picture command is: python3 cameracontrol.py -s capturetarget=1 -c capture-image-and-download

@andi34
Copy link
Owner

andi34 commented Jun 16, 2022

You've at least forgot the %s (which is the path and filename for the image)

Try

python3 cameracontrol.py -s capturetarget=1 -c capture-image-and-download %s

@er9xuser
Copy link

Just for info. This command works:

python3 cameracontrol.py -s capturetarget=1 -c capture-image-and-download -c %s

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants