
Libgphoto2 Controls Digital Cameras - brudgers
http://www.gphoto.org/
======
bizzleDawg
I used gphoto2 circa 5 years ago in order to capture photos from an automated
photography rig. The library was great and I was able to control the timing
well enough to use with a flash (single flash for multiple cameras)

As another comment has pointed out, the flaw was the firmware on the cameras.
Canon 60D and 600D were the two models I was using and they were so lible to
freezing (i.e. stop responding on USB or to button presses on the camera) that
I had to set up a relay on the tethered power supply to be able to hard reset
them from time-to-time. I'm 100% sure libgphoto2 wasn't to blame because I
also used a tethered capture tool from Canon on windows and that also suffered
from the same symptoms.

Great library though and great maintainers!

~~~
matthewmacleod
HI’m doing exactly the same now using the M50, and (no surprise) it has the
same problems!

I’ve found that libusb has some useful tools for working around this kind of
problem. There is a useful CLI tool for resetting individual ports on some
hubs ([https://github.com/mvp/uhubctl](https://github.com/mvp/uhubctl)) which
makes good use of this feature. May not fix everything but works for most use
cases.

------
aruggirello
For those who don't know, Entangle does just that (using libgphoto2):

[https://entangle-photo.org/](https://entangle-photo.org/)

------
elijahparker
I’ve used libgphoto2 for a few years now and have contributed some as well,
but have been frustrated by the slow performance for tethered shooting due to
legacy code since it was originally designed as more of a file browser. The
vast camera support of libgphoto2 is hard to beat, though.

That said, I’ve been building a pure JavaScript replacement for it. It’s still
a work in progress, but for changing settings, live view and capture, it
performs significantly better and now supports many Canon, Nikon, Sony, Fuji,
Panasonic and Olympus cameras. I’m going with an open-source/commercial
license model for it, and once it’s further along will package it better. For
now, you can check it out in this subfolder:
[https://github.com/timelapseplus/VIEW/blob/master/camera/ptp...](https://github.com/timelapseplus/VIEW/blob/master/camera/ptpjs/)
(api.js is the one to require)

------
mixmastamyk
I enjoy CLI photo management and have a few scripts of my own. Looked over the
docs of this project but not entirely clear on why I would use this when most
cameras are mounted as a disk already.

Is remote camera control the main use case now? Are there other use cases?

Edit: The Entangle link in this discussion appears to support this assumption.

~~~
brudgers
To me, remote camera operation seems to be the critical feature that is hard
to get elsewhere. It's also increasingly available on new camera models.

------
nicolaslem
I'm curious if it's possible to make the switch from Lightroom to Darktable
(which uses libgphoto2 underneath I believe). The last time I tried was years
ago and it was not a success.

~~~
frio
I've been trying to migrate my flow from Lightroom to purely OSS tools. So far
I've landed on a big mess of importing RAW with the gphoto2 CLI so that I've
got a reliable archive to then feed the other tools: digiKam for active
library management of the shots I want to develop, Rawtherapee and Darktable
for processing, and then the GIMP for final touchups.

As much as I find Adobe distasteful, it's a much, much smoother experience. If
you don't mind hacking away to find a workflow that works for you, you'll get
similar results out of open source tools -- but the path to those results is
much longer.

~~~
brudgers
Darktable and Rawtherapee support many RAW formats directly. Gimp supports
many RAW formats with a plugin. For those workflows, preprocessing with
libgphoto2 may not be required.

~~~
frio
gphoto2 is more for archival. For whatever reason it feels safer to me to use
the CLI as a feeder for the other apps; gphoto2 grabs the photos off the
camera, pops them in a folder, and I then import into digiKam from _there_
rather than from the camera.

The archive is independently backed up and remains a pristine home for all my
digital negatives, without the risk of me annihilating things in
digiKam/Darktable, which I am wont to do ;).

~~~
brudgers
That makes sense. I use Rapid Photo Downloader to ingest images. It handles
renaming, directory creation, and teeing the data stream to a primary and a
backup location.
[https://www.damonlynch.net/rapid/](https://www.damonlynch.net/rapid/) It
replaced shell my scripts about two years ago. Periodically, I archive the
online disks to an offline disk.

When the online backup disk is full, I archive it and buy another. Likewise
with the SD cards from the camera, I shoot until they are full and then
archive them. I don't delete images off of them and replace them when full. I
treat SD cards as a consumable...like film.

~~~
frio
Thanks for the link, I'll take a look :).

------
heyflyguy
What a great library! And Jim Easterbrook's adaptation for python is the
center of my life right now.

------
gsich
On a side note, Nikon D750 has an utterly retarded remote protocol. Or PTP is
really that bad.

For example: you shoot a photo, then the camera sends it via USB to the host.
Takes multiple seconds, instead of just saving it to the SD-card. No queuing
either, so you need to wait before shooting again.

~~~
glup
`gphoto2 --set-config capturetarget=1` I think might work for what you want.

~~~
gsich
I solved it (was some weeks ago) by using a relay with a Raspberry attached to
the remote shutter port.

