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

Any way to do continuous or burst captures? #182

Open
andrewyguo opened this issue Oct 24, 2024 · 1 comment
Open

Any way to do continuous or burst captures? #182

andrewyguo opened this issue Oct 24, 2024 · 1 comment
Labels

Comments

@andrewyguo
Copy link

I'm aware that there is an existing issue for this: #123

However, I checked the related issue in the gphoto repo as well but the mentioned solution did not work for me. Currently, I have a loop where:

for i in range(10):
    start = time.time()
    error = gp.gp_camera_trigger_capture(camera)

    while True:
        event_type, event_data = camera.wait_for_event(3000)

        if event_type == gp.GP_EVENT_FILE_ADDED:
            break

    print("Total time taken:", time.time() - start)

I am noticing that it takes around 1.2 seconds for each capture. However, my Sony A7M4 camera is set to Hi+ continuous shooting mode. When I physically hold down the shutter button, it gets 6 FPS or more.

I also tried to check for event_type==gp.GP_EVENT_CAPTURE_COMPLETE and it takes around the same time per shot. Is there a way to take advantage of my camera's continuous shooting mode to take faster images?

@jim-easterbrook
Copy link
Owner

Waiting for GP_EVENT_FILE_ADDED before triggering the next exposure will almost certainly deliver less than full speed. I don't know what (if any) event tells you that the camera is ready for the next exposure, it's probably very camera dependent. Try calling camera.trigger_capture() several times before waiting for any events. (You may need to empty the event queue by calling camera.wait_for_event(0) repeatedly until it returns GP_EVENT_TIMEOUT between camera.trigger_capture() calls.)

However, I don't have a Sony camera, didn't write libgphoto2, and don't use it for capturing, so this question is better directed at the libgphoto2 mailing list.

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

No branches or pull requests

2 participants