Photography: remote shutter release with gPhoto2

Published by TheJoe on

Estimated reading time: 2 minutes


This article was published more than a year ago, there may have been developments.
Please take this into account.

In today's tutorial we see some small function gPhoto2, a program command-line oriented * NIX systems which in addition to other functions, allows us to access some of the functionality “hidden” (or non-advertised) of our cameras.

It should be stated at the outset that not all cameras are supported. The complete list is available on the manuale online Application.

The operation is very simple. Configure the camera (io face you Canon EOS 20d) so that the USB connection is of type PTP (under the menu “Communication” – “PTP”).

Now connect the camera to your computer with its USB cable.

The connection, gPhoto2 if it is already installed, our operating system automatically mount the camera allowing you to download photos inside. As we shall see gPhoto2 can do much more, but to operate it is necessary that the camera is not mounted. The easiest way is to click with the right mouse button and select the icon for the camera “Unmount”, “Skinned” the “Remove drive safely”.

At this point gPhoto2 should be granted access to the camera. Meanwhile, let's see if the “sees”.

$ gphoto2 --summary
Spotted an "Canon:EOS 20D (normal mode)".
Summary of the camera:

Identification of the camera:
  Type: Canon:EOS 20D (normal mode)
  Manufacturer: unknown

power Status: with battery (Power OK)

Information on flash memory:
  Unit A:
    3'904'152 total bytes
    3'890'804 bytes available

Now: 2012-03-03 19:25:16 (ORA host +0 seconds)

Well, the camera was found, my brand says, type, available memory and battery status.

Look here:  Trim a video clip with "ffmpeg"

We take a photo

gphoto2 --capture-image

Type this command from the terminal will hear the classic “clack-clack” shutter of the 20d, and the picture is registered in the camera memory.

Other cool features

How many photos were taken from my camera from the date of manufacture until now?

$ gphoto2 --get-config=/main/status/shuttercounter

And if I wanted to download all the photos on the CF card inserted in the camera (without “mount” the camera)?

$ gphoto2 --get-all-files

In the next article we will see how to set up your computer so that it forwards the trip command at regular intervals, 'll mount the frames automatically creating a video with ffmpeg. This technique is called “time-lapse”.


I keep this blog as a hobby by 2009. I am passionate about graphic, technology, software Open Source. Among my articles will be easy to find music, and some personal thoughts, but I prefer the direct line of the blog mainly to technology. For more information contact me.


Leave a Reply

Avatar placeholder

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.