jim-easterbrook / python-gphoto2

Python interface to libgphoto2
GNU Lesser General Public License v3.0
359 stars 59 forks source link

How to use bulb mode? #91

Closed 2dal closed 4 years ago

2dal commented 4 years ago

Using python 3.6 libgphoto2 version 2.5.22-1 and python-gphoto version 2.0.0

I'm having difficulty finding the right syntax for having exposure time (bulb mode) longer than my cameras maximum 30 seconds in the python-gphoto. This works fine in libgphoto2, where the syntax is

gphoto2 --set-config bulb=1 --wait-event=300s --set-config bulb=0 --wait-event-and-download=2s

jim-easterbrook commented 4 years ago

I would guess that you need to set the camera config (to replicate the --set-config bulb=1), then wait 300 seconds, then reset the camera config (to replicate the --set-config bulb=0).

2dal commented 4 years ago

I think that is the way to go. But I'm having trouble finding the correct syntax for it. I've searched through the repository a couple of times and haven't been able to find any way to set the camera to bulb mode

jim-easterbrook commented 4 years ago

The camera-config-gui.py example will show all the configuration options available for your camera, as will the gphoto2 --list-config command line program. Several of the example programs demonstrate setting camera config, set-capture-target.py is probably the simplest.

programatt commented 2 years ago

@2dal if you're interested I was able to figure out how to do a bulb exposure using the eosremoterelease config value. https://gist.github.com/programatt/1d1f4987770ed8ecf5327df0ae561d0a I'm just doing a sleep for the length of the exposure, the problem is that CameraEventType in gphoto doesn't expose an event to know how long the shutter is held down for. Feel free to use this if you still need/want it!

brilliant-ember commented 10 months ago

There's a "Bulb Capture" section in this docs page. I hope it helps. http://gphoto.org/doc/remote/